I have a project for crowd detection and I want to compare yolo pre-trained and my own trained yolo results on a crowd dataset. but when I use the model the results are unreasonably bad, what might be the problem?
this is the custom data yaml:
train: …/train/images
val: …/valid/images
test: …/test/images
The YOLO11 pretrained model doesn’t have head as a class. It uses the COCO dataset which would give results for person and bicycle which won’t be very good on your dataset.
Additionally, it would be good to ensure your annotation files are the correct format, perhaps you could review the val/batch image results in the runs/detect/val3 or runs/detect/val4 directories. If these don’t show any ground truth bounding boxes, this could be a problem.
I tested the default YOLO11s model with COCO with one of your images (took a screenshot with no annotations showing) and here is the result:
Like I mentioned, person will work well since it already exists in the COCO dataset, but not head and specifically not head with an index of 1 since the COCO model was trained for the object bicycle at index 1 see the COCO data YAML.
for comparing purposes I don’t need the head class right now, how can I specify that I want it to detect person only, in regards of the model and the custom dataset?
You will have remap the labels and update the txt files so that the class ID for person in your dataset is 0 because that’s what the pretrained models use for persons.
Right now, it seems head is your first class so it would have class ID 0 and person is second class, so it would have class ID 1.
After remapping, you can pass classes=0 like you did to measure performance on person class.