记录一下yolo v5从零训练COCO数据集的情况

关于coco2017数据集

coco2017 80个类别  

训练集118287 验证集 5000 测试集40670 一共163957

训练集中有117266被标注(每张图片有多个不同种类的目标) 验证集中有4952张被标注 

关于混合精度训练 

yolov5默认开启混合精度训练:

# Forward with torch.cuda.amp.autocast(amp): pred = model(imgs) # forward loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size if RANK != -1: loss *= WORLD_SIZE # gradient averaged between devices in DDP mode if opt.quad: loss *= 4.

 官方说的是在单卡V100显卡上大概训练s模型需要2天

 我这里是单卡3090,如果是基于预训练模型训练,用时不到4天半,55个小时,但是从零训练应该不能基于预训练模型,如果weights不传参,训练就很慢了,大概测算需要多半个月。

基于预训练模型训练完后的日志,忘了保存,只有一部分:

fork 5000 215 0.646 0.349 0.431 0.248 knife 5000 325 0.516 0.206 0.223 0.111 spoon 5000 253 0.54 0.19 0.229 0.117 bowl 5000 623 0.616 0.475 0.516 0.356 banana 5000 370 0.486 0.332 0.343 0.175 apple 5000 236 0.433 0.275 0.219 0.138 sandwich 5000 177 0.61 0.458 0.487 0.314 orange 5000 285 0.492 0.373 0.349 0.255 broccoli 5000 312 0.485 0.394 0.377 0.184 carrot 5000 365 0.381 0.359 0.309 0.184 hot dog 5000 125 0.62 0.472 0.477 0.31 pizza 5000 284 0.712 0.634 0.668 0.455 donut 5000 328 0.547 0.491 0.5 0.372 cake 5000 310 0.618 0.439 0.508 0.31 chair 5000 1771 0.596 0.404 0.451 0.257 couch 5000 261 0.707 0.489 0.596 0.398 potted plant 5000 342 0.564 0.415 0.435 0.235 bed 5000 163 0.709 0.509 0.591 0.368 dining table 5000 695 0.592 0.357 0.394 0.241 toilet 5000 179 0.805 0.76 0.829 0.607 tv 5000 288 0.758 0.664 0.735 0.521 laptop 5000 231 0.765 0.649 0.706 0.538 mouse 5000 106 0.804 0.708 0.762 0.543 remote 5000 283 0.547 0.406 0.433 0.215 keyboard 5000 153 0.652 0.575 0.658 0.423 cell phone 5000 262 0.595 0.454 0.488 0.296 microwave 5000 55 0.631 0.636 0.712 0.494 oven 5000 143 0.626 0.448 0.535 0.304 toaster 5000 9 0.793 0.333 0.515 0.355 sink 5000 225 0.656 0.498 0.556 0.338 refrigerator 5000 126 0.759 0.603 0.69 0.489 book 5000 1129 0.455 0.181 0.219 0.0885 clock 5000 267 0.777 0.704 0.735 0.471 vase 5000 274 0.566 0.496 0.482 0.311 scissors 5000 36 0.566 0.222 0.246 0.18 teddy bear 5000 190 0.721 0.526 0.611 0.373 hair drier 5000 11 1 0 0.0206 0.00303 toothbrush 5000 57 0.529 0.298 0.344 0.19Evaluating pycocotools mAP... saving runs/train/exp/_predictions.json...loading annotations into memory...Done (t=0.53s)creating index...index created!Loading and preparing results...DONE (t=3.21s)creating index...index created!Running per image evaluation...Evaluate annotation type *bbox*DONE (t=41.97s).Accumulating evaluation results...DONE (t=6.99s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.372 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.566 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.402 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.209 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.422 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.477 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.309 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.514 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.570 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.374 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.631 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.716Results saved to runs/train/exp

训练好的模型和结果在 从零训练yolov5在COCO数据集上的模型和结果-深度学习文档类资源-CSDN下载


比丘资源网 » 记录一下yolo v5从零训练COCO数据集的情况

发表回复

提供最优质的资源集合

立即查看 了解详情