How many Pre-training Epochs for YOLO11n on COCO/VOC for 4-Class Vehicle Detection (Edge Devices) should I chose empirically?

I’m a machine learning beginner working on a 4-class vehicle detection task (car, truck, motorcycle, bus) using the YOLO11n.yaml configuration for edge-device deployment. I plan to pre-train the model on either COCO or VOC datasets but am unsure about the optimal number of epochs. Could experienced practitioners share insights on the following?

What’s the typical epoch range for pre-training YOLO11n on COCO/VOC? Should this vary based on model complexity (e.g., YOLO11n’s lightweight design), dataset size, or edge-device constraints?

Why not use the existing pretrained YOLO models?

1 Like

Thank you for the suggestion :heart_hands: . You are absolutely right that using an existing pre-trained model is the standard and most efficient approach.

The reason :backhand_index_pointing_right: I’m looking into conducting the pre-training phase myself is to establish a controlled and consistent experimental baseline for my research. By managing the entire pipeline—from pre-training on a large dataset like COCO/VOC to fine-tuning on my specific 4-class vehicle dataset—I can ensure that all subsequent comparisons (e.g., different fine-tuning strategies, quantization techniques for the edge) are fair and directly attributable to the variables I’m testing.

What’s the typical epoch range for pre-training YOLO11n on COCO/VOC?

I know it’s generally ~300-500 epochs for COCO, not certain for VOC but probably somewhat similar

Should this vary based on model complexity (e.g., YOLO11n’s lightweight design)

Yes, generally larger models take longer to train

dataset size

Yes, a larger and more varied dataset will (at least should) take longer to train

edge-device constraints

You shouldn’t be training models using edge devices, so no.

1 Like

thank you :heart_hands:

Glad it helped! For a clean, reproducible YOLO11n pretrain baseline:

  • COCO: start at ~300 epochs with early stopping; extend only if val mAP is still improving. VOC is smaller, so ~150–300 is usually enough. Details are in the training best practices (epochs and early stopping) guide.
  • Edge-device constraints don’t change pretrain scheduling; handle them later via export/quantization.

Example COCO pretrain from scratch (reproducible):

yolo detect train model=yolo11n.yaml data=coco.yaml epochs=300 pretrained=False batch=-1 amp=True cos_lr=True patience=75 seed=0 deterministic=True

Optional vehicle-only pretrain on COCO classes: add classes=2,3,5,7 (car, motorcycle, bus, truck). Note: VOC does not have a dedicated “truck” class.

If you need knobs and defaults, see the Train settings reference.

1 Like

Thanks! I’ve learned some new training tricks. I didn’t know about the simple syntax like classes=2,3,5,7 . Before this, I had written a separate script to extract the vehicle dataset.