0


【Visdrone数据集】Visdrone+YOLOv7结果记录

VisDrone+YOLOv7结果

YOLOv7

训练

  • 命令
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 4 --device 0,1,2,3 --sync-bn --batch-size 32 --data data/VisDrone.yaml --img 640 640 --cfg cfg/training/yolov7.yaml  --name yolov7_ --hyp data/hyp.scratch.p5.yaml 

分辨率:

640*640

结果输出所在文件夹:

yolov7_

epoch数量:设置的300 最终跑了140左右

验证集

  • 命令:
python test.py --data data/VisDrone.yaml --img 640 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_/weights/best.pt --name yolov7_val --task val
  • 结果
val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [00:18<00:00,  1.02s/it]
                 all         548       38759       0.596       0.496       0.496       0.285                                                                                            
          pedestrian         548        8844       0.654       0.543       0.577       0.265                                                                                            
              people         548        5125       0.587       0.512       0.494       0.193                                                                                            
             bicycle         548        1287       0.448       0.267        0.26        0.11                                                                                            
                 car         548       14064       0.782       0.839       0.851       0.588                                                                                            
                 van         548        1975       0.615       0.497       0.503       0.348                                                                                            
               truck         548         750       0.631       0.455       0.469       0.307                                                                                            
            tricycle         548        1045       0.504       0.416       0.385       0.214                                                                                            
     awning-tricycle         548         532       0.362       0.199       0.194        0.12                                                                                            
                 bus         548         251       0.784       0.602       0.629       0.436                                                                                            
               motor         548        4886       0.593       0.635       0.596        0.27                                                                                            
Speed: 7.8/2.0/9.8 ms inference/NMS/total per 640x640 image at batch-size 32                                                                                                            
Results saved to runs/test/yolov7_val                                                                                                                                                   

测试集

  • 命令:
python test.py --data data/VisDrone.yaml --img 640 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_/weights/best.pt --name yolov7_test --task test
  • 结果
test: Scanning 'datasets/VisDrone/test_list.cache' images and labels... 1610 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████| 1610/1610 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 51/51 [00:37<00:00,  1.34it/s]
                 all        1610       75102       0.534       0.435       0.411        0.23
          pedestrian        1610       21006       0.559       0.388       0.382        0.15
              people        1610        6376       0.544       0.291       0.276      0.0936
             bicycle        1610        1302       0.371       0.198       0.171      0.0706
                 car        1610       28074       0.744       0.798       0.791       0.495
                 van        1610        5771       0.526        0.45       0.439       0.289
               truck        1610        2659       0.565       0.524       0.524       0.332
            tricycle        1610         530       0.335       0.374       0.253       0.135
     awning-tricycle        1610         599       0.423        0.27       0.235       0.136
                 bus        1610        2940       0.754       0.585       0.633       0.441
               motor        1610        5845       0.518       0.467       0.407       0.158
Speed: 7.8/1.2/9.0 ms inference/NMS/total per 640x640 image at batch-size 32
Results saved to runs/test/yolov7_test

YOLOv7 修改数据增强部分

训练

  • 命令
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 4 --device 0,1,2,3 --sync-bn --batch-size 16 --data data/VisDrone.yaml --img 640 640 --cfg cfg/training/yolov7.yaml  --name yolov7_2 --hyp data/hyp.scratch.p5.yaml   

分辨率:

640*640

结果输出所在文件夹:

yolov7_25

epoch数量:设置的300
修改部分:

  • 运用cutout
# Apply cutouts
if random.random() < 0.3:
    labels = cutout(img, labels)
  • hyp
lr0: 0.01  # initial learning rate (SGD=1E-2, Adam=1E-3)
lrf: 0.1  # final OneCycleLR learning rate (lr0 * lrf)
momentum: 0.937  # SGD momentum/Adam beta1
weight_decay: 0.0005  # optimizer weight decay 5e-4
warmup_epochs: 3.0  # warmup epochs (fractions ok)
warmup_momentum: 0.8  # warmup initial momentum
warmup_bias_lr: 0.1  # warmup initial bias lr
box: 0.05  # box loss gain
cls: 0.3  # cls loss gain
cls_pw: 1.0  # cls BCELoss positive_weight
obj: 0.7  # obj loss gain (scale with pixels)
obj_pw: 1.0  # obj BCELoss positive_weight
iou_t: 0.20  # IoU training threshold
anchor_t: 4.0  # anchor-multiple threshold
# anchors: 3  # anchors per output layer (0 to ignore)
fl_gamma: 0.0  # focal loss gamma (efficientDet default gamma=1.5)
hsv_h: 0.015  # image HSV-Hue augmentation (fraction)
hsv_s: 0.7  # image HSV-Saturation augmentation (fraction)
hsv_v: 0.4  # image HSV-Value augmentation (fraction)
degrees: 0.0  # image rotation (+/- deg)
translate: 0.2  # image translation (+/- fraction)
scale: 0.9  # image scale (+/- gain)
#shear: 0.0  # image shear (+/- deg)
shear: 0.3
perspective: 0.0  # image perspective (+/- fraction), range 0-0.001
#flipud: 0.0  # image flip up-down (probability)
flipud: 0.3  # image flip up-down (probability)
fliplr: 0.5  # image flip left-right (probability)
mosaic: 1.0  # image mosaic (probability)
#mixup: 0.15  # image mixup (probability)
mixup: 0.30
copy_paste: 0.15  # image copy paste (probability)
paste_in: 0.15  # image copy paste (probability), use 0 for faster training
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training

验证集

  • 命令:
python test.py --data data/VisDrone.yaml --img 640 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_25/weights/best.pt --name yolov7_val --task val
  • 结果
val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [00:18<00:00,  1.01s/it]
                 all         548       38759       0.586       0.512       0.504       0.291                                                                                            
          pedestrian         548        8844       0.649       0.546       0.579       0.263                                                                                            
              people         548        5125       0.572       0.528       0.502       0.194                                                                                            
             bicycle         548        1287       0.453       0.258       0.261       0.111                                                                                            
                 car         548       14064       0.774       0.843       0.852       0.587                                                                                            
                 van         548        1975       0.602       0.513       0.519        0.36                                                                                            
               truck         548         750       0.618       0.477       0.486       0.323                                                                                            
            tricycle         548        1045         0.5       0.451       0.401       0.222                                                                                            
     awning-tricycle         548         532       0.346       0.246       0.194       0.119                                                                                            
                 bus         548         251       0.763       0.614        0.64       0.463                                                                                            
               motor         548        4886       0.581       0.647       0.603       0.272                                                                                            
Speed: 7.8/2.1/9.8 ms inference/NMS/total per 640x640 image at batch-size 32                                                                                                            
Results saved to runs/test/yolov7_val2                                                                                                                                                    

测试集

  • 命令:
python test.py --data data/VisDrone.yaml --img 640 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_25/weights/best.pt --name yolov7_test --task test
  • 结果
test: Scanning 'datasets/VisDrone/test_list.cache' images and labels... 1610 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████| 1610/1610 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 51/51 [00:36<00:00,  1.41it/s]
                 all        1610       75102       0.539        0.44       0.421       0.234                                                                                            
          pedestrian        1610       21006       0.566       0.391       0.391       0.154                                                                                            
              people        1610        6376        0.52       0.294       0.274      0.0912                                                                                            
             bicycle        1610        1302       0.403       0.201       0.188       0.076                                                                                            
                 car        1610       28074       0.741       0.803       0.797       0.496                                                                                            
                 van        1610        5771       0.525       0.463       0.451       0.297                                                                                            
               truck        1610        2659       0.586       0.526       0.521        0.33                                                                                            
            tricycle        1610         530       0.349       0.362       0.271        0.14                                                                                            
     awning-tricycle        1610         599        0.44       0.266       0.246       0.136                                                                                            
                 bus        1610        2940       0.743       0.611       0.645       0.446                                                                                            
               motor        1610        5845       0.514       0.488       0.427       0.169                                                                                            
Speed: 8.0/1.2/9.2 ms inference/NMS/total per 640x640 image at batch-size 32         
Results saved to runs/test/yolov7_test2

YOLOv7 第二次修改数据增强部分 使用albumentations

训练

  • 命令
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 4 --device 0,1,2,3 --sync-bn --batch-size 16 --data data/VisDrone.yaml --img 640 640 --cfg cfg/training/yolov7.yaml  --name yolov7_3 --hyp data/hyp.scratch.p5.yaml

分辨率:

640*640

结果输出所在文件夹:

yolov7_3

epoch数量:设置的300
修改部分:albumentations的transform为

self.transform = A.Compose([
    A.CLAHE(p=0.01),
    A.CropAndPad(percent=-0.25,p=0.2),
    A.RandomBrightnessContrast(brightness_limit=0.2, contrast_limit=0.2, p=0.01),
    A.RandomGamma(gamma_limit=[80, 120], p=0.01),
    A.Blur(p=0.01),
    A.MedianBlur(p=0.01),
    A.ToGray(p=0.01),
    A.ImageCompression(quality_lower=75, p=0.01),],
    bbox_params=A.BboxParams(format='pascal_voc', label_fields=['class_labels']))

验证集

  • 命令:
python test.py --data data/VisDrone.yaml --img 640 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_3/weights/best.pt --name yolov7_val --task val
  • 结果
val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [00:18<00:00,  1.01s/it]
                 all         548       38759       0.609       0.492       0.502       0.289                                                                                            
          pedestrian         548        8844       0.692       0.516       0.574       0.262                                                                                            
              people         548        5125        0.61       0.498       0.497       0.192                                                                                            
             bicycle         548        1287       0.473        0.23       0.261       0.111                                                                                            
                 car         548       14064       0.797       0.831       0.852       0.584                                                                                            
                 van         548        1975       0.612       0.502       0.513       0.351                                                                                            
               truck         548         750        0.64       0.454       0.472       0.311                                                                                            
            tricycle         548        1045       0.516       0.431       0.402        0.22                                                                                            
     awning-tricycle         548         532       0.346       0.212       0.199       0.124                                                                                            
                 bus         548         251       0.791       0.625       0.647       0.461                                                                                            
               motor         548        4886       0.609       0.624       0.603       0.275                                                                                            
Speed: 7.8/2.0/9.8 ms inference/NMS/total per 640x640 image at batch-size 32                                                                                                            
Results saved to runs/test/yolov7_val3                                                                                                                                                                                        

测试集

  • 命令:
python test.py --data data/VisDrone.yaml --img 640 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_3/weights/best.pt --name yolov7_test --task test
  • 结果

test: Scanning 'datasets/VisDrone/test_list.cache' images and labels... 1610 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████| 1610/1610 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 51/51 [00:36<00:00,  1.38it/s]
                 all        1610       75102       0.554       0.439       0.425       0.236
          pedestrian        1610       21006       0.588        0.38       0.391       0.153
              people        1610        6376       0.562       0.283       0.277      0.0933
             bicycle        1610        1302       0.419       0.182       0.186      0.0734
                 car        1610       28074       0.749       0.794       0.794       0.494
                 van        1610        5771       0.517       0.467       0.449       0.293
               truck        1610        2659       0.585       0.532       0.529       0.342
            tricycle        1610         530       0.364       0.377       0.274       0.144
     awning-tricycle        1610         599       0.462       0.283       0.265       0.152
                 bus        1610        2940        0.76       0.609       0.651       0.449
               motor        1610        5845        0.53       0.483       0.429       0.169
