JialeCao001 / SipMask

SipMask: Spatial Information Preservation for Fast Image and Video Instance Segmentation (ECCV2020)
https://arxiv.org/pdf/2007.14772.pdf
MIT License
335 stars 54 forks source link

SipMask-benchmark/demo/fcos_demo.py failed with 'NoneType' object is not subscriptable #38

Open omerbrandis opened 3 years ago

omerbrandis commented 3 years ago

hello

I've tried running /SipMask/SipMask-benchmark$ python demo/fcos_demo.py --config-file configs/ffr/ffr-sipmask_R_50_FPN_1x.yaml --weights training_dir/ffr_50/model_0090000.pth --images-dir datasets/ffr/images/

returned following error: Traceback (most recent call last): File "demo/fcos_demo.py", line 113, in main() File "demo/fcos_demo.py", line 104, in main composite = coco_demo.run_on_opencv_image(img) File "/home/ubuntu/SipMask/SipMask-benchmark/demo/predictor.py", line 172, in run_on_opencv_image predictions = self.compute_prediction(image) File "/home/ubuntu/SipMask/SipMask-benchmark/demo/predictor.py", line 205, in compute_prediction predictions = self.model(image_list) File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, kwargs) File "/home/ubuntu/SipMask/SipMask-benchmark/fcos_core/modeling/detector/generalized_rcnn.py", line 51, in forward proposals, proposal_losses = self.rpn(images, features, imge_metas, targets) File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, *kwargs) File "/home/ubuntu/SipMask/SipMask-benchmark/fcos_core/modeling/rpn/sipmask/sipmask.py", line 239, in forward centerness, box_cof, box_mask, images.image_sizes, img_metas File "/home/ubuntu/SipMask/SipMask-benchmark/fcos_core/modeling/rpn/sipmask/sipmask.py", line 257, in _forward_test centerness, box_cof, box_mask, image_sizes, img_metas File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(input, kwargs) File "/home/ubuntu/SipMask/SipMask-benchmark/fcos_core/modeling/rpn/sipmask/inference.py", line 163, in forward boxlists = self.select_over_all_levels(boxlists, feat_masks, image_sizes, img_metas) File "/home/ubuntu/SipMask/SipMask-benchmark/fcos_core/modeling/rpn/sipmask/inference.py", line 197, in select_over_all_levels ori_shape = (img_metas[i][1],img_metas[i][0]) TypeError: 'NoneType' object is not subscriptable

please advise, Omer

omerbrandis commented 3 years ago

hi

value of img_metas in SipMask/SipMask-benchmark/fcos_core/modeling/rpn/sipmask/inference.py", line 197 at runtime (prior to ori_shape = (img_metas[i][1],img_metas[i][0])) is None.

omer.

AmrElGendyy commented 2 years ago

i encountered the same problem, @omerbrandis were u able to solve it?