AlexeyAB / darknet

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

loose bounding boxes problem #4449

Open PROGRAMMINGENGINEER-NIKI opened 4 years ago

PROGRAMMINGENGINEER-NIKI commented 4 years ago

Hi @AlexeyAB

I trained the network to detect my target objects which are a circle shape. I want the predicted bounding boxes to be tight, do not want them to be loose. the problem is that when circles get bigger or smaller, the network outputs loose boxes. My question is how can I fix this scaling problem?

Thank you,

AlexeyAB commented 4 years ago

Can you show examples, what do you want? and what do you get?

PROGRAMMINGENGINEER-NIKI commented 4 years ago

I want them to be like this: type 1. https://ibb.co/Cs1Y5Kk

but when Images change to this bounding box gets bigger or smaller. https://ibb.co/pdWJXc1 it seems as if YOLO learns a certain location and size

having said that I used type 1 images to train network and it can draw tight bounding boxes for those images, but when I am testing against type 2, it fails to draw tight boxes and it ends up drawing loose boxes. My question is how can I fix this scaling problem and have tight bounding boxes all the time?

AlexeyAB commented 4 years ago

Attach your cfg-file in zip-archive.

So you want more accuracte bounded boxes.

Try to use yolov3-spp.cfg file https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov3-spp.cfg

And set in each [yolo] layer - and train 2x more iterations than previously

[yolo]
iou_normalizer=0.25
uc_normalizer=0.25
cls_normalizer=1.0
iou_loss=giou
brunoeducsantos commented 4 years ago

Are these parameters specific to your code? Or are they common to original yolo? @AlexeyAB

iou_normalizer=0.25
uc_normalizer=0.25
cls_normalizer=1.0
iou_loss=giou
AlexeyAB commented 4 years ago

Are these parameters specific to your code?

Yes.

brunoeducsantos commented 4 years ago

Thanks @AlexeyAB !