Speed: 7.9/1.3/9.2 ms inference/NMS/total per 640x640 image at batch-size 32
Results saved to runs/test/yolov7_test3

YOLOv7 修改尺寸为1280*1280 使用multi-scale

训练

  • 命令
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 4 --device 0,1,2,3 --sync-bn --batch-size 4 --data data/VisDrone.yaml --img 1280 1280 --cfg cfg/training/yolov7.yaml  --name yolov7_4 --hyp data/hyp.scratch.p5.yaml  --multi-scale

分辨率:

1280*1280

结果输出所在文件夹:

yolov7_43

epoch数量:设置的300(用于被我神经病改数据集操作,导致提前终止了。。)

验证集

  • 命令 1280
python test.py --data data/VisDrone.yaml --img 1280 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_43/weights/best.pt --name yolov7_val --task val
  • 结果 1280

val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [00:33<00:00,  1.86s/it]
                 all         548       38759       0.651       0.557       0.581       0.353
          pedestrian         548        8844        0.76       0.604       0.677       0.332
              people         548        5125       0.693       0.511       0.548       0.225
             bicycle         548        1287       0.453       0.403       0.391       0.191
                 car         548       14064       0.842       0.863       0.892       0.638
                 van         548        1975       0.642       0.579       0.605       0.436
               truck         548         750       0.631       0.549       0.564       0.392
            tricycle         548        1045       0.594       0.475       0.472       0.279
     awning-tricycle         548         532       0.403       0.325       0.258       0.166
                 bus         548         251       0.815        0.63       0.735       0.551
               motor         548        4886        0.68       0.633       0.663       0.317
Speed: 29.6/3.6/33.2 ms inference/NMS/total per 1280x1280 image at batch-size 32
Results saved to runs/test/yolov7_val4                                                                                                                                                                   
  • 命令 1600
python test.py --data data/VisDrone.yaml --img 1600 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_43/weights/best.pt --name yolov7_val --task val
  • 结果 1600

val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [00:43<00:00,  2.43s/it]
                 all         548       38759        0.67       0.567         0.6       0.367
          pedestrian         548        8844       0.774       0.632        0.71       0.355
              people         548        5125       0.718       0.516       0.567       0.233
             bicycle         548        1287       0.524       0.421       0.427       0.212
                 car         548       14064       0.856       0.863       0.902       0.651
                 van         548        1975       0.671       0.587       0.623       0.453
               truck         548         750       0.633       0.544       0.563       0.393
            tricycle         548        1045       0.576       0.484       0.492       0.294
     awning-tricycle         548         532       0.418       0.308       0.271       0.178
                 bus         548         251       0.828       0.673       0.762       0.571
               motor         548        4886       0.701       0.644       0.683       0.333
Speed: 47.2/3.8/51.0 ms inference/NMS/total per 1600x1600 image at batch-size 32
Results saved to runs/test/yolov7_val5                                                                                                                                            
  • 命令 2240
python test.py --data data/VisDrone.yaml --img 2240 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_43/weights/best.pt --name yolov7_val --task val
  • 结果 2240
val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [01:21<00:00,  4.55s/it]
                 all         548       38759       0.638       0.602       0.607       0.373
          pedestrian         548        8844       0.732       0.685       0.729       0.374
              people         548        5125        0.68       0.558       0.579       0.243
             bicycle         548        1287       0.511        0.44       0.435       0.214
                 car         548       14064       0.836       0.883       0.907       0.661
                 van         548        1975       0.618        0.61       0.628       0.462
               truck         548         750       0.586       0.579        0.56       0.388
            tricycle         548        1045       0.535       0.526       0.495       0.295
     awning-tricycle         548         532       0.413       0.344       0.288       0.189
                 bus         548         251       0.805       0.691       0.752       0.562
               motor         548        4886       0.661       0.702       0.697       0.343
Speed: 110.1/8.1/118.2 ms inference/NMS/total per 2240x2240 image at batch-size 32
Results saved to runs/test/yolov7_val6                                                                                                                   

测试集

  • 命令:
python test.py --data data/VisDrone.yaml --img 1600 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_43/weights/best.pt --name yolov7_test --task test
[yolov7] 0:bash*                    
  • 结果

test: Scanning 'datasets/VisDrone/test_list.cache' images and labels... 1610 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████| 1610/1610 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 51/51 [01:50<00:00,  2.16s/it]
                 all        1610       75102       0.589       0.519       0.508       0.298                                                                                            
          pedestrian        1610       21006       0.634       0.497       0.515       0.216                                                                                            
              people        1610        6376       0.592       0.333       0.344       0.124                                                                                            
             bicycle        1610        1302       0.429       0.308       0.282       0.129                                                                                            
                 car        1610       28074       0.797       0.851       0.863       0.564                                                                                            
                 van        1610        5771       0.602       0.532       0.566       0.395                                                                                            
               truck        1610        2659       0.597       0.633       0.608       0.406                                                                                            
            tricycle        1610         530       0.357       0.483       0.345       0.199                                                                                            
     awning-tricycle        1610         599       0.505       0.348       0.312       0.195                                                                                            
                 bus        1610        2940       0.799       0.637       0.721        0.52                                                                                            
               motor        1610        5845       0.573       0.567       0.521       0.229                                                                                            
Speed: 50.1/2.4/52.4 ms inference/NMS/total per 1600x1600 image at batch-size 32                                                                                                        
Results saved to runs/test/yolov7_test6   

YOLOv7 输入切分四块的照片(过拟合了)

训练

  • 命令
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 4 --device 0,1,2,3 --sync-bn --batch-size 8 --data data/VisDrone.yaml --img 1280 1280  --cfg cfg/training/yolov7.yaml  --name yolov7_split --hyp data/hyp.scratch.p5.yaml  --multi-scale

分辨率:

1280*1280

结果输出所在文件夹:

yolov7_split3

epoch数量:…
过拟合

验证集

  • 命令 1280
python test.py --data data/VisDrone.yaml --img 1280 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_split3/weights/best.pt --name yolov7_val --task val
  • 结果 1280

val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [00:33<00:00,  1.85s/it]
                 all         548       38759       0.656       0.563       0.584        0.36
          pedestrian         548        8844       0.746       0.611       0.675       0.337
              people         548        5125       0.681        0.53       0.561       0.233
             bicycle         548        1287       0.502        0.38       0.395       0.197
                 car         548       14064       0.833       0.865       0.888        0.64
                 van         548        1975       0.662       0.564       0.601       0.438
               truck         548         750       0.648       0.552       0.569       0.395
            tricycle         548        1045       0.609       0.465       0.481       0.293
     awning-tricycle         548         532       0.386       0.342        0.27       0.176
                 bus         548         251       0.819       0.669        0.73       0.562
               motor         548        4886       0.677       0.651       0.673       0.328
Speed: 29.5/3.7/33.2 ms inference/NMS/total per 1280x1280 image at batch-size 32
Results saved to runs/test/yolov7_val7                                                                                                                                               
  • 命令 2016
python test.py --data data/VisDrone.yaml --img 2016 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_split3/weights/best.pt --name yolov7_val --task val
  • 结果 2016
 val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [01:02<00:00,  3.44s/it]
                 all         548       38759       0.659       0.629       0.636         0.4
          pedestrian         548        8844       0.731       0.703        0.74       0.388
              people         548        5125       0.702       0.595       0.617       0.269
             bicycle         548        1287       0.545       0.458       0.472       0.245
                 car         548       14064       0.838       0.892       0.912       0.671
                 van         548        1975       0.654       0.622       0.639       0.476
               truck         548         750        0.65       0.604       0.605       0.423
            tricycle         548        1045       0.585       0.564       0.542       0.332
     awning-tricycle         548         532       0.389       0.391       0.307       0.205
                 bus         548         251       0.815       0.737       0.799       0.618
               motor         548        4886       0.679       0.728       0.728       0.372
