Closed RichterV closed 2 weeks ago
👋 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.
Python>=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
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If 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.
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:
Fine-Tuning with New Data: You can continue training your previously trained model with the new data. This approach, known as fine-tuning, can be effective if the new data is similar to the original dataset. However, if the new data is significantly different, this might lead to overfitting on the new data and potentially degrade the model's performance on the original data.
Training from Scratch with All Data: This approach involves combining your original dataset with the new data and training a new model from scratch. This method ensures that the model learns from the entire dataset, which can help maintain a balanced performance across all data. While this can be more computationally intensive, it often yields better results as the model can generalize better.
Incremental Learning: This is a more advanced approach where the model is designed to learn incrementally from new data without forgetting the previously learned information. This requires more sophisticated techniques and is not natively supported by YOLOv5, but it can be implemented with additional effort.
For 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.
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 torch
and YOLOv5 from our GitHub repository.
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.