AlibabaResearch / efficientteacher

A Supervised and Semi-Supervised Object Detection Library for YOLO Series
GNU General Public License v3.0
820 stars 147 forks source link

yolov5l-ssod 半监督模型论文精度复现问题 #56

Open XuHao777 opened 1 year ago

XuHao777 commented 1 year ago

您好,我想复现论文中的半监督模型检测精度,但训练后mAP@.5:.95为30%,论文中是37.9%,相差比较大,我想问下是什么原因呢

我训练时的config.yaml如下:

project: 'exp_ssod/' adam: False epochs: 300 weights: ''

prune_finetune: False linear_lr: True find_unused_parameters: True

hyp: lr0: 0.01 lrf: 1.0 hsv_h: 0.015 hsv_s: 0.7 hsv_v: 0.4 scale: 0.9 burn_epochs: 220 no_aug_epochs: 0 warmup_epochs: 3 mixup: 0.1 mosaic: 1.0

Model: depth_multiple: 1.00 # model depth multiple width_multiple: 1.00 # layer channel multiple Backbone: name: 'YoloV5' activation: 'SiLU' Neck: name: 'YoloV5' in_channels: [256, 512, 1024] out_channels: [256, 512, 1024] activation: 'SiLU' Head: name: 'YoloV5' anchors: [[10,13, 16,30, 33,23],[30,61, 62,45, 59,119],[116,90, 156,198, 373,326]] # P5/32] Loss: type: 'ComputeLoss' cls: 0.3 obj: 0.7

Dataset: data_name: 'coco_ssod'

coco 10% supervision

train: /home/robot/data/datasets/coco/train2017_p10_labeled_data.txt val: /home/robot/data/datasets/coco/val2017.txt test: /home/robot/data/datasets/coco/val2017.txt target: /home/robot/data/datasets/coco/train2017_p10_unlabeled_data.txt

nc: 80 # number of classes np: 0 #number of keypoints

names: [ 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush' ] img_size: 640 batch_size: 16 sampler_type: 'normal'

SSOD: train_domain: True nms_conf_thres: 0.1 nms_iou_thres: 0.65 teacher_loss_weight: 3.0 cls_loss_weight: 0.3 box_loss_weight: 0.05 obj_loss_weight: 0.7 loss_type: 'ComputeStudentMatchLoss' ignore_thres_low: 0.1 ignore_thres_high: 0.6 uncertain_aug: True use_ota: False multi_label: False ignore_obj: False pseudo_label_with_obj: True pseudo_label_with_bbox: True pseudo_label_with_cls: False with_da_loss: False da_loss_weights: 0.01 epoch_adaptor: True resample_high_percent: 0.25 resample_low_percent: 0.99 ema_rate: 0.999 cosine_ema: True imitate_teacher: False ssod_hyp: with_gt: True mosaic: 1.0 cutout: 0.5 autoaugment: 0.5 scale: 0.8 degrees: 0.0 shear: 0.0

另外,在过了220个epoch之后,map精度迅速下降,这也是正常的嘛

ttaohe commented 1 year ago

burn-in 220 epochs的精度大约只有30%,但是到unlabelled data一起训练时开始会有精度下降,不过后面又会涨上来。我目前可以实现论文的精度,burn-in 的epochs我设置为10,我发现源码里面设置的是0

XuHao777 commented 1 year ago

burn-in 220 epochs的精度大约只有30%,但是到unlabelled data一起训练时开始会有精度下降,不过后面又会涨上来。我目前可以实现论文的精度,burn-in 的epochs我设置为10,我发现源码里面设置的是0

感谢,我重新设置epoch再试一下

Nioolek commented 1 year ago

burn-in 220 epochs的精度大约只有30%,但是到unlabelled data一起训练时开始会有精度下降,不过后面又会涨上来。我目前可以实现论文的精度,burn-in 的epochs我设置为10,我发现源码里面设置的是0

感谢,我重新设置epoch再试一下

你好,想请问下,在修改了burn-in epoch后你复现论文精度了吗?