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 #11955

Closed
1 task done
inginfor opened this issue Aug 8, 2023 · 6 comments
Closed
1 task done

image size #11955

inginfor opened this issue Aug 8, 2023 · 6 comments
Labels
question Further information is requested Stale

Comments

@inginfor
Copy link

inginfor commented Aug 8, 2023

Search before asking

Question

When training a YOLOv5s model by specifying the image size, the image size should be the actual size of the images in the dataset or the size to which you want to resize before inputting them to the network?

I have images that have different sizes and I would like to resize them to 640, which would be the size of yolov5's input. This is already done automatically, if you run the command !python train.py --img 640 will the images be automatically resized?

Additional

No response

@inginfor inginfor added the question Further information is requested label Aug 8, 2023
@glenn-jocher
Copy link
Member

@inginfor when training a YOLOv5 model, the --img parameter specifies the input resolution of the images, which is the size to which you want to resize the images before inputting them to the network. If you run the command python train.py --img 640, the images will be automatically resized to a resolution of 640x640.

In your case, if you have images with different sizes and you want to resize them to 640x640, setting --img 640 will resize the images to the desired resolution during training.

@inginfor
Copy link
Author

inginfor commented Aug 8, 2023

thanks and sorry for the question

@glenn-jocher
Copy link
Member

@inginfor you're welcome! No need to apologize for asking questions. We're here to help. If you have any more questions, feel free to ask.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

@github-actions github-actions bot added the Stale label Sep 8, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
@nealresearch
Copy link

Hi, So when we resize our image with varying size to 640 then the polygon(for segmentation) are also scaled to match the resized image, correct?

@glenn-jocher
Copy link
Member

Yes, when images are resized to 640x640, the polygons for segmentation are also scaled accordingly to match the resized images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

3 participants