Speed: 78.6/4.2/82.9 ms inference/NMS/total per 2016x2016 image at batch-size 32
Results saved to runs/test/yolov7_val14                                                                                                                      

测试集

  • 命令:
python test.py --data data/VisDrone.yaml --img 1280 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_split3/weights/best.pt --name yolov7_val --task test                
  • 结果
test: Scanning 'datasets/VisDrone/test_list.cache' images and labels... 1610 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████| 1610/1610 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 51/51 [01:20<00:00,  1.58s/it]
                 all        1610       75102       0.575       0.507       0.494       0.292                                                                                            
          pedestrian        1610       21006       0.629       0.465       0.479       0.203                                                                                            
              people        1610        6376       0.592        0.31       0.322       0.116                                                                                            
             bicycle        1610        1302       0.438       0.244       0.249       0.115                                                                                            
                 car        1610       28074       0.771       0.847        0.85       0.553                                                                                            
                 van        1610        5771       0.566       0.546       0.546        0.38                                                                                            
               truck        1610        2659       0.592       0.625       0.621       0.421                                                                                            
            tricycle        1610         530       0.381       0.449       0.336       0.193                                                                                            
     awning-tricycle        1610         599       0.464       0.343       0.303        0.19                                                                                            
                 bus        1610        2940        0.75       0.685       0.726       0.531                                                                                            
               motor        1610        5845       0.567       0.556       0.509       0.218                                                                                            
Speed: 32.4/2.2/34.6 ms inference/NMS/total per 1280x1280 image at batch-size 32   
Results saved to runs/test/yolov7_val8        
  • 命令2016
python test.py --data data/VisDrone.yaml --img 2016 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_split3/weights/best.pt --name yolov7_val --task test                
  • 结果2016
test: Scanning 'datasets/VisDrone/test_list.cache' images and labels... 1610 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████| 1610/1610 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 51/51 [02:53<00:00,  3.40s/it]
                 all        1610       75102       0.616       0.537       0.532       0.318
          pedestrian        1610       21006       0.675       0.525       0.552       0.238
              people        1610        6376       0.647       0.337        0.37       0.137
             bicycle        1610        1302       0.484       0.293       0.289       0.139
                 car        1610       28074       0.795       0.864       0.874       0.578
                 van        1610        5771       0.614       0.555       0.576        0.41
               truck        1610        2659       0.631       0.645       0.639       0.438
            tricycle        1610         530       0.403       0.509       0.389       0.232
     awning-tricycle        1610         599       0.508       0.361       0.322       0.206
                 bus        1610        2940       0.779       0.691       0.746        0.55
               motor        1610        5845        0.62       0.595       0.564       0.256
Speed: 86.9/3.7/90.6 ms inference/NMS/total per 2016x2016 image at batch-size 32
Results saved to runs/test/yolov7_val15    

YOLOv7 输入切分四块的照片(第三次修改数据增强 未使用albumentation)

训练

  • 命令
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 4 --device 0,1,2,3 --sync-bn --batch-size 8 --data data/VisDrone.yaml --img 1280 1280  --cfg cfg/training/yolov7.yaml  --name yolov7_split --hyp data/hyp.scratch.p5.yaml  --multi-scale

分辨率:

1280*1280

结果输出所在文件夹:

yolov7_split5

epoch数量:…

验证集

  • 命令 1280
 python test.py --data data/VisDrone.yaml --img 1280 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_split5/weights/best.pt --name yolov7_val --task val    
  • 结果 1280
