PyTorch-YOLOv3 icon indicating copy to clipboard operation
PyTorch-YOLOv3 copied to clipboard

Not able to reproduce the mAP results after training

Open gurkirt opened this issue 5 years ago • 16 comments

Thank a lot for producing this amazing code!

I am training to train yolov3 on coco After preprocessing the dataset, I ran

python3 train.py --data_config config/coco.data --pretrained_weights weights/darknet53.conv.74

Got mAp of 20.1 % after 70 epochs

python3 test.py --weights_path weights/yolov3.weights

This gave me mAp of 51.4% rather than 55.5%.

Do I need to specify some other parameters?

gurkirt avatar Jun 04 '19 12:06 gurkirt

@gurkirt Hi! I'm a little confuse that where yolov3.weight from? because when I use yolov3.weight to test on COCO, it's reuslt is really good! But If I train python3 test.py --weights_path weights/yolov3.weights The first epoch the result is really bad? why?

qilong-zhang avatar Jun 13 '19 02:06 qilong-zhang

Maybe the current implementation of yolo-v3 using pytorch is not trainable? It's only useful for inference when using the pretrained weights by the official darknet.

yanxurui avatar Jun 17 '19 10:06 yanxurui

“This gave me mAp of 51.4% rather than 55.5%.”

Same issue, but I don't know why.

CodePothunter avatar Jun 17 '19 12:06 CodePothunter

@eriklindernoren Is this version issue? I am using pytorch1.1

gurkirt avatar Jun 19 '19 06:06 gurkirt

A bug has been found in collate_fn which impacts the evaluation: https://github.com/eriklindernoren/PyTorch-YOLOv3/issues/243

After implementing the fix the mAP increases to 54.9%.

fmahoudeau avatar Jul 28 '19 16:07 fmahoudeau

@fmahoudeau Is your mAP tested on voc data or coco data sets?

H-YunHui avatar Jul 29 '19 12:07 H-YunHui

@fmahoudeau Is your mAP tested on voc data or coco data sets?

It was tested on COCO.

fmahoudeau avatar Jul 29 '19 17:07 fmahoudeau

@fmahoudeau When you tested on coco,how big do you choose epochs? chose yolov3.weights or darknet53.conv.74 to training?

H-YunHui avatar Jul 31 '19 07:07 H-YunHui

@gurkirt Hi! I'm a little confuse that where yolov3.weight from? because when I use yolov3.weight to test on COCO, it's reuslt is really good! But If I train python3 test.py --weights_path weights/yolov3.weights The first epoch the result is really bad? why?

Hi, I test yolov3.weights get mAP=54.86, and get 33 after fine-tune 1 epoch by 1e-6 learning rate.

z-huabao avatar Aug 07 '19 02:08 z-huabao

Thank a lot for producing this amazing code!

I am training to train yolov3 on coco After preprocessing the dataset, I ran

python3 train.py --data_config config/coco.data --pretrained_weights weights/darknet53.conv.74

Got mAp of 20.1 % after 70 epochs

python3 test.py --weights_path weights/yolov3.weights

This gave me mAp of 51.4% rather than 55.5%.

Do I need to specify some other parameters?

do you solve this problem now?

YuanduLai avatar Sep 19 '19 08:09 YuanduLai

I get mAP: 0.5492690730408117

BaiqiangGit avatar Oct 25 '19 12:10 BaiqiangGit

Thank a lot for producing this amazing code!

I am training to train yolov3 on coco After preprocessing the dataset, I ran

python3 train.py --data_config config/coco.data --pretrained_weights weights/darknet53.conv.74

Got mAp of 20.1 % after 70 epochs

python3 test.py --weights_path weights/yolov3.weights

This gave me mAp of 51.4% rather than 55.5%.

Do I need to specify some other parameters?

Same here

falex-ml avatar Oct 27 '19 09:10 falex-ml

Try what https://github.com/eriklindernoren/PyTorch-YOLOv3/issues/193#issuecomment-515774443 says

gurkirt avatar Oct 28 '19 16:10 gurkirt

When I use #243 proposed method , mAP increase from 51.4% to 54.9%, but still lower than 55.3%.

Another problem is TP calculation in utils/utils.py, please refer to #233

ujsyehao avatar Nov 14 '19 03:11 ujsyehao

python3 train.py --data_config config/coco.data --pretrained_weights weights/darknet53.conv.74

I still get mAp of 19 % after 60 epochs after fix the code in #243, did anyone train well on coco?

zhangyilalala avatar Dec 16 '19 06:12 zhangyilalala

“This gave me mAp of 51.4% rather than 55.5%.”

Same issue, but I don't know why.

the confidence in inference is set to high, you can change it to 0.15

WangJian981002 avatar Nov 27 '20 01:11 WangJian981002