I managed to source
Arducam IMX 219 on Jetson Nano 4GB. Unfortunately, the detect.py file in YOLOv5 runs for a split second and terminates thereafter.
Here is the command I used, to run the
python3 detect.py --source 0 --weights best.pt
I changed the frames-per-second in the detection file to a value that corresponds to the FPS of the camera.
However, I am getting a green screen instead of the live feed in the output. To eliminate the possibility of any hardware issues, I ran a command to check if the camera was working. There were no issues with the camera.
Command Line Error:
Here is my file:
detect.py (10.7 KB)
Is there a way to resolve the green screen issue?
Please run the command and check camera preview. It is to ensure the camera source is good first.
$ gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink
I ran the command to check camera preview. The camera is opening and seems to be working just fine.
Another observation I made when I ran
This is the message that appears on the command line along with green screen.
Could you try to feed the script with the Argus-based GStreamer pipeline to see if it helps?
You can find the command in the below comment:
Could you try if the following command works?
(It uses ’ … ’ to wrap the pipeline command)
$ ./darknet detector demo data/obj.data cfg/yolov4-obj.cfg weights/yolov4-obj_3000.weights 'nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink'
I tried feeding the script with Argus-based GStreamer pipeline by running the suggested command. Unfortunately, there is no improvement.
Please check if you can run this and see good camera preview:
OpenCV Video Capture with GStreamer doesn't work on ROS-melodic - #3 by DaneLLL
From the log, it looks like it fails to run this gstreamer pipeline:
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! appsink
I ran the following command to check camera preview:
gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1’ ! nvoverlaysink
The camera opens successfully.
However, I get an error when I try to source the same with the
I tried to source camera using three different commands and ended up with the following errors:
Do you run this sample:
yolov5/detect.py at master · ultralytics/yolov5 · GitHub
If you run this sample, please use USB camera. The sample doesn’t support Bayer sensors which use
July 28, 2022, 10:53pm
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.