-
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
YOLOv4 image resizing #7349
Comments
See: https://www.ccoderun.ca/programming/darknet_faq/#square_network and https://www.ccoderun.ca/programming/darknet_faq/#time_to_train If your objects become "almost 1 pixel" when you resize to your network dimensions, then Darknet/YOLO wont find them. |
Thank you ! This is answers a lot of questions I had 👍🏼 |
Before reading this I thought yolo keeps aspect ratio, ie. image 1280x720 will be resized to 416x234, and then inserted into 416x416 network. |
You are wrong. As described in the link, it does not maintain aspect ratio. |
If you set letter_box = 1 in [net] section it keeps the aspect ratio (section For training only -> Data augmentation -> letter_box: https://github.com/AlexeyAB/darknet/wiki/CFG-Parameters-in-the-%5Bnet%5D-section) |
Here is the difference between resize and letter_box. |
I am trying to understand the concept of resizing input images to fit network size. I have been through several issues in this Github repository and I haven't seen a clear explanation.
I, let's say, have an image of 1920 x 2000 and the network size is 416 x 416, does that mean the input image will be "compressed/squeezed" into a smaller shape. Wouldn't that mean that small objects might be squeezed into almost 1 pixel ?
If I can have the link to the code sample where the squeezing is performed to further understand this concept, that would be appreciated.
Thank you !
The text was updated successfully, but these errors were encountered: