AlexeyAB / darknet

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

Regarding the video detection, why is it so? #7449

Open jayer95 opened 3 years ago

jayer95 commented 3 years ago

@AlexeyAB Regarding the video detection, why is it so?

./darknet detector demo \ data/license_plate/yolov4-tiny-3l-license_plate.data \ cfg/license_plate/yolov4-tiny-3l-license_plate.cfg \ backup/license_plate_mixing/yolov4-tiny-3l/yolov4-tiny-3l-license_plate_last.weights test.mp4 -out_filename yolov4-tiny-3l-608-608.mp4

CUDA-version: 10020 (11000), cuDNN: 7.6.5, CUDNN_HALF=1, GPU count: 2
CUDNN_HALF=1 OpenCV version: 4.5.0 Demo 0 : compute_capability = 610, cudnn_half = 0, GPU: GeForce GTX 1080 Ti net.optimized_memory = 0 mini_batch = 1, batch = 8, time_steps = 1, train = 0

Screenshot-20210302155046-1922x989

But it is normal to use a single image test.

./darknet detector test \ data/license_plate/yolov4-tiny-3l-license_plate.data \ cfg/license_plate/yolov4-tiny-3l-license_plate.cfg \ backup/license_plate_mixing/yolov4-tiny-3l/yolov4-tiny-3l-license_plate_last.weights test.png

3

poornimajd commented 3 years ago

Yeah even I faced this issue,did you find the reason @jayer95 ?

jayer95 commented 3 years ago

@poornimajd No, it should be a problem with darknet.

AlexeyAB commented 3 years ago

Try to use -avgframes 1 flag at the end of your command:

./darknet detector demo data/license_plate/yolov4-tiny-3l-license_plate.data cfg/license_plate/yolov4-tiny-3l-license_plate.cfg backup/license_plate_mixing/yolov4-tiny-3l/yolov4-tiny-3l-license_plate_last.weights test.mp4 -out_filename yolov4-tiny-3l-608-608.mp4 -avgframes 1

jayer95 commented 3 years ago

@AlexeyAB Thank you for the perfect solution to this problem. Regarding this parameter "-avgframes 1", where should I find the relevant instructions from AlexeyAB/daeknet? Because I searched with Ctrl+F and I did not find the relevant instructions. Is there any documentation for these hidden parameters?

yolov4-tiny-3l-608-608 mp4_20210510_225604 916

@poornimajd You can refer to it. This problem is caused by image decoding, because there has never been a similar problem in the products I wrote myself.

@AlexeyAB Could you please take a look at my other question by the way? Is there a recommended YOLO network model suitable for detecting the characters on the license plate? The smaller the network input shape, the faster it will be. https://github.com/AlexeyAB/darknet/issues/7641#issuecomment-831015402

stephanecharette commented 3 years ago

Is there a recommended YOLO network model suitable for detecting the characters on the license plate? The smaller the network input shape, the faster it will be.

See the DarkPlate project: