Using OpenCV with DeepStream SDK-6.0

Hey,
I doing a project using 4 IP cameras providing RTSP streams and Jetson Nano run object detection on it to detect the number of vehicles for Smart Traffic lights.

I want to ask if it is possible to use both (OpenCV and DeepStream) at the same time in a python script or notebook.
The reason for this is that I have plenty of experience with OpenCV and I am not sure if things like transformation, homography, creating, and applying a mask are possible in DeepStream easily.
Do share any examples if you have any. Thanks

Hi,
We have demonstration in using dsexample plugin. Please take a look at

/opt/nvidia/deepstream/deepstream-6.0/sources/gst-plugins/gst-dsexample/README

And give it a try. From our experience the performance may not be good on Jetson Nano due to CPU capability. Since most OpenCV functions use CPU cores.

hmm… it’s coded in C++.
Is it possible to do this in Python?

What I want to achieve is to correct the distorted image from a wide-angle IP camera.
A distorted stream is not very efficient for performing inference. I thought I could use cv2.warpPerspective( ) function to correct this distortion in python (deepstream_test_3.py).

Essentially I want every frame to pass through cv2.warpPerspective( ) before going in nvinfer.
How do you think it is possible?

Like this

Hi,
A possible solution is to use VPI functions in dsexample plugin. Please check the fucntions:
https://docs.nvidia.com/vpi/algo_persp_warp.html

There is no existing implementation in python. But from DS6.0 python bindings are open source. You can check the source code and do customization. The source code link:
deepstream_python_apps/bindings at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.