jetson.inference.detectNet.Detect which format of img parameter?

Hi,

i’m working in python3.6 with jetson module on a TX2.
The pictures are from a IDS camera and i need to know how can i pass frame from IDS camera to Detect(img,width,height,overlay) method of jetson.inference

Thanks in advance
Federico

Hi Federico, are the images a Numpy array? If so, see this example to convert the images to CUDA memory format that detectNet.Detect function can use: https://github.com/dusty-nv/jetson-utils/blob/798c416c175d509571859c9290257bd5cce1fd63/python/examples/cuda-from-numpy.py

The Numpy array that’s passed into this should be 4-channel RGBA, as detectNet expects to work with 4-channel RGBA image.

Also, if you are using OpenCV to capture the image, see this post for the conversion: https://devtalk.nvidia.com/default/topic/1071209/jetson-nano/detectnet-video-/post/5427509/#5427509