dusty-nv / jetson-inference

Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
https://developer.nvidia.com/embedded/twodaystoademo
MIT License
7.81k stars 2.98k forks source link

jetson nano(4G):Script detectnet.py stopped and that videoSource failed to capture image(using V4L2 camera) #1358

Closed tonylau2010 closed 2 years ago

tonylau2010 commented 2 years ago

Hi! Would you help me,if similar/same err is occured? Thanks s lot!

When I try to detect objection using the maner as follows: https://github.com/dusty-nv/jetson-inference/blob/master/docs/detectnet-camera-2.md

After that: ./detectnet.py /dev/video0 # V4L2 camera

The Log is as follows:(and the script is stopped,then the new window is crash) detected 1 objects in image

-- ClassID: 1 -- Confidence: 0.937988 -- Left: 0.9375 -- Top: 13.8281 -- Right: 333.75 -- Bottom: 476.484 -- Width: 332.812 -- Height: 462.656 -- Area: 153978 -- Center: (167.344, 245.156) [OpenGL] glDisplay -- set the window size to 640x480 [OpenGL] creating 640x480 texture (GL_RGB8 format, 921600 bytes) [cuda] unknown error (error 999) (hex 0x3E7) [cuda] /home/tony-nano/Downloads/readyZip/jetson-inference/utils/display/glTexture.cpp:360 [TRT] ------------------------------------------------ [TRT] Timing Report networks/SSD-Mobilenet-v2/ssd_mobilenet_v2_coco.uff [TRT] ------------------------------------------------ [TRT] Pre-Process CPU 0.10620ms CUDA 0.95193ms [TRT] Network CPU 4152.17236ms CUDA 4150.15332ms [TRT] Post-Process CPU 0.04583ms CUDA 0.04625ms [TRT] Visualize CPU 12.51637ms CUDA 12.75078ms [TRT] Total CPU 4164.84082ms CUDA 4163.90283ms [TRT] ------------------------------------------------ [TRT] note -- when processing a single image, run 'sudo jetson_clocks' before to disable DVFS for more accurate profiling/timing measurements [cuda] unknown error (error 999) (hex 0x3E7) [cuda] /home/tony-nano/Downloads/readyZip/jetson-inference/utils/cuda/cudaYUV-YUYV.cu:160 [cuda] unknown error (error 999) (hex 0x3E7) [cuda] /home/tony-nano/Downloads/readyZip/jetson-inference/utils/cuda/cudaColorspace.cpp:75 [cuda] unknown error (error 999) (hex 0x3E7) [cuda] /home/tony-nano/Downloads/readyZip/jetson-inference/utils/codec/gstBufferManager.cpp:383 [gstreamer] gstBufferManager -- unsupported image format (rgb8) [gstreamer] supported formats are: [gstreamer] * rgb8 [gstreamer] * rgba8 [gstreamer] * rgb32f [gstreamer] * rgba32f [gstreamer] gstDecoder -- failed to retrieve next image buffer Traceback (most recent call last): File "./tt.py", line 63, in img = input.Capture() Exception: jetson.utils -- videoSource failed to capture image [gstreamer] gstCamera -- stopping pipeline, transitioning to GST_STATE_NULL [gstreamer] gstCamera -- pipeline stopped
dusty-nv commented 2 years ago

Hi @tonylau2010, are you able to run video-viewer.py /dev/video0 ? Can you provide me the full terminal log from it?

You might want to run detectnet.py with --headless flag to see if it's related to the rendering/display.

tonylau2010 commented 2 years ago

@dusty-nv Thanks a Lot for your reply! The log is as follows,when do this: sudo video-viewer.py /dev/video1 tony-nano@tonynano-desktop:~/Downloads/readyZip/jetson-inference/build/aarch64/bin$ sudo video-viewer.py /dev/video1 nvbuf_utils: Could not get EGL display connection [gstreamer] initialized gstreamer, version 1.14.5.0 [gstreamer] gstCamera -- attempting to create device v4l2:///dev/video1

(python3:10444): GStreamer-CRITICAL **: 21:38:51.850: gst_element_message_full_with_details: assertion 'GST_IS_ELEMENT (element)' failed

(python3:10444): GStreamer-CRITICAL **: 21:38:51.851: gst_element_message_full_with_details: assertion 'GST_IS_ELEMENT (element)' failed [gstreamer] gstCamera -- found v4l2 device: USB2.0 Camera [gstreamer] v4l2-proplist, device.path=(string)/dev/video1, udev-probed=(boolean)false, device.api=(string)v4l2, v4l2.device.driver=(string)uvcvideo, v4l2.device.card=(string)"USB2.0\ Camera", v4l2.device.bus_info=(string)usb-70090000.xusb-2.3, v4l2.device.version=(uint)264701, v4l2.device.capabilities=(uint)2216689665, v4l2.device.device_caps=(uint)69206017; [gstreamer] gstCamera -- found 5 caps for v4l2 device /dev/video1 [gstreamer] [0] video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1; [gstreamer] [1] video/x-raw, format=(string)YUY2, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1; [gstreamer] [2] video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1; [gstreamer] [3] video/x-raw, format=(string)YUY2, width=(int)176, height=(int)144, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1; [gstreamer] [4] video/x-raw, format=(string)YUY2, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1; [gstreamer] gstCamera -- selected device profile: codec=raw format=yuyv width=640 height=480 [gstreamer] gstCamera pipeline string: [gstreamer] v4l2src device=/dev/video1 ! video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480 ! appsink name=mysink [gstreamer] gstCamera successfully created device v4l2:///dev/video1 [video] created gstCamera from v4l2:///dev/video1

gstCamera video options:

-- URI: v4l2:///dev/video1

tonylau2010 commented 2 years ago

Reopen now,the problem is still occur

dusty-nv commented 2 years ago

Hmm I'm not entirely sure, what's the camera you are using?

Do you have a different camera you could try?

tonylau2010 commented 2 years ago

Thanks a lot,camera is not supported,changeing one is working.The problem is solved! @dusty-nv