YOLOv4-pytorch icon indicating copy to clipboard operation
YOLOv4-pytorch copied to clipboard

训练后mAP为0

Open zjnlxk opened this issue 4 years ago • 6 comments

image

zjnlxk avatar Nov 11 '20 09:11 zjnlxk

Can't really say what cause this, since you only show your final result. No other info about the thing you did. How is the loss goes? Your dataset volumn and your settings? Did you check if the dataset annotation is correct? Draw some bbox with the dataloader you use would help. (Conversion script often buggy if you don't check seriously)

jingtianyilong avatar Nov 12 '20 01:11 jingtianyilong

Can't really say what cause this, since you only show your final result. No other info about the thing you did. How is the loss goes? Your dataset volumn and your settings? Did you check if the dataset annotation is correct? Draw some bbox with the dataloader you use would help. (Conversion script often buggy if you don't check seriously)

thanks for your reply

argusswift avatar Nov 12 '20 13:11 argusswift

I have try it again, the loss has been falling until it drops to a little over 20。I suspect it's a file problem during verification。So can the author explain the role of the documents in the verification?

zjnlxk avatar Nov 30 '20 03:11 zjnlxk

这是我的结果也是map = 0.000%,而且训练结束后也没有生成best.pt的文件请问能帮助我分析一下是哪里出错了吗() [2021-03-14 11:52:43,113]-[train.py line:231]: === Epoch:[ 9/10],step:[1710/1749],img_size:[352],total_loss:5.4350|loss_ciou:1.0242|loss_conf:1.5988|loss_cls:2.8119|lr:0.0000 [2021-03-14 11:52:45,917]-[train.py line:231]: === Epoch:[ 9/10],step:[1720/1749],img_size:[608],total_loss:5.4310|loss_ciou:1.0235|loss_conf:1.5954|loss_cls:2.8120|lr:0.0000 [2021-03-14 11:52:50,280]-[train.py line:231]: === Epoch:[ 9/10],step:[1730/1749],img_size:[448],total_loss:5.4254|loss_ciou:1.0229|loss_conf:1.5935|loss_cls:2.8090|lr:0.0000 [2021-03-14 11:52:53,322]-[train.py line:231]: === Epoch:[ 9/10],step:[1740/1749],img_size:[320],total_loss:5.4339|loss_ciou:1.0231|loss_conf:1.5913|loss_cls:2.8195|lr:0.0000 [2021-03-14 11:52:55,560]-[train.py line:309]: ===cost time:590.5572s [2021-03-14 11:52:55,560]-[train.py line:312]:=====Training Finished. best_test_mAP:0.000%====

Fan-SR avatar Mar 14 '21 14:03 Fan-SR

其中config.py中参数设置如下 `TRAIN = { "DATA_TYPE": "Customer", # DATA_TYPE: VOC ,COCO or Customer "TRAIN_IMG_SIZE": 416, "AUGMENT": True, "BATCH_SIZE": 4, "MULTI_SCALE_TRAIN": True, "IOU_THRESHOLD_LOSS": 0.5, "YOLO_EPOCHS": 1, "Mobilenet_YOLO_EPOCHS": 120, "NUMBER_WORKERS": 0, "MOMENTUM": 0.9, "WEIGHT_DECAY": 0.0005, "LR_INIT": 1e-4, "LR_END": 1e-6, "WARMUP_EPOCHS": 2, # or None "showatt": False }

val

VAL = { "TEST_IMG_SIZE": 416, "BATCH_SIZE": 1, "NUMBER_WORKERS": 0, "CONF_THRESH": 0.005, "NMS_THRESH": 0.45, "MULTI_SCALE_VAL": False, "FLIP_VAL": False, "Visual": True, "showatt": False }

Customer_DATA = { "NUM": 6, # your dataset number "CLASSES": ["ore carrier", "general cargo ship", "bulk cargo carrier", "container ship", "fishing boat", "passenger ship",], # your dataset class }`

Fan-SR avatar Mar 14 '21 14:03 Fan-SR

@Fan-SR 你解决了,我也是这个问题

442616159 avatar Apr 07 '21 02:04 442616159