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

Continue training #13378

Open
1 task done
pjh11214 opened this issue Oct 24, 2024 · 2 comments
Open
1 task done

Continue training #13378

pjh11214 opened this issue Oct 24, 2024 · 2 comments
Labels
question Further information is requested

Comments

@pjh11214
Copy link

Search before asking

Question

How to continue training on the basis of already trained models

Additional

No response

@pjh11214 pjh11214 added the question Further information is requested label Oct 24, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @pjh11214, thank you for reaching out and showing interest in YOLOv5 🚀! Continuing training from a pretrained model is a common task and I'm here to help guide you. An Ultralytics engineer will also assist you soon.

To continue training with an already trained model, you generally need to specify the path to your weight file using the --weights argument when executing the training script. This typically looks something like this:

python train.py --weights path/to/your_weights.pt --cfg path/to/your_custom_config.yaml --data path/to/your_data.yaml --epochs 50

To ensure you've set everything up properly, here's a brief reminder about the environment requirements:

Requirements

Python>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. You can set up your environment as follows:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

If this is a 🐛 bug report, please provide a minimum reproducible example to help us identify the issue. For questions involving custom training, supplying additional information like dataset examples and training logs can be immensely helpful.

Feel free to check out these helpful resources for more detailed guidance:

Explore our new YOLOv8 for advanced features and capabilities:

Introducing YOLOv8 🚀

We're thrilled to present our state-of-the-art model, YOLOv8! Designed for enhanced performance in object detection, segmentation, and classification tasks.

Get started with YOLOv8 by running:

pip install ultralytics

Remember, our community and resources are here to help you succeed with your machine learning endeavors! 🚀

@pderrenger
Copy link
Member

@pjh11214 to continue training an already trained YOLOv5 model, use the --weights argument to specify your model's checkpoint file, like this: python train.py --data your_dataset.yaml --weights path/to/your_model.pt.

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

3 participants