Skip to content
New issue

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

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

Already on GitHub? # to your account

'RoIAlignRotated' object has no attribute 'out_size' #103

Closed
ae86pjh opened this issue Mar 10, 2022 · 2 comments
Closed

'RoIAlignRotated' object has no attribute 'out_size' #103

ae86pjh opened this issue Mar 10, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@ae86pjh
Copy link

ae86pjh commented Mar 10, 2022

我下载了checkpoint/roi_trans_r50_fpn_1x_dota_ms_le90
我在测试demo/img_demo.py的时候遇到了问题
测试代码

python demo/image_demo.py demo/demo.jpg configs/roi_trans/roi_trans_r50_fpn_1x_dota_ms_le90.py checkpoint/roi_trans_r50_fpn_1x_dota_ms_rr_le90-fa99496f.pth demo/vis.jpg

具体报错如下:
Traceback (most recent call last):
File "demo/image_demo.py", line 42, in
main()
File "demo/image_demo.py", line 35, in main
result = inference_detector(model, args.img)
File "/data/pjh/mmdetection/mmdet/apis/inference.py", line 147, in inference_detector
results = model(return_loss=False, rescale=True, **data)
File "/data/pjh/ENTER/envs/mmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/pjh/ENTER/envs/mmlab/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func
return old_func(*args, **kwargs)
File "/data/pjh/mmdetection/mmdet/models/detectors/base.py", line 174, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/data/pjh/mmdetection/mmdet/models/detectors/base.py", line 147, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/data/pjh/mmrotate/mmrotate/models/detectors/two_stage.py", line 183, in simple_test
return self.roi_head.simple_test(
File "/data/pjh/mmrotate/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 290, in simple_test
bbox_results = self._bbox_forward(i, x, rois)
File "/data/pjh/mmrotate/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 125, in _bbox_forward
bbox_feats = bbox_roi_extractor(x[:bbox_roi_extractor.num_inputs],
File "/data/pjh/ENTER/envs/mmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/pjh/ENTER/envs/mmlab/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 197, in new_func
return old_func(*args, **kwargs)
File "/data/pjh/mmrotate/mmrotate/models/roi_heads/roi_extractors/rotate_single_level_roi_extractor.py", line 101, in forward
out_size = self.roi_layers[0].out_size
File "/data/pjh/ENTER/envs/mmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 778, in getattr
raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
torch.nn.modules.module.ModuleAttributeError: 'RoIAlignRotated' object has no attribute 'out_size'

@ae86pjh
Copy link
Author

ae86pjh commented Mar 10, 2022

我在想是不是版本问题
image

@yangxue0827
Copy link
Collaborator

yangxue0827 commented Mar 10, 2022

refer to #51

@yangxue0827 yangxue0827 added the duplicate This issue or pull request already exists label Mar 10, 2022
@ae86pjh ae86pjh closed this as completed Mar 10, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants