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.59k stars 914 forks source link

About mAP #111

Open Godk02 opened 4 months ago

Godk02 commented 4 months ago

I created the yolov10 virtual environment as officially given and trained my dataset from scratch with v10-x and the mAP is not even as good as v5?

jameslahm commented 4 months ago

Thanks for your interest! Could you please provide more details? Do you use the updated checkpoints? The updated checkpoints include the training hyperparameters. May that have an impact?

Godk02 commented 4 months ago

Thanks for your interest! Could you please provide more details? Do you use the updated checkpoints? The updated checkpoints include the training hyperparameters. May that have an impact?

I did not use pre-trained models and all networks were trained from scratch. And this is my train code: from ultralytics import YOLOv10 model = YOLOv10('/scratch/chenjun3/qiankun/yolov10-main/ultralytics/cfg/models/v10/yolov10x.yaml') results = model.train(data='/scratch/chenjun3/qiankun/yolov10-main/ultralytics/cfg/datasets/dianli.yaml', epochs=150, batch=16 , imgsz=640 , device=[0,1,2,3])

Godk02 commented 4 months ago

image

Sunny20236 commented 4 months ago

My results are also not as good as YOLOv5. I used the YOLOv10-x model and the DOTAv1 dataset. Some other settings are as follows, most of which are default. task=detect, mode=train, model=yolov10x.yaml, data=DOTAv1_15c.yaml, epochs=200, time=None, patience=100, batch=8, imgsz=800, save=True, save_period=-1, val_period=1, cache=False, device=1, workers=8, project=None, name=DOTA_15c, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=False, freeze=None, multi_scale=False, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, vid_stride=1, stream_buffer=False, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, embed=None, show=False, save_frames=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_width=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, bgr=0.0, mosaic=1.0, mixup=0.0, copy_paste=0.0, auto_augment=randaugment, erasing=0.4, crop_fraction=1.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/DOTA_15c

jameslahm commented 4 months ago

@Godk02 @Sunny20236 Thanks.

  1. Are the training hyper-parameters, e.g., data augmentation hyperparameters, the same for yolov10x and yolov8x?
  2. Could you please check the performance gap between the one-to-one head and one-to-many head of yolov10x? To evaluate the performance of one-to-many head of yolov10x, you could apply the same NMS postprocessing as yolov8x for the output of one-to-many head. If the performance gap between the one-to-one head and one-to-many head of yolov10x is large, we thought that the reason may lie in the insufficient and unconverged training and you could try to increase the training epochs.
Sompote commented 4 months ago

I also use 10x as well. Training from scratch. The mAP is lower than Yolo5.

salwaghanim commented 4 months ago

@Sompote @Godk02 @Sunny20236 Hello, For training YOLOV8 and later custom dataset creation is bit tricky, since Yolo have changed the learning process. in my experience later models needs more data on the classes as well as you should have at least 10% of your images backgrounds for various scenarios your model will encounter later(the biggest issue in the later models is that the models often predict the background as the class. My advice is to use roboflow to analyse your dataset and fix any potential problems. I was able to surpass yolov5m with yolov8s model, as for yolov10 its supporier to its predecessors except for yolov8 which is better when dealing with smaller or far objects. Someone mentioned in the issue https://github.com/THU-MIG/yolov10/issues/100 mentioned that the image resizing is different while training and inference in yolov10 and this is very big issue especially when dealing with smaller or far objects . to overcome it you should provide resized images for both training and inference later on. I hope that this helps

jameslahm commented 4 months ago

@salwaghanim Thanks for your detailed explanation and great help! Could you please provide more details about that image resizing is different while training and inference in yolov10? We thought that yolov10 and yolov8 have the same process regarding the image resizing during training and inference. Besides, regarding that yolov8 is better when dealing with smaller or far objects, do you tune the different threshold for yolov10 like in https://github.com/THU-MIG/yolov10/issues/100#issuecomment-2134711611? Thanks a lot!

@Sompote @Godk02 @Sunny20236 Hello, For training YOLOV8 and later custom dataset creation is bit tricky, since Yolo have changed the learning process. in my experience later models needs more data on the classes as well as you should have at least 10% of your images backgrounds for various scenarios your model will encounter later(the biggest issue in the later models is that the models often predict the background as the class. My advice is to use roboflow to analyse your dataset and fix any potential problems. I was able to surpass yolov5m with yolov8s model, as for yolov10 its supporier to its predecessors except for yolov8 which is better when dealing with smaller or far objects. Someone mentioned in the issue #100 mentioned that the image resizing is different while training and inference in yolov10 and this is very big issue especially when dealing with smaller or far objects . to overcome it you should provide resized images for both training and inference later on. I hope that this helps

clw5180 commented 4 months ago

My results are also not as good as YOLOv5. I tried the YOLOv10-s model on custom dataset.