AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.77k stars 7.96k forks source link

Using CPU to detect RTSP real time video stream #6109

Open yancccc opened 4 years ago

yancccc commented 4 years ago

hi, ./darknet detector demo cfg/coco.data cfg/yolov4-tiny.cfg yolov4-tiny.weights rtsp://admin:cqits12345@192.168.1.66:554/h264/ch1/main/av_stream When I use the CPU to detect RTSP video stream can not achieve real-time, is there any way, is it through the loss of frames, how to modify the code to get a frame of three frames, how to operate specifically?

AlexeyAB commented 4 years ago

Compile Darknet with AVX=1 OPENMP=1 DEBUG=0

Set lower width=256 height=256 in cfg-file

Wait for OpenCV-yolov4-tiny release https://github.com/opencv/opencv/issues/17666 and use OpenCV for yolo https://docs.opencv.org/master/da/d9d/tutorial_dnn_yolo.html instead of Darknet

pfeatherstone commented 4 years ago

@AlexeyAB do you recommend using opencv for inference ? If so, is darknet mostly geared towards training yolo models now? Are there any advantages to using darknet vs pytorch for training yolo models ?