Closed tagelian closed 6 years ago
You used the wrong config file. You should use the corresponding keypoint rcnn config file to the detectron pretrained weights.
sorry, i was too careless. Anyway, thank you.
@roytseng-tw @tasselcui
python tools/infer_simple.py --dataset coco --cfg configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml --load_detectron data/pretrained_model/model_e2e_s1x.pkl --image_dir ./demo/sample_images_keypoints --output_dir ./visualization
Pretrained Model: resnet50_caffe.pth
model from : End-to-End Keypoint-Only Mask R-CNN Baselines--|R-50-FPN | Kps | s1x | 2 | 9.0 | 0.828 | 29.9 | 0.096 + 0.089 | 54.3 | - | 65.4 | - | 37697714 | model | boxes | kps|
(detectron) (base) lh@lh:~/Detectron.pytorch$ python tools/infer_simple.py --dataset coco --cfg configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml --load_detectron data/pretrained_model/model_e2e_s1x.pkl --image_dir ./demo/sample_images_keypoints --output_dir ./visualization
Called with args:
Namespace(cfg_file='configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml', cuda=True, dataset='coco', image_dir='./demo/sample_images_keypoints', images=None, load_ckpt=None, load_detectron='data/pretrained_model/model_e2e_s1x.pkl', merge_pdfs=True, output_dir='./visualization', set_cfgs=[])
load cfg from file: configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml
/home/lh/Detectron.pytorch/lib/core/config.py:1037: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
yaml_cfg = AttrDict(yaml.load(f))
loading detectron weights data/pretrained_model/model_e2e_s1x.pkl
Traceback (most recent call last):
File "tools/infer_simple.py", line 176, in
Correctly inference masks:
(cuipt) cui@DemonHunters:~/mask-rcnn.pytorch$ python tools/infer_simple.py --dataset coco --cfg configs/e2e_mask_rcnn_R-101-FPN_2x.yaml --load_detectron data/model_final.pkl --image_dir demo/sample_images Called with args: Namespace(cfg_file='configs/e2e_mask_rcnn_R-101-FPN_2x.yaml', cuda=True, dataset='coco', image_dir='demo/sample_images', images=None, load_ckpt=None, load_detectron='data/model_final.pkl', merge_pdfs=True, output_dir='infer_outputs', set_cfgs=[]) load cfg from file: configs/e2e_mask_rcnn_R-101-FPN_2x.yaml loading detectron weights data/model_final.pkl img 0 person 0.999168 img 1 suitcase 0.741572 chair 0.996991 chair 0.995423 chair 0.974603 chair 0.902452 chair 0.748457 book 0.762648 chair 0.9888 clock 0.992333 img 2 train 0.99889 person 0.826093 img 3 car 0.994156 car 0.999019 truck 0.839317 car 0.995135 car 0.9096 traffic light 0.984154 car 0.99167 car 0.995001 car 0.981888
however, can't inference keyoints, so how to modify 'detectron_weight_helper.py' to inference keypoints? `(cuipt) cui@DemonHunters:~/mask-rcnn.pytorch$ python tools/infer_simple.py --dataset keypoints_coco \