You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
具体报错如下:
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'
The text was updated successfully, but these errors were encountered:
我下载了checkpoint/roi_trans_r50_fpn_1x_dota_ms_le90
我在测试demo/img_demo.py的时候遇到了问题
测试代码
具体报错如下:
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'
The text was updated successfully, but these errors were encountered: