openjetson / tensorrt-yolov5 Goto Github PK
View Code? Open in Web Editor NEWRun tensorrt yolov5 on Jetson devices, supports yolov5s, yolov5m, yolov5l, yolov5x.
Run tensorrt yolov5 on Jetson devices, supports yolov5s, yolov5m, yolov5l, yolov5x.
in yolov5.cpp, line 526:
'''
auto start = std::chrono::system_clock::now();
doInference(*context, stream, buffers, data, prob, BATCH_SIZE);
auto end = std::chrono::system_clock::now();
int fps = 1000.0/std::chrono::duration_caststd::chrono::milliseconds(end - start).count();
'''
end-start is only the infer time, time for pre and post process should be included when calculating the FPS,like below:
'''
auto start1 = std::chrono::system_clock::now();
for (int f = 0; f < (int)file_names.size(); f++) {
... ...
doInference(*context, stream, buffers, data, prob, BATCH_SIZE);
auto end1 = std::chrono::system_clock::now();
int fps = 1000.0/std::chrono::duration_caststd::chrono::milliseconds(end1 - start1).count();
start1 = std::chrono::system_clock::now();
}
in this way end-start contains time for one loop.
Hi @tuyaliang, I tried using this script using my USB webcam and it worked perfectly, however when trying it using my Raspberry Pi v2 CSI camera, I ran into the following error and a pop-up window opened displaying a green screen:
skymind@skymind:~/yolov5-tensorrt-openjetson/build$ sudo ./yolov5 -v
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (1757) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Internal data stream error.
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (886) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Gtk-Message: 16:18:00.782: Failed to load module "canberra-gtk-module"
Would really appreciate any help in solving this problem. Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.