Centernet: AttributeError: type object 'COCO' has no attribute 'flip_idx'

Created on 19 Oct 2019  ·  6Comments  ·  Source: xingyizhou/CenterNet

when I run "python test.py multi_pose --exp_id dla --keep_res --load_model ../models/multi_pose_dla_3x.pth --flip_test" and "python test.py multi_pose --exp_id hg --arch hourglass --keep_res --load_model ../models/multi_pose_dla_3x.pth --flip_test", I Encountered a problem "AttributeError: type object 'COCO' has no attribute 'flip_idx' ", could you help me ,thank you !

Most helpful comment

I solve it by add --dataset coco_hp

All 6 comments

Traceback (most recent call last):
File "test.py", line 126, in
prefetch_test(opt)
File "test.py", line 51, in prefetch_test
opt = opts().update_dataset_info_and_set_heads(opt, Dataset)
File "/home/lihongwei/myfile/CenterNet/CenterNet/src/lib/opts.py", line 323, in update_dataset_info_and_set_heads
opt.flip_idx = dataset.flip_idx
AttributeError: type object 'COCO' has no attribute 'flip_idx'

I solve it by add --dataset coco_hp

It solves also for me. but why this happen and what does "--dataset coco_hp" means?

--dataset coco_hp mean use COCO dataset for keypoints detection task
--dataset coco mean use COCO dataset for object detection task
If you do keypoints detection task, use coco_hp

I feel a little confused, where I need to add the coco_hp

The following command works for me for training a pose estimation hg model:

python main.py --task multi_pose --exp_id hg_3x --dataset coco_hp --arch hourglass --batch_size 2 --master_batch 4 --lr 2.5e-4 --gpus 0 --num_epochs 1 --lr_step 130

Was this page helpful?
0 / 5 - 0 ratings