ShuLiu1993 / PANet

PANet for Instance Segmentation and Object Detection
MIT License
1.34k stars 281 forks source link

infer_simple.py error ? #30

Open ranjiewwen opened 5 years ago

ranjiewwen commented 5 years ago
/home/rjw/anaconda3/envs/tf1.8_torch0.4_py3.5/bin/python /home/rjw/desktop/maskrcnn/PANet-master/tools/infer_simple.py --dataset coco --cfg ./configs/panet/e2e_panet_R-50-FPN_2x_mask.yaml --load_detectron /home/rjw/desktop/maskrcnn/PANet-master/panet_mask_step179999.pth --image_dir ./demo/sample_images --output_dir ./demo/
Called with args:
Namespace(cfg_file='./configs/panet/e2e_panet_R-50-FPN_2x_mask.yaml', cuda=True, dataset='coco', image_dir='./demo/sample_images', images=None, load_ckpt=None, load_detectron='/home/rjw/desktop/maskrcnn/PANet-master/panet_mask_step179999.pth', merge_pdfs=True, output_dir='./demo/', set_cfgs=[])
load cfg from file: ./configs/panet/e2e_panet_R-50-FPN_2x_mask.yaml
Traceback (most recent call last):
loading detectron weights /home/rjw/desktop/maskrcnn/PANet-master/panet_mask_step179999.pth
  File "/home/rjw/desktop/maskrcnn/PANet-master/tools/infer_simple.py", line 177, in <module>
    main()
  File "/home/rjw/desktop/maskrcnn/PANet-master/tools/infer_simple.py", line 129, in main
    load_detectron_weight(maskRCNN, args.load_detectron)
  File "/home/rjw/desktop/maskrcnn/PANet-master/lib/utils/detectron_weight_helper.py", line 14, in load_detectron_weight
    if 'blobs' in src_blobs:
TypeError: argument of type 'int' is not iterable
cmstudyscode commented 5 years ago

i run the infer_simple.py too. but i met another error, have u ever gotton this error: Called with args: Namespace(cfg_file='configs/panet/e2e_panet_R-50-FPN_2x_mask.yaml', cuda=True, dataset='coco2017', image_dir='demo/sample_images', images=None, load_ckpt='panet_mask_step179999.pth', load_detectron=None, merge_pdfs=True, output_dir='infer_outputs', set_cfgs=[]) load cfg from file: configs/panet/e2e_panet_R-50-FPN_2x_mask.yaml /home/cm/PANet/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 checkpoint panet_mask_step179999.pth img 0 THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=844 error=11 : invalid argument car 0.97782826 Traceback (most recent call last): File "tools/infer_simple.py", line 176, in <module> main() File "tools/infer_simple.py", line 163, in main kp_thresh=2 File "/home/cm/PANet/lib/utils/vis.py", line 183, in vis_one_image e.copy(), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE) ValueError: not enough values to unpack (expected 3, got 2)