Green Screen issue on Nvidia Jetson Nano and Arducam IMX219 - YOLOv5

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 detect.py script:

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?

Hi,
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 detect.py script:

This is the message that appears on the command line along with green screen.

Hi,

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:

Thanks.


I tried feeding the script with Argus-based GStreamer pipeline by running the suggested command. Unfortunately, there is no improvement.

Hi,
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 detect.py file.
I tried to source camera using three different commands and ended up with the following errors:

Command 1:

Command 2:

Command 3:

Hi,
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 nvarguscamerasrc

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