I trained the yolo11n.pt model on custom data, focusing specifically on the ‘person’ class with class ID 0. The training process completed successfully, producing both best.pt and last.pt checkpoint files. However, during inference using best.pt, only the ‘person’ class is detected, while the remaining classes are not. This is despite including all 80 COCO class names in the .yaml configuration file.
During training all the weights of the model are updated and the classification head is replaced with a new one. If you trained your model using only images with “person” annotated, it’s likely the model will no longer detect the other classes. When training you’ll need to include all data you wish the model to detect when deployed.
It’s a common misconception that it’s possible to “extend” model training. The term “fine-tuning” from LLMs, is used inappropriately when it comes to training CNN models. If the data containing the classes you wish to detect aren’t present during the last training, the model won’t likely be able to detect them. You can retrain the model using the original COCO data + your custom data if you want to retain all classes. You can search the forums for similar questions and you will find the this has been discussed quite frequently.