I'm new to YOLOv8, I just want the model to detect only some classes, not all the 80 classes the model trained on. How can I specify YOLOv8 model to detect only one class? For example only person.
from ultralytics import YOLO
model = YOLO('YOLOv8m.pt')
I remember we can do this with YOLOv5, but I couldn't do same with YOLOv8:
model = torch.hub.load("ultralytics/yolov5", 'custom', path='yolov5s.pt')
model.classes = [0] # Only person
model.conf = 0.6