stereolabs / zed-yolo

3D Object detection using Yolo and the ZED in Python and C++
https://www.stereolabs.com/
MIT License
157 stars 67 forks source link

ZED Camera not working with darknet - core dump #42

Closed mtbsteve closed 3 years ago

mtbsteve commented 3 years ago

I have darknet/yolov4 installed on a Jetson TX2 running Jetpack 4.4 CUDA 10.2.89; OpenCV 4.1.1, cuDNN 8.0.0.180; Ubuntu 18.04; ZEDSDK 3.4 for Jetpack 4.4.

ZED SDK and zed-ros-wrapper are installed, all ZED tools and the ros-wrapper are running well. darknet runs well with my sample images and video files.

When I launch darknet for the ZED camera with the following command: LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./uselib data/coco.names cfg/yolov4.cfg yolov4.weights zed_camera

I receive the following error:

<truncated lines above>
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05
nms_kind: greedynms (1), beta = 0.600000 
Total BFLOPS 128.459 
avg_outputs = 1068395 
Loading weights from yolov4.weights...
 seen 64, trained: 32032 K-images (500 Kilo-batches_64) 
Done! Loaded 162 layers from weights-file 
object names loaded 
input image or video filename: [ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (711) open OpenCV | GStreamer warning: Error opening bin: no element "zed_camera"
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ERROR:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap.cpp (116) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.1.1) /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): zed_camera in function 'icvExtractPattern'

 Video size: [0 x 0]
 exit_flag: detection_data.cap_frame.size = [0 x 0]
 t_cap exit 
 t_write exit 
 t_network exit 
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.1.1) /home/nvidia/host/build_opencv/nv_opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

Aborted (core dumped)
apsync@apsync:~/GitHub/darknet$ 

any idea?

mtbsteve commented 3 years ago

changed parameters in Makefile solved it.