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

Model Training Resume with different Image size #12910

Open
1 task done
7Vyshak7 opened this issue May 20, 2024 · 4 comments
Open
1 task done

Model Training Resume with different Image size #12910

7Vyshak7 opened this issue May 20, 2024 · 4 comments
Labels
question Further information is requested

Comments

@7Vyshak7
Copy link

Search before asking

Question

I have trained a yolov8 model on image size 1024 for 20 epochs and stopped. After a while I resumed the model training with different image size of 2048. how will this affect the further training?

Additional

No response

@7Vyshak7 7Vyshak7 added the question Further information is requested label May 20, 2024
Copy link

👋 Hello @7Vyshak7, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher
Copy link
Member

@7Vyshak7 hello! Great question! 🌟

Changing the image size from 1024 to 2048 when resuming training can have a significant impact on your model. Here are a few key points:

  1. Model Adaptation: The model will start adapting to the new image size, which might initially lead to a drop in accuracy as it adjusts to the new input dimensions.
  2. Feature Learning: Higher resolution images could help the model learn more detailed features, potentially improving performance if the model architecture and hardware can handle the increased computational load effectively.
  3. Training Dynamics: You might need to adjust training hyperparameters such as the learning rate or batch size to accommodate the increased image size, especially to manage GPU memory usage efficiently.

Here's a quick example of how you might resume training with a new image size using the CLI:

yolo detect train model=path/to/last.pt imgsz=2048 resume=True

Just ensure your hardware setup can handle the larger image size without running out of memory. Happy training! 🚀

@7Vyshak7
Copy link
Author

7Vyshak7 commented May 22, 2024

@glenn-jocher
Thank you for the quick response. This really helped, and I saw an immediate jump in the mAP values after 2-3 epochs from resuming.

@glenn-jocher
Copy link
Member

@7Vyshak7 Fantastic to hear that the adjustments led to an improvement in your mAP values! 🎉 If you have any more questions or need further assistance as you continue optimizing, feel free to reach out. Happy training! 🚀

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

No branches or pull requests

2 participants