val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [01:03<00:00,  3.50s/it]
                 all         548       38759       0.602       0.563       0.561       0.344                                                                                            
          pedestrian         548        8844       0.673       0.677       0.688       0.346                                                                                            
              people         548        5125        0.66       0.515       0.542       0.222                                                                                            
             bicycle         548        1287       0.459       0.392       0.354       0.175                                                                                            
                 car         548       14064       0.779       0.901       0.899       0.649                                                                                            
                 van         548        1975       0.566       0.607       0.586       0.429                                                                                            
               truck         548         750       0.581       0.477       0.485       0.326                                                                                            
            tricycle         548        1045       0.556       0.405       0.421       0.256                                                                                            
     awning-tricycle         548         532       0.382       0.306       0.246       0.162                                                                                            
                 bus         548         251       0.727       0.658       0.722       0.544                                                                                            
               motor         548        4886       0.635       0.691       0.673       0.327                                                                                            
Speed: 78.2/6.0/84.1 ms inference/NMS/total per 2016x2016 image at batch-size 32                                                                                                        
Results saved to runs/test/yolov7_val11                                                                                                                                       
  • 结果 2016
val: Scanning 'datasets/VisDrone/val_list.cache' images and labels... 548 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████████████| 548/548 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 18/18 [01:03<00:00,  3.50s/it]
                 all         548       38759       0.602       0.563       0.561       0.344                                                                                            
          pedestrian         548        8844       0.673       0.677       0.688       0.346                                                                                            
              people         548        5125        0.66       0.515       0.542       0.222                                                                                            
             bicycle         548        1287       0.459       0.392       0.354       0.175                                                                                            
                 car         548       14064       0.779       0.901       0.899       0.649                                                                                            
                 van         548        1975       0.566       0.607       0.586       0.429                                                                                            
               truck         548         750       0.581       0.477       0.485       0.326                                                                                            
            tricycle         548        1045       0.556       0.405       0.421       0.256                                                                                            
     awning-tricycle         548         532       0.382       0.306       0.246       0.162                                                                                            
                 bus         548         251       0.727       0.658       0.722       0.544                                                                                            
               motor         548        4886       0.635       0.691       0.673       0.327                                                                                            
Speed: 78.2/6.0/84.1 ms inference/NMS/total per 2016x2016 image at batch-size 32                                                                                                        
Results saved to runs/test/yolov7_val11                                                                                                                                       

测试集

  • 命令:
python test.py --data data/VisDrone.yaml --img 2016 --batch 32   --device 0,1 --weights /disk2/lxs/yolov7/runs/train/yolov7_split5/weights/best.pt --name yolov7_val --task test                
  • 结果
test: Scanning 'datasets/VisDrone/test_list.cache' images and labels... 1610 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████| 1610/1610 [00:00<?, ?it/s]
               Class      Images      Labels           P           R      [email protected]  [email protected]:.95: 100%|█████████████████████████████████████████████████████| 51/51 [02:52<00:00,  3.37s/it]
                 all        1610       75102       0.554       0.475       0.462       0.272
          pedestrian        1610       21006       0.631       0.473       0.494       0.207
              people        1610        6376        0.57       0.279       0.291       0.104
             bicycle        1610        1302       0.433       0.228       0.229       0.103
                 car        1610       28074        0.75       0.858       0.853       0.561
                 van        1610        5771       0.536       0.569       0.557       0.392
               truck        1610        2659       0.562       0.545       0.536       0.351
            tricycle        1610         530       0.338       0.372       0.282       0.163
     awning-tricycle        1610         599       0.446       0.289       0.255       0.163
                 bus        1610        2940       0.748         0.6       0.656       0.474
               motor        1610        5845       0.527       0.537       0.472       0.203
Speed: 86.2/4.8/90.9 ms inference/NMS/total per 2016x2016 image at batch-size 32
Results saved to runs/test/yolov7_val12

本文转载自: https://blog.csdn.net/lxslxslxsllll/article/details/128945361
版权归原作者 少吃蛋糕的倒霉蛋 所有, 如有侵权,请联系我们删除。

“【Visdrone数据集】Visdrone+YOLOv7结果记录”的评论:

还没有评论