Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About mAP #111

Open
Godk02 opened this issue May 29, 2024 · 9 comments
Open

About mAP #111

Godk02 opened this issue May 29, 2024 · 9 comments

Comments

@Godk02
Copy link

Godk02 commented May 29, 2024

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
Copy link
Collaborator

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
Copy link
Author

Godk02 commented May 29, 2024

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
Copy link
Author

Godk02 commented May 29, 2024

image

@Sunny20236
Copy link

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
Copy link
Collaborator

jameslahm commented May 29, 2024

@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
Copy link

Sompote commented May 29, 2024

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

@salwaghanim
Copy link

@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

@jameslahm
Copy link
Collaborator

jameslahm commented May 30, 2024

@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 #100 (comment)? 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
Copy link

clw5180 commented May 30, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants