Open QiaoranC opened 6 years ago
Jupyter has its internal state, try to run the notebook from scratch, running each cell only once. Also perhaps share the notebook?
@QiaoranC Hi, I have some problem in running infer_simple.py, Is there any mistakes I had?
python tools/infer_simple.py --dataset coco --cfg configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml --load_ckpt data/pretrained_model/resnet50_caffe.pth --images ~/image/farm/img1_keypoints-pydetectron-R50-FPN.jpg --output_dir ~/image/farm_out
Called with args:
Namespace(cfg_file='configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml', cuda=True, dataset='coco', image_dir=None, images=['/home/feiw/image/farm/img1_keypoints-pydetectron-R50-FPN.jpg'], load_ckpt='data/pretrained_model/resnet50_caffe.pth', load_detectron=None, merge_pdfs=True, output_dir='/home/feiw/image/farm_out', set_cfgs=[])
load cfg from file: configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml
loading checkpoint data/pretrained_model/resnet50_caffe.pth
Traceback (most recent call last):
File "tools/infer_simple.py", line 176, in
python tools/infer_simple.py --dataset coco --cfg configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml --load_detectron data/pretrained_model/R-50.pkl --images ~/image/farm/img1_keypoints-pydetectron-R50-FPN.jpg --output_dir ~/image/farm_out
Called with args:
Namespace(cfg_file='configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml', cuda=True, dataset='coco', image_dir=None, images=['/home/feiw/image/farm/img1_keypoints-pydetectron-R50-FPN.jpg'], load_ckpt=None, load_detectron='data/pretrained_model/R-50.pkl', merge_pdfs=True, output_dir='/home/feiw/image/farm_out', set_cfgs=[])
load cfg from file: configs/baselines/e2e_keypoint_rcnn_R-50-FPN_s1x.yaml
loading detectron weights data/pretrained_model/R-50.pkl
Traceback (most recent call last):
File "tools/infer_simple.py", line 176, in <module>
main()
File "tools/infer_simple.py", line 128, in main
load_detectron_weight(maskRCNN, args.load_detectron)
File "/home/feiw/Detectron/Detectron.pytorch/lib/utils/detectron_weight_helper.py", line 21, in load_detectron_weight
p_tensor.copy_(torch.Tensor(src_blobs[d_name]))
KeyError: 'fpn_inner_res5_2_sum_w'
@roytseng-tw Hi, I run the inference based on your
infer_simple.py
successfully . At same environment (one gpu, same machine, same folder path), i use it in Jupyter for inference, but give me error in thedata_parallel
. Any ideal?This is my Jupyter move: I use following load the per-trained model with success return model structure.
However, when i next call it in a
im_detect_all
It give me a
mini_kwargs = dict([(k, v[i]) for k, v in kwargs.items()])
error.