AlexeyAB / darknet

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

Reduce YOLOv3 model size to speed up detection #3442

Open Jarvah opened 5 years ago

Jarvah commented 5 years ago

Hi@AlexeyAB! Thank you for your post! I tried to use yolov3 to detect my dataset on OpenCV, it seems likes still very slow with only CPU. Is there any way to reduce the model size, such as reducing some layers, changing the darknet53 backbone but still retain the Yolo layers with 3 different scales? Since I only need to detect one single class, maybe reducing the model size will not affect the accuracy too much. I have tried tiny-yolov3 also but the accuracy is not so high. Thank you!

primepake commented 5 years ago

You can use some backbone at https://pjreddie.com/darknet/imagenet/

LukeAI commented 5 years ago

opencv-dnn implementations are supposedly very fast for the cpu, or you could try some of the experimental architectures like tiny-pan or yolo-tiny-3l: https://github.com/AlexeyAB/darknet/issues/3114#issuecomment-494148968

I haven't had good results with the experimental architectures but it may work well for your case.