Darknet exemplo program starts and freezes

hardware:
Jetson nano
webcam logitech c525

My Configuration:
Jetpack 4.5
cuDNN 8.0
CUDA 10.2
OPENCV 4.1.1

MAKEFILE darknet:
GPU =1
CUDNN =1
CUDNN_HALF =1
OPENCV = 1
LIBSO = 1

changed the cfg and weights of darknet_video.py to yolov4 tiny, when running this script starts the camera and instantly freezes. If I close the WEBCAM tab several times the program comes back

follow the video showing this (I don’t know why the footage turned pink)

the lines that I changed in the code:

line 18: parser.add_argument(“–weights”, default=“yolov4-tiny.weights”,

line 24: parser.add_argument(“–config_file”, default=“./cfg/yolov4-tiny.cfg”,

line 178: cap = cv2.VideoCapture(“/dev/video0”)

code edited:
darknet_video.py (6.6 KB)

even if i run the program without editing the same problem occurs.

Hi,

Could you try to read the camera with the below sample to see if it works?

Thanks.

hello, I installed version 4.6 on SD to see if it worked, but it keeps freezing when starting darknet_video.py

so now I’m using version 4.6

To test the example I did:
$ git clone GitHub - NVIDIA-AI-IOT/jetcam: Easy to use Python camera interface for NVIDIA Jetson
$ cd jetcam
$ sudo python3 setup.py install

output:

after:
$ cd jetcam/jetcam
$ sudo python3 usb_camera.py
output:


didn’t work, so this example is written and testing with SD JetCard

“JetCam is tested on a system configured with the JetCard configuration. Different system configurations may require additional steps.”

I know the camera is working, the only problem is that it crashes when running the darknet example

I used this example on my PC and it worked normal, I think it must be some jetpack library that is causing it to freeze

Hi,

It looks like relates to the camera you used.
Could you share the output of the following command?

$ v4l2-ctl --list-formats-ext --all

Thanks.

I changed some program variables and it worked

thanks for the try

Good to know this.
Thanks for the feedback.