yolov5训练模型日志
yolov5训练模型日志
早晨9点多开始训练,刚刚终于训练完了!
python train_20220110.py --img-size 640 --batch-size 1 --epochs 300 --data ./data/myvoc.yaml --cfg ./models/yolov5m.yaml --workers 0
(wind_2021) F:\PytorchProject\yolov5-master> (wind_2021) F:\PytorchProject\yolov5-master> (wind_2021) F:\PytorchProject\yolov5-master>python train_20220110.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, 16384.0MB) 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\\exp3', 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=2 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 28287 models.yolo.Detect [2, [[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, 21060447 parameters, 21060447 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 'VOC2007\labels' for images and labels... 1167 found, 0 missing, 0 empty, 0 corrupted: 100%|████████████████████████| 1167/1167 [00:00<00:00, 2235.50it/s] New cache created: VOC2007\labels.cache Scanning 'VOC2007\labels.cache' for images and labels... 1167 found, 0 missing, 0 empty, 0 corrupted: 100%|████████████████████████████| 1167/1167 [00:00<?, ?it/s] Scanning 'VOC2007\labels' for images and labels... 130 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████| 130/130 [00:00<00:00, 2303.22it/s] New cache created: VOC2007\labels.cache Scanning 'VOC2007\labels.cache' for images and labels... 130 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████| 130/130 [00:00<?, ?it/s]Plotting labels... Scanning 'VOC2007\labels.cache' for images and labels... 130 found, 0 missing, 0 empty, 0 corrupted: 100%|███████████████████████████████| 130/130 [00:00<?, ?it/s] Analyzing anchors... anchors/target = 4.58, Best Possible Recall (BPR) = 0.9936 Image sizes 640 train, 640 test Using 0 dataloader workers Logging results to runs\train\exp3 Starting training for 300 epochs... Epoch gpu_mem box obj cls total targets img_size 0/299 1.22G 0.0933 0.05733 0.02477 0.1754 5 640: 100%|████████████████████████████████████████| 1167/1167 [02:04<00:00, 9.36it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|██████████████████████████████| 130/130 [00:07<00:00, 16.46it/s] all 130 603 0.00567 0.0312 0.00239 0.000364 Epoch gpu_mem box obj cls total targets img_size 1/299 1.2G 0.08475 0.06171 0.0221 0.1686 13 640: 100%|████████████████████████████████████████| 1167/1167 [01:54<00:00, 10.22it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|██████████████████████████████| 130/130 [00:05<00:00, 23.42it/s] all 130 603 0 0 0.00444 0.000659 Epoch gpu_mem box obj cls total targets img_size 2/299 1.2G 0.08172 0.06241 0.02027 0.1644 7 640: 100%|████████████████████████████████████████| 1167/1167 [01:55<00:00, 10.08it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|██████████████████████████████| 130/130 [00:05<00:00, 23.42it/s] all 130 603 0.0665 0.0118 0.0241 0.00448 ............. Epoch gpu_mem box obj cls total targets img_size 296/299 1.2G 0.01706 0.0198 0.001733 0.0386 6 640: 100%|████████████████████████████████████████| 1167/1167 [01:55<00:00, 10.13it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|██████████████████████████████| 130/130 [00:04<00:00, 26.75it/s] all 130 603 0.678 0.902 0.894 0.737 Epoch gpu_mem box obj cls total targets img_size 297/299 1.2G 0.01698 0.01983 0.002011 0.03882 4 640: 100%|████████████████████████████████████████| 1167/1167 [01:55<00:00, 10.14it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|██████████████████████████████| 130/130 [00:04<00:00, 26.51it/s] all 130 603 0.682 0.908 0.895 0.732 Epoch gpu_mem box obj cls total targets img_size 298/299 1.2G 0.01728 0.02027 0.001985 0.03953 5 640: 100%|████████████████████████████████████████| 1167/1167 [01:55<00:00, 10.14it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|██████████████████████████████| 130/130 [00:04<00:00, 26.55it/s] all 130 603 0.698 0.913 0.899 0.737 Epoch gpu_mem box obj cls total targets img_size 299/299 1.2G 0.01718 0.02062 0.002008 0.03981 9 640: 100%|████████████████████████████████████████| 1167/1167 [01:55<00:00, 10.07it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 100%|██████████████████████████████| 130/130 [00:05<00:00, 23.90it/s] all 130 603 0.683 0.909 0.896 0.736 Optimizer stripped from runs\train\exp3\weights\last.pt, 42.5MB Optimizer stripped from runs\train\exp3\weights\best.pt, 42.5MB 300 epochs completed in 10.018 hours. (wind_2021) F:\PytorchProject\yolov5-master> (wind_2021) F:\PytorchProject\yolov5-master> (wind_2021) F:\PytorchProject\yolov5-master>
测试:
python detect_2022011001.py --weights runs/train/exp3/weights/best.pt --conf 0.60 --source data/images_20220110/
#########################
QQ 3087438119