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

提升训练速度 #12943

Closed
1 task done
2375963934a opened this issue Apr 18, 2024 · 2 comments
Closed
1 task done

提升训练速度 #12943

2375963934a opened this issue Apr 18, 2024 · 2 comments
Labels
question Further information is requested Stale

Comments

@2375963934a
Copy link

Search before asking

Question

怎么可以提高yolov5-seg模型的训练速度,调用了GPU,但是利用率很低,3070ti的显卡训练八千张图片一轮需要九分钟

Additional

No response

@2375963934a 2375963934a added the question Further information is requested label Apr 18, 2024
@glenn-jocher
Copy link
Member

@2375963934a hello! Thanks for reaching out. 😊 To boost your YOLOv5-seg model training speed with a low GPU utilization issue, here are a few tips that might help:

  1. Batch Size: Increase your batch size as much as your GPU memory allows. This often leads to better GPU utilization.
  2. Workers: Increase the number of workers in your dataloader. Try setting it to 2x the number of your CPU cores.
  3. Mixed Precision Training: Use mixed precision training by setting --amp flag, which can significantly improve training speed with minimal impact on accuracy.
  4. Image Size: Training on smaller images can speed things up. Ensure the size is divisible by 64 (e.g., 640, 320).
  5. Optimizer: Experiment with different optimizers. Sometimes, changing the optimizer can affect training speed.

Code snippet example for training command with mixed precision:

python train.py --img 640 --batch 16 --epochs 100 --data your_dataset.yaml --weights yolov5s.pt --amp

Adjust the parameters according to your specific hardware and dataset for optimal performance. 🚀

Remember, finding the right balance specific to your setup might require a bit of experimentation. Good luck!

Copy link
Contributor

👋 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 May 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
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

2 participants