Best Approach to Add Custom Objects

Hi,

I would like to add new object classes (fruits and vegetables) to the standard YOLOv8m model. However, I do not want to replace the existing COCO classes — I want to retain all 80 COCO classes and simply add my custom objects.

What would be the best approach to achieve this?

  1. Cascading Networks: Use the standard YOLOv8m for COCO objects and a separately fine-tuned YOLOv8m for fruits and vegetables.
  2. Parallel Networks: Run both models in parallel and merge their results.
  3. Single Network: Fine-tune a YOLOv8m model on a combined dataset containing COCO 2017 + my custom dataset (fruits & vegetables).

Thanks in advance for your help!

The best approach is likely to run separate models. I read that YOLO models should not be trained on datasets where some instances of objects are unlabeled. This means that if you add your own images - containing new object classes - into a combined dataset with something like the COCO dataset, you would need to check and label the COCO images for those new object classes as well.

By using separate models, you can simply label your own dataset with your new objects and use the original model without modification. The trade-off is a performance cost, since you’ll need to run two models during inference.