AlexeyAB / darknet

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

Mismatch in Object detection Between an Image and A video #6747

Open anusha657 opened 4 years ago

anusha657 commented 4 years ago

Why there is a mismatch in detection (wrt bounding box position on object or confidence values ) by yolov4 when we give the input as video compared with the scenario when input is an image.

Note : Here In the Video Output file .avi , Only 1 Instance of the video (i.e Frame - paused the video) is used for comparison

CASE 1 -When Input is Image Command Used - !./darknet detector test cfg/coco.data cfg/yolov4.cfg /content/drive/My\ Drive/Colab\ Notebooks/yolov4.weights -thresh 0.5 -dont_show Console Output - PFA (Image Console Output ) Output Image - PFA ( first_Image_thresh_0.5 Image_Console_Output.txt first_Image_thresh_0 5

CASE 2 -When Input is Video Command Used - !./darknet detector demo cfg/coco.data cfg/yolov4.cfg /content/drive/My\ Drive/Colab\ Notebooks/yolov3.weights -thresh 0.5 -dont_show /content/darknet/output_Side.mp4 -i 0 -out_filename outyolov3_thresh.avi
Console Output - PFA (Video_Console_Output ) Output Image - PFA ( first_video_yolov4_th_0.5 ) Video_Console_Output.txt first_video_yolov4_th_0 5

AlexeyAB commented 4 years ago

Run detection on video with -avgframes 1 flag

./darknet detector demo cfg/coco.data cfg/yolov4.cfg /content/drive/My\ Drive/Colab\ Notebooks/yolov3.weights -thresh 0.5 -dont_show /content/darknet/output_Side.mp4 -i 0 -avgframes 1 -out_filename outyolov3_thresh.avi