Skip to content
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

Image size #456

Closed
sanazss opened this issue Aug 15, 2019 · 9 comments
Closed

Image size #456

sanazss opened this issue Aug 15, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@sanazss
Copy link

sanazss commented Aug 15, 2019

Hi, Thanks again for your wonderful work. I have a question regarding image size in yolov3. The default in training and testing is 416 and there is augmentation for resizing the image in dataset.py. Are images resized to 416. For example if I have an image size of 256 then the size would be changed to 426 in the network?thanks

@sanazss sanazss added the enhancement New feature or request label Aug 15, 2019
@glenn-jocher
Copy link
Member

Yes all images are letterboxed (resized and padded) to img-size during training.

@sanazss
Copy link
Author

sanazss commented Aug 15, 2019

Thank you for your reply. So if I train by img-size 256 all images will be 256 or 416?

@glenn-jocher
Copy link
Member

glenn-jocher commented Aug 15, 2019

@sanazss python3 train.py --img-size 256 will resize all of your images to 256x256 with padding added to the short side. Aspect ratio is maintained. See #232 (comment)

@sanazss
Copy link
Author

sanazss commented Aug 15, 2019

Thanks. So if all my images are same size I don’t need to apply the letterbox for padding. Right?

@glenn-jocher
Copy link
Member

@sanazss letterboxing is automatically applied if needed. If not needed its not applied.

@sanazss
Copy link
Author

sanazss commented Aug 18, 2019

Thank you for your answer Glenn. I have another question about the configuration file. I use yolov3-1cls cfg file which has an image size of 416. so does that mean the input image size would be resized to 416 in the network? should change the image size in cfg file?

@glenn-jocher
Copy link
Member

@sanazss the training settings in the cfg are not used. cfg is only used to define model architecture. Training settings are defined in train.py.

@glenn-jocher
Copy link
Member

@joel5638 python detect.py --img 608

@glenn-jocher
Copy link
Member

@joel5638 hmm I don't understand. Are running python on the edge device? Is this iOS or Android?

The normal worflow would be to export to onnx, and then from there to coreml or tflite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants