-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data augmentation zoom #3830
Comments
I was wondering why this isn't part of the darknet augmentation? at least as a cfg option? Might it not be an effective way to help Yolo move towards scale invariance if it saw zoomed in versions of the smaller objects during training? |
jitter= and random=1 in [yolo] layer do these things https://github.com/AlexeyAB/darknet/wiki/CFG-Parameters-in-the-different-layers |
Ah, so I did read those:
So random=1 will essentially blur the whole image - and jitter will randomly crop and also warp the aspect ratio. What are the constraints on the random cropping - how small might the crops go? |
random=1 - will not blur image, it will resize the network (and then resize image to this network size) yes, jitter= will randomly crop, resize and change aspect ratio. |
Is there any way that I could get greater cropping without drastically warping the image? |
Do you want just change the size without changing aspect ratio? |
Well, my dataset is fairly high resolution images - almost 4 times the width and height of the network and it's biased towards objects in the distance, but I want the model to be better at detecting objects closer up. Maybe jitter=0.4 would be ok for the purposes of cropping - I'm a little concerned that it may be too much distortion? |
Rotation augmentation is also required. |
My thinking is - for my dataset, the shapes of the objects never change, they are all rigid squares and rectangles, so jitter augmentation may be counterproductive if it stops the detector from being able to learn that. the zoom/crop effect does sound very useful though, I want the detector to be as scale-invariant as possible. |
Now you can use will resize image
will resize image
|
so to clarify: resize=0.5 will randomly crop away 50% of the area of each image? |
You can see how this works by usig |
Because you get Nan loss. |
|
training/validation/test are the same size. Is letter_box=0 not the default behaviour? |
letter_box=0 is the default behaviour |
What params It seems that your images size are not the same, or aspect ratio of objects are not the same. |
Is anybody aware of a script to augment my data by randomly cropping (zooming in on smaller objects) and adjusting the corresponding bounding boxes annotations accordingly?
The text was updated successfully, but these errors were encountered: