Add New Classes to (YOLOv8n or YOLO11n) Pretrained Model Without Losing COCO Classes

Hi everyone! :waving_hand:

I’m working on an object detection project for a smart farm surveillance system. I’m using YOLOv8n as my base model, and I would like to add two new custom classes (“fire” and “smoke”) to it.

:wrench: My goal is to:

  • Keep all the 80 original COCO classes
  • Add my own classes on top: class 80 = fire, class 81 = smoke
  • Avoid retraining from scratch (just fine-tune with my own dataset for the new classes)
    Any guidance, tips, or success stories from people who’ve done something similar would be hugely appreciated! :folded_hands:

Thanks in advance!

— Anis Ghabarou
(Working on a Raspberry Pi 4 model b-based surveillance solution)

You can try this but it will make the model slower.

Or you can use YOLOE

1 Like