AlexeyAB / darknet

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

FPS | yolov4 #6773

Open anusha657 opened 3 years ago

anusha657 commented 3 years ago

How to increase the FPS value in yolov4 ?

stephanecharette commented 3 years ago

What platform? How did you build? What FPS are you getting? What size network? What size video? Are you using a GPU? Which one? Have you considered the "tiny" models?

anusha657 commented 3 years ago

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

What platform? - Linux Platform How did you build? - currently using google collab to build the code . What FPS are you getting? - 26 What size network? - Not sure What size video? - 10.7 MB Are you using a GPU? Which one? - NVIDIA GPU Have you considered the "tiny" models? - No , currently using yolov4.cfg

PFA - Console Output FPS_Console_Output.txt

stephanecharette commented 3 years ago

"Size" means the dimensions.

To get the highest FPS, each frame size should match the network dimensions in the .cfg file. Otherwise, each frame needs to be resized before it is processed.

anusha657 commented 3 years ago

In the configuration file (yolov4.cfg) - Details are as below

[net] batch=64 subdivisions=8

Training

width=512

height=512

width=608 height=608 channels=3 momentum=0.949 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1

Currently I am using video as input , However each frame dimension is 1920 x 1080

stephanecharette commented 3 years ago

width=608 height=608 ... Currently I am using video as input , However each frame dimension is 1920 x 1080

This means every 1920x1080 frame must be resized/stretched to 608x608 before Darknet can process it.

anusha657 commented 3 years ago

I changed the frame width and height of the video to 608x608 (PFA). Input_Video_Properties

However still the FPS remains same (almost same range ). (PFA )

FPS_CONSOLE_OUTPUT_after_resizing.zip

lsd1994 commented 3 years ago

FPS depends on width and height in cfg file.