OpenCV vs DeepStream vs Jetson-inference

Hi there!

I have a YOLOv4 trained with a custom dataset and y pretend to use a Jetson Nano to detects and count through tracking a specific type of objects (just one class).

I tried the Sort tracking algorithm GitHub - abewley/sort: Simple, online, and realtime tracking of multiple objects in a video sequence. which seems work well for my purpose task. So I have a YOLO + Sort solution for my task.

Now is time to try it on jetson nano. I am beginner in this field of embedded system and after a long searching i found 3 methods to try, OPENCV (+ cuda), DeepStream for Jetson inference repository.

What’s the main reason to select one of them? What’s your suggestion? I am open to select others networks and tracking methods for count my class.


If you will mount a camera and do the real-time inference.
It’s more recommended to use Deepstream since it optimizes the whole pipeline for Jetson.


Thanks! and my last question is, could you tell me the main differences of DeepStream and Jetson-Inference?

Hi @camposromeromiguel , DeepStream is optimized for production and multi-stream (i.e. multiple cameras). It is also integrated with the Transfer Learning Toolkit (TLT) and you can take the pruned/optimized models from TLT and deploy them with DeepStream. DeepStream is also integrated with various message brokers for sending analytics to the cloud.

jetson-inference is easy to use while still having good performance (particularly for single camera) and has the Hello AI World tutorial for getting started. It’s entirely open source and also supports training example models onboard your Jetson with PyTorch. Both jetson-inference and DeepStream use TensorRT underneath for increased performance.

1 Like

It’s possible add custom models to inferenceusing jetson-inferece ? I have a YOLO model in darknet. Can I transform the model into tensorRT and run in inside Jerson with your github?

You would need to convert it to ONNX, test that TensorRT can load that ONNX model (i.e. using the trtexec tool found under /usr/src/tensorrt/bin), and then add the necessary pre/post-processing such that it matches the pre/post-processing that was done in the previous framework (i.e. Darknet).

For example, here is the pre/post-processing used currently for detectNet:

Pre-processing typically consists of conversion to NCHW layout and pixel normalization or mean pixel subtraction. You want to make sure the same coefficients are used during these normalization steps.

In the case of detectNet, post-processing includes interpretation of the output tensors from the model to retrieve the bounding boxes / confidence values, and clustering of the bounding boxes.