pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.69k stars 21.33k forks source link

Data Augmentation in darknet #1408

Open sachinruk opened 5 years ago

sachinruk commented 5 years ago

I was looking at yolov3.cfg for data augmentation parameters and could only find HSV values and angles. Was wondering if there was a parameter for left-right flipping, or up-down for that matter (I might be looking at sattelite data for example).

Also with regards to the angle, is this parameter in degrees or radians?

pachecoberlin commented 5 years ago

Hey @sachinruk , in src/image.c you got the flip_image method, which is called like this: int flip = rand()%2; if(flip) flip_image(image); It is too late right now i cannot distinguish how it is flipped.

Angle is in degree the value will be used for random rotation between -angle and +angle. In src/image.c you got the rotate_crop_image method.

zh7117 commented 5 years ago

yolov3.cfg is used for training object detector. The function for loading the data is at src/data.c/load_data_detection(). It includes random distort hsv, random horizontal flip. angle is not used in training detector.

pachecoberlin commented 5 years ago

@zh7117 correct in detector training it is not used. Sorry for the confusing answer. Thank you for clearing up the flip direction.

shubham-shahh commented 3 years ago

yolov3.cfg is used for training object detector. The function for loading the data is at src/data.c/load_data_detection(). It includes random distort hsv, random horizontal flip. angle is not used in training detector.

Are flips done in ylov4 training? if yes, how can I stop them?

Dimfred commented 3 years ago

Are flips done in ylov4 training? if yes, how can I stop them?

Just write flip=0 in your .cfg under [net].