Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
omerbrandis opened this issue Mar 4, 2021 · 2 comments

Comments

@omerbrandis
Copy link

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
Copy link
Author

omerbrandis commented Mar 4, 2021

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants