`YOLOv3(cfg['MODEL'], ignore_thre=ignore_thre)` return error
yukkyo opened this issue · comments
fam_taro commented
Hi @hirotomusiker.
I got bellow error when execute python train.py --cfg config/yolov3_eval.cfg
.
$sudo nvidia-docker build -t $USER/sample1 --build-arg UID=`id -u` -f docker/Dockerfile .
$sudo nvidia-docker run --rm -it -v `pwd`:/work --name $USER.sample1 $USER/sample1
# in Docker container
docker@eb8c716f1302:/work$ mkdir weights
docker@eb8c716f1302:/work$ cd weights/
docker@eb8c716f1302:/work/weights$ sh ../requirements/download_weights.sh
docker@eb8c716f1302:/work/weights$ cd ..
# Train.py
docker@eb8c716f1302:/work$ python train.py --cfg config/yolov3_eval.cfg
Setting Arguments.. : Namespace(cfg='config/yolov3_eval.cfg', checkpoint=None, checkpoint_dir='checkpoints', checkpoint_interval=1000, debug=False, eval_interval=4000, n_cpu=0, tfboard=None, use_cuda=True, weights_path=None)
successfully loaded config file: {'MODEL': {'TYPE': 'YOLOv3', 'BACKBONE': 'darknet53', 'ANCHORS': [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]], 'ANCH_MASK': [[6, 7, 8], [3, 4, 5], [0, 1, 2]], 'N_CLASSES': 80}, 'TRAIN': {'LR': 0.0, 'MOMENTUM': 0.9, 'DECAY': 0.0005, 'BURN_IN': 0, 'MAXITER': 2, 'STEPS': '(99, 999)', 'BATCHSIZE': 1, 'SUBDIVISION': 1, 'LOSSTYPE': 'l2', 'IGNORETHRE': 0.7, 'IMGSIZE': 608}, 'AUGMENTATION': {'RANDRESIZE': False, 'JITTER': 0, 'RANDOM_PLACING': False, 'HUE': 0, 'SATURATION': 1, 'EXPOSURE': 1, 'LRFLIP': False, 'RANDOM_DISTORT': False}, 'TEST': {'CONFTHRE': 0.8, 'NMSTHRE': 0.45, 'IMGSIZE': 416}, 'NUM_GPUS': 1}
effective_batch_size = batch_size * iter_size = 1 * 1
Traceback (most recent call last):
File "train.py", line 212, in <module>
main()
File "train.py", line 79, in main
model = YOLOv3(cfg['MODEL'], ignore_thre=ignore_thre)
TypeError: __init__() got multiple values for argument 'ignore_thre'
And when I execute demo.py (change YOLOv3(cfg['MODEL'])
to YOLOv3(cfg['MODEL'], ignore_thre=0.7)
), got same error.
Please check this issue.
fam_taro commented
Sorry, some of my code was old fashioned.
New code does not output this error.