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.