Fine tuning Yolov8s For just a person #14331
Replies: 1 comment
-
@memoriesbytalha hello! No worries at all, we're here to help! To fine-tune YOLOv8 to detect only the "person" class, you can indeed freeze the other classes during training. Here’s how you can achieve this:
Here’s a code snippet to illustrate this: from ultralytics import YOLO
# Load the pre-trained model
model = YOLO('yolov8s.pt')
# Train the model, freezing the first N layers
model.train(data='path/to/your/dataset.yaml', epochs=50, freeze=10, classes=[0]) In this example:
For more detailed guidance, you can refer to our documentation on training. Feel free to reach out if you have more questions. Happy training! 🚀 |
Beta Was this translation helpful? Give feedback.
-
Hey there Yolo Fam!
I am sorry i've been asking alot of questions.
I want to finetune my yolo model to just detect the person , I can hard code by passing the parameter as classes_to_count = [0] but I want to freeze all the the rest classes and fine tune just this one.
Beta Was this translation helpful? Give feedback.
All reactions