AlexeyAB / darknet

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

When I set jitter=0.05, I got mAP=0. Why? #6164

Open huizhang2017 opened 4 years ago

huizhang2017 commented 4 years ago

hi, everyone, The parameter jitter is to randomly changes size of image and its aspect ration from x(1-2jitter) to x(1+2jitter). But I do not want to change the size of my image, so I set jitter = 0.05 or 0.01 (if i set jitter=0, it will use default value, that is jetter=0.2), But during training, the calculated mAP is always equal to 0. However, if I set jitter = 0.3, the mAP looks normal, but this jitter value is not what I want. So, could everyone tell me why this happened?

By the way, I have set all the three jitter parameters (in yolov4-custom.cfg), such as all the three jitter is equal to 0.05, or the first jitter is 0.3, the second and third is 0.01, etc, I have tried many cases. But mAP =0 in all these cases. I also use "-show_img" during training to get the augmented images, if I set all jitter=0.01, then the size of the augmented images only changed a little, which is almost what I want, but I got mAP = 0.

Is there any other methods to augment the data but always keep the sizes of the images?

AlexeyAB commented 4 years ago

Or use

[yolo]
jitter=0.3

Or use

[net]
letter_box=1

[yolo]
jitter=0.05

And run detection with flag -letter_box