Converting the Zed camera frame as the input of detectnet-camera

I am trying to give the Zed camera output to the detect_net in Jetson inference file in Jetson nano, but I keep encountering the following error:
“Exception has occurred: Exception
jetson.inference – detectNet.Detect() encountered an error classifying the image”

“jetson.utils – cudaFromNumpy() ndarray dim 0 = 376
jetson.utils – cudaFromNumpy() ndarray dim 1 = 672
jetson.utils – cudaFromNumpy() ndarray dim 2 = 4
[cuda] cudaEventRecord(mEventsGPU[evt], mStream)
[cuda] invalid resource handle (error 33) (hex 0x21)
[cuda] /home/yumor/jetson-inference/c/tensorNet.h:441
[cuda] cudaGetLastError()
[cuda] invalid resource handle (error 33) (hex 0x21)
[cuda] /home/yumor/jetson-inference/c/
[cuda] cudaPreImageNetNormBGR((float4*)rgba, width, height, mInputCUDA, mWidth, mHeight, make_float2(-1.0f, 1.0f), GetStream())
[cuda] invalid resource handle (error 33) (hex 0x21)
[cuda] /home/yumor/jetson-inference/c/detectNet.cpp:637
[TRT] detectNet::Detect() – cudaPreImageNetNorm() failed”

and I have tried to convert the zed camera image to Float4 by using pyopencl but the error still persists.
Please help!


CUDA error 33 indicates the invalid resource handle.
A common cause is that mix-matching the memory buffer type.

Could you check which buffer type do your camera create, is it a CPU or GPU buffer?
And make sure you use the identical buffer type in the jetson_inference.


Thank you for your reply.

I updated the Zed SDK to 2.8.4, the newer version of this camera SDK, but it did not remove the error.
Finally, I found the order of defing Zed and net objects occurs error 33 in my case. I don’t know its reason! I should define the Zed object at first and then create the detect_net object!

Hope this helps others!