Train model on new dataset

Hi, there!

I have well trained model YOLO11n for passangers counting (in the bus).

My model was trained on day light dataset (about 4000 pics) and works quite well. Now I need to train this model for night time detection. I have night time dataset over 4500 pics. I see 3 ways to do this:

  1. Join both datasets and train my model from the beginning.
  2. Jion both datasets and train my model using my day-light model as a pretrained.
  3. Train my night model using my day-light model as a pretrained on the night dataset ONLY.

Which of this 3 ways is the most correct?

Thank you for advance.

3 wouldn’t work. 1 is probably the best because it starts from a general model.

1 Like

Thank you!

Glad it helped! If you want one model that works day and night, join both datasets and retrain a single YOLO11n. For best generalization and faster convergence, start from COCO‑pretrained weights (you can also warm‑start from your day model if it converges faster). Make sure your val set includes both day and night, and enable early stopping.

Example:

yolo detect train model=yolo11n.pt data=combined.yaml epochs=200 imgsz=640 patience=20

You can list both day and night image folders in combined.yaml under train/val. A quick refresher on using pretrained weights and early stopping is in the training tips guide, and full options are in the model training docs.

Thank you so much!