New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trainning AP is always 0.000 #337
Comments
@XieLeo11 Could you show us your details about exps/default/yolox_l.py? |
Plz check your dataset and show us your training log |
2021-08-03 18:44:56.327 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 18:58:28.366 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 19:12:14.010 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 19:26:08.707 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 19:39:50.964 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 19:53:11.603 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 20:06:36.810 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 20:20:12.310 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 20:33:40.528 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 20:47:34.033 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l 2021-08-03 21:01:30.173 | INFO | yolox.core.trainer:save_ckpt:322 - Save weights to ./YOLOX_outputs/yolox_l |
I think there is something wrong with your labels or evaluations. Plz check your dataset and visualize some labels first. Make sure the annos follow the coco format of (x0, y0, w, h). |
找到问题了吗,我这个loss都正常减少,就是ap始终为0,用训练模型推理也是啥框都没,太奇怪了 |
同,我的loss甚至一直在10左右徘徊,刚开始mAP还是有40多,第三轮之后就一直是0了 |
如果是训练自己的数据,建议按以下几步检查一下问题:
|
@ruinmessi ,那我这有点奇怪了,loss前2个epoch都从30多降到6了,预训练模型也加了,ap还是0,是不是要训练到100多个epoch才有结果 |
初始的loss也就20左右,如果加载了预训练只会更低 |
I think you should check the train/val annotation, then evaluate on train dataset, and confirm whether the AP is still 0 on train dataset |
可能是目标太小了吧,训练coco数据集是没问题的 |
数据集是用的链接的yolo2coo 里面的转的,yolov5训练时没问题的,看了vision画的框也是对对的 |
如果是voc数据集的话,把voc.py中54行左右的name = obj.find("name").text.lower().strip()改成name = obj.find("name").text.strip()试试 |
重拉一下最新代码吧,我在coco和自己的数据集上面测了,mAP都正常了,加载预训练模型会收敛更快 |
问题已解决 |
请问你是怎样解决的,我现在也遇到了相同问题 |
如果你是voc数据集的话,应该就是验证集的路径写错了 |
I have pulled the latest code.
training command is: 'python3 tools/train.py -f exps/default/yolox_l.py -d 1 -b 8 --fp16 -o -c yolox/weights/yolox_l.pth.tar'
The text was updated successfully, but these errors were encountered: