ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
51.2k stars 16.43k forks source link

Question about annotation when we combine multiple dataset ? #3096

Closed hoangkhoiLE closed 3 years ago

hoangkhoiLE commented 3 years ago

❔Question

Hi Glen Jocher,

I have a question, I want to combine a dataset having annotation of car truck, motor with another dataset having only annotation of motor. Do you think this combination will affect the result of car and truck ?

Additional context

Combine multiple dataset

glenn-jocher commented 3 years ago

@hoangkhoiLE all instances of all classes must be labelled in your dataset, partial labelling will not work. Full recommendations for best training results are below, good luck!

👋 Hello! Thanks for asking about improving training results. Most of the time good results can be obtained with no changes to the models or training settings, provided your dataset is sufficiently large and well labelled. If at first you don't get good results, there are steps you might be able to take to improve, but we always recommend users first train with all default settings before considering any changes. This helps establish a performance baseline and spot areas for improvement.

If you have questions about your training results we recommend you provide the maximum amount of information possible if you expect a helpful response, including results plots (train losses, val losses, P, R, mAP), PR curve, confusion matrix, training mosaics, test results and dataset statistics images such as labels.png. All of these are located in your project/name directory, typically yolov5/runs/train/exp.

We've put together a full guide for users looking to get the best results on their YOLOv5 trainings below.

Dataset

COCO Analysis

Model Selection

Larger models like YOLOv5x and YOLOv5x6 will produce better results in nearly all cases, but have more parameters, require more CUDA memory to train, and are slower to run. For mobile deployments we recommend YOLOv5s/m, for cloud deployments we recommend YOLOv5l/x. See our README table for a full comparison of all models.

YOLOv5 Models

Training Settings

Before modifying anything, first train with default settings to establish a performance baseline. A full list of train.py settings can be found in the train.py argparser.

Further Reading

If you'd like to know more a good place to start is Karpathy's 'Recipe for Training Neural Networks', which has great ideas for training that apply broadly across all ML domains: http://karpathy.github.io/2019/04/25/recipe/

hoangkhoiLE commented 3 years ago

Thank a lot for your work and sharing !!

glenn-jocher commented 3 years ago

@hoangkhoiLE no problem! As long as everything is labelled correctly you can combine as many datasets as you want into a single train or validate set. See GlobalWheat2020.yaml for an example of this: https://github.com/ultralytics/yolov5/blob/60fe54449d67827132c56d65db722525fe78f4c9/data/GlobalWheat2020.yaml#L9-L27