I run it with CUDA:
detector.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
detector.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
Everything works and starts well. My problem is that the FPS is very slow despite the fact that it is with the GPU. It runs between 3 to 2 FPS … and sometimes it stays loading for a long time (with a very small resize so that it loads faster, if I set it large it is extremely slow).
If I use the Jetson Inference it looks big and runs a little faster. What’s the difference?
Another question: can I make the jetson nano inference code more optimized? Example: that it does not show the video when I run it, or that the video that I receive is smaller or of an exact size.
The GPU performance depends on the way of implementation.
Since Jetson has integrated memory, not all the frameworks have the optimal solutions for it.
It’s more recommended to use jetson-inference.
It uses TensorRT as the backend inference engine, which is more suitable for Jetson platforms.