AlexeyAB / darknet

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

Should the number of anchor pairs be increased for small object detection #6393

Open anant15 opened 4 years ago

anant15 commented 4 years ago

Hi, I am currently using yolov3 on a custom dataset of a restaurant kitchen. I am having very decent results on some classes but the mAP for the objects which are smaller objects and surrounded by noisy background. To give an example below, there are a lot of misses in detecting the hands of the person, and the confidence score for the detected hands are relatively lesser than those of hands and person.

image

The mAP score for different classes are as follows:

image

A senior friend of mine has suggested increasing the anchor pairs from 9 to 15, and probably add more anchors on the last yolo layer. He has also suggested adding an upsample layer in the end of last yolo layer. Should I go with his suggestions? If yes, what are changes in mask and anchors in the cfg are required to be done to settle more anchors.

15 anchor pairs for my dataset 6, 1, 9, 16, 14, 20, 14, 29, 24, 28, 20, 40, 31, 44, 36, 76, 32,126, 55, 96, 51,152, 60,233, 95,175, 82,291, 119,306

Any other suggestion to improve the detection of hand class will also be appreaciated. Thanks.

Yogerlan commented 4 years ago

Try yolov3_5l.cfg instead of yolov3.cfg. This variant contains 2 extra [yolo] layer for small objects detections.

anant15 commented 4 years ago

The inference time of this model is relatively high. I can only afford to use the standard yolov3 at best.

On Wed, Aug 5, 2020 at 10:51 AM Yogerlan notifications@github.com wrote:

Try yolov3_5l.cfg instead of yolov3.cfg. This variant contains 2 extra [yolo] layer for small objects detections.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AlexeyAB/darknet/issues/6393#issuecomment-668986319, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDCRT3GJ4UUOVUUFZXX6LLR7DT5XANCNFSM4PR7YODQ .

--

Thanks and Regards, Anant Mittal Researcher, Vehant Technologies Machine Learning Faculty, Coding Elements

duongdqq commented 4 years ago

for mask and anchors in the cfg file. You should read instruction https://github.com/AlexeyAB/darknet at "How to improve object detection "