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

A small problem in train.py about conf_thres

Open cjnjuwhy opened this issue 6 years ago • 1 comments

In file train.py, line 150 to 161,

        if epoch % opt.evaluation_interval == 0:
            print("\n---- Evaluating Model ----")
            # Evaluate the model on the validation set
            precision, recall, AP, f1, ap_class = evaluate(
                model,
                path=valid_path,
                iou_thres=0.5,
                conf_thres=0.5,
                nms_thres=0.5,
                img_size=opt.img_size,
                batch_size=8,
            )

the conf_thres should be 0.001, this part of codes aim to testing the model in COCO test dataset, so the configuration should keep the same with test.py, using conf_thres=0.5 will get the wrong mAP

cjnjuwhy avatar Oct 22 '19 11:10 cjnjuwhy

you are right!

ujsyehao avatar Nov 12 '19 04:11 ujsyehao