THU-MIG / yolov10

YOLOv10: Real-Time End-to-End Object Detection [NeurIPS 2024]
https://arxiv.org/abs/2405.14458
GNU Affero General Public License v3.0
9.7k stars 935 forks source link

max_det problem #396

Open aliva-ksu opened 2 months ago

aliva-ksu commented 2 months ago

Even if i set the max_det value to 3000 for yolov10, it is not showing more than 300 detection per image. my images have around 800 to 1000 objects per image. the same configuration worked well on yolov8. Here is the code for prediction below:

predictions_count = [] for image_path in glob.glob(dataset directory path): model = YOLO(my model path) # build a new model from YAML

results = model(source = image_path,
                conf = 0.25,
                max_det = 3000,
               imgsz = 3200, device = 0)

names = model.names
print(names)
obj_id = list(names)[list(names.values()).index('seed')]
count = results[0].boxes.cls.tolist().count(obj_id)
print(count)
github-yizhang commented 1 month ago

try lower conf? After max_det,the conf will remove boxes which confidence is lower than conf.