yolov5訓練警告反游標檢測模型日誌
阿新 • • 發佈:2022-05-21
yolov5訓練警告反游標檢測模型日誌
1、標註資料
2、整理資料
3、訓練:修改:myvoc.yaml
myvoc.yamltrain: VOC_2022052001/train.txt
val: VOC_2022052001/val.txt
# number of classes
nc: 1
# class names
names: ["warning"]
4、開始訓練
python train_20220520.py --img-size 640 --batch-size 1 --epochs 300 --data ./data/myvoc.yaml --cfg ./models/yolov5m.yaml --workers 0
(wind_2021) F:\PytorchProject\yolov5_train_warning> (wind_2021) F:\PytorchProject\yolov5_train_warning> (wind_2021) F:\PytorchProject\yolov5_train_warning>python train_20220520.py --img-size 640 --batch-size 1 --epochs 300 --data ./data/myvoc.yaml --cfg ./models/yolov5m.yaml --workers 0 Using torch 1.8.1+cu111 CUDA:0 (NVIDIA GeForce RTX 3080 Laptop GPU, 16383.5MB) Namespace(adam=False, batch_size=1, bucket='', cache_images=False, cfg='./models/yolov5m.yaml', data='./data/myvoc.yaml', device='', epochs=300, evolve=False, exist_ok=False, global_rank=-1, hyp='data/hyp.scratch.yaml', image_weights=False, img_size=[640, 640], local_rank=-1, log_artifacts=False, log_imgs=16, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs\\train\\exp2', single_cls=False, sync_bn=False, total_batch_size=1, weights='yolov5s.pt', workers=0, world_size=1) Start Tensorboard with "tensorboard --logdir runs/train", view at http://localhost:6006/ Hyperparameters {'lr0': 0.01, 'lrf': 0.2, 'momentum': 0.937, 'weight_decay': 0.0005, 'warmup_epochs': 3.0, 'warmup_momentum': 0.8, 'warmup_bias_lr': 0.1, 'box': 0.05, 'cls': 0.5, 'cls_pw': 1.0, 'obj': 1.0, 'obj_pw': 1.0, 'iou_t': 0.2, 'anchor_t': 4.0, 'fl_gamma': 0.0, '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, 'mosaic': 1.0, 'mixup': 0.0} Overriding model.yaml nc=80 with nc=1 from n params module arguments 0 -1 1 5280 models.common.Focus [3, 48, 3] 1 -1 1 41664 models.common.Conv [48, 96, 3, 2] 2 -1 1 65280 models.common.C3 [96, 96, 2] 3 -1 1 166272 models.common.Conv [96, 192, 3, 2] 4 -1 1 629760 models.common.C3 [192, 192, 6] 5 -1 1 664320 models.common.Conv [192, 384, 3, 2] 6 -1 1 2512896 models.common.C3 [384, 384, 6] 7 -1 1 2655744 models.common.Conv [384, 768, 3, 2] 8 -1 1 1476864 models.common.SPP [768, 768, [5, 9, 13]] 9 -1 1 4134912 models.common.C3 [768, 768, 2, False] 10 -1 1 295680 models.common.Conv [768, 384, 1, 1] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 models.common.Concat [1] 13 -1 1 1182720 models.common.C3 [768, 384, 2, False] 14 -1 1 74112 models.common.Conv [384, 192, 1, 1] 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 16 [-1, 4] 1 0 models.common.Concat [1] 17 -1 1 296448 models.common.C3 [384, 192, 2, False] 18 -1 1 332160 models.common.Conv [192, 192, 3, 2] 19 [-1, 14] 1 0 models.common.Concat [1] 20 -1 1 1035264 models.common.C3 [384, 384, 2, False] 21 -1 1 1327872 models.common.Conv [384, 384, 3, 2] 22 [-1, 10] 1 0 models.common.Concat [1] 23 -1 1 4134912 models.common.C3 [768, 768, 2, False] 24 [17, 20, 23] 1 24246 models.yolo.Detect [1, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [192, 384, 768]] Model Summary: 391 layers, 21056406 parameters, 21056406 gradients, 50.4 GFLOPS Transferred 59/506 items from yolov5s.pt Scaled weight_decay = 0.0005 Optimizer groups: 86 .bias, 86 conv.weight, 83 other Scanning 'VOC_2022052001\labels' for images and labels... 341 found, 0 missing, 0 empty, 0 corrupted: 100%|█████████████████████████████████████████████| 341/341 [00:00<00:00, 1891.93it/s] New cache created: VOC_2022052001\labels.cache Scanning 'VOC_2022052001\labels' for images and labels... 61 found, 0 missing, 0 empty, 0 corrupted: 100%|████████████████████████████████████████████████| 61/61 [00:00<00:00, 2084.54it/s] New cache created: VOC_2022052001\labels.cache | 0/61 [00:00<?, ?it/s] Plotting labels... 052001\labels.cache' for images and labels... 61 found, 0 missing, 0 empty, 0 corrupted: 100%|████████████████████████████████████████████████████| 61/61 [00:00<?, ?it/s] Scanning 'VOC_2022052001\labels.cache' for images and labels... 341 found, 0 missing, 0 empty, 0 corrupted: 100%|█████████████████████████████████████████████████| 341/341 [00:00<?, ?it/s] Scanning 'VOC_2022052001\labels.cache' for images and labels... 61 found, 0 missing, 0 empty, 0 corrupted: 100%|████████████████████████████████████████████████████| 61/61 [00:00<?, ?it/s] Analyzing anchors... anchors/target = 5.90, Best Possible Recall (BPR) = 1.0000 Image sizes 640 train, 640 test Using 0 dataloader workers Logging results to runs\train\exp2 Starting training for 300 epochs... Starting training for 300 epochs... Epoch gpu_mem box obj cls total targets img_size 0/299 1.22G 0.1006 0.03639 0 0.137 2 640: 100%|███████████████████████████████████████████████████████████████████| 341/341 [01:16<00:00, 4.44it/s] Class Images Targets P R [email protected] [email protected]:.95: 100%|█████████████████████████████████████████████████████████| 61/61 [00:05<00:00, 11.15it/s] all 61 124 5.46e-05 0.00806 1.79e-06 1.79e-07 Epoch gpu_mem box obj cls total targets img_size 1/299 1.2G 0.0903 0.04164 0 0.1319 2 640: 100%|███████████████████████████████████████████████████████████████████| 341/341 [01:10<00:00, 4.81it/s] Class Images Targets P R [email protected] [email protected]:.95: 100%|█████████████████████████████████████████████████████████| 61/61 [00:04<00:00, 14.48it/s] all 61 124 0 0 3.48e-05 3.48e-06 Epoch gpu_mem box obj cls total targets img_size 2/299 1.2G 0.07705 0.03868 0 0.1157 1 640: 100%|███████████████████████████████████████████████████████████████████| 341/341 [01:11<00:00, 4.75it/s] Class Images Targets P R [email protected] [email protected]:.95: 100%|█████████████████████████████████████████████████████████| 61/61 [00:04<00:00, 14.37it/s] all 61 124 0.0459 0.0726 0.0135 0.00226 Epoch gpu_mem box obj cls total targets img_size 3/299 1.2G 0.0841 0.03379 0 0.1179 4 640: 100%|███████████████████████████████████████████████████████████████████| 341/341 [01:10<00:00, 4.82it/s] Class Images Targets P R [email protected] [email protected]:.95: 100%|█████████████████████████████████████████████████████████| 61/61 [00:04<00:00, 14.10it/s] all 61 124 0 0 0.00207 0.00028
##############################