-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
When you receive new data, is it good practice to train the previously trained model only with these new data? Would training a new model with all the data yield better results? What is the most appropriate practice? #13107
Comments
👋 Hello @RichterV, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. 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. RequirementsPython>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. To get started: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit. Introducing YOLOv8 🚀We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 🚀! Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects. Check out our YOLOv8 Docs for details and get started with: pip install ultralytics |
@RichterV hello, Thank you for your question and for providing detailed context! When it comes to incorporating new data into your model training process, there are a few strategies you can consider:
Best Practice RecommendationFor most use cases, especially if you receive new data regularly, the best practice would be to retrain the model from scratch with all available data. This ensures that the model maintains a comprehensive understanding of the entire dataset, reducing the risk of bias towards newer data. Practical Steps
Here is a simple example of how you might combine datasets and retrain: # Assuming you have your original dataset and new dataset directories
original_data_path = 'path/to/original/data'
new_data_path = 'path/to/new/data'
# Combine datasets (this is a simplified example, ensure proper dataset management)
combined_data_path = 'path/to/combined/data'
os.system(f'cp -r {original_data_path}/* {combined_data_path}')
os.system(f'cp -r {new_data_path}/* {combined_data_path}')
# Train the model with the combined dataset
!python train.py --data combined_data.yaml --cfg yolov5s.yaml --weights '' --epochs 100 If you have any further questions or need additional assistance, feel free to ask. The YOLO community and the Ultralytics team are here to help! |
Thanks for your answer, it helps a lot! |
Hello @RichterV, Thank you for your kind words! I'm glad to hear that the information was helpful to you. 😊 If you have any further questions or run into any issues, please don't hesitate to reach out. The YOLO community and the Ultralytics team are always here to assist you. Remember, for the best training results, it's crucial to ensure your dataset is well-labeled and sufficiently large, and to start with the default settings to establish a performance baseline. If you encounter any bugs or issues, please provide a minimum reproducible code example so we can investigate effectively. You can find more details on how to create one here: Minimum Reproducible Example. Additionally, make sure you are using the latest versions of Good luck with your training, and feel free to share your results or any further questions you might have! |
👋 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 ⭐ |
Search before asking
Question
Considering that I am training a model with images that I already have. If I obtain new images, should I train the new images with the model previously trained, or should I use a new model to train with all the images I currently have? Could training a previously trained model only with the new images bias the model?
What is the most appropriate practice?
Additional
Just to add, I'm training object detection models with YOLO and receive new images every month. I'm not sure whether it's correct to retrain everything or just train with the new images.
The text was updated successfully, but these errors were encountered: