eriklindernoren / PyTorch-YOLOv3

Minimal PyTorch implementation of YOLOv3
GNU General Public License v3.0
7.32k stars 2.63k forks source link

Not able to reproduce the mAP results after training #193

Open gurkirt opened 5 years ago

gurkirt commented 5 years ago

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?

qilong-zhang commented 5 years ago

@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?

yanxurui commented 5 years ago

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.

CodePothunter commented 5 years ago

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

Same issue, but I don't know why.

gurkirt commented 5 years ago

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

fmahoudeau commented 5 years ago

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%.

H-YunHui commented 5 years ago

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

fmahoudeau commented 5 years ago

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

It was tested on COCO.

H-YunHui commented 5 years ago

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

z-huabao commented 5 years ago

@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.

YuanduLai commented 5 years ago

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?

BaiqiangGit commented 4 years ago

I get mAP: 0.5492690730408117

falex-ml commented 4 years ago

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

gurkirt commented 4 years ago

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

ujsyehao commented 4 years ago

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

zhangyilalala commented 4 years ago

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?

WangJian981002 commented 3 years ago

“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