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

About Box-conditioned inference #10

Closed
MIYU8305 opened this issue Sep 9, 2022 · 1 comment
Closed

About Box-conditioned inference #10

MIYU8305 opened this issue Sep 9, 2022 · 1 comment

Comments

@MIYU8305
Copy link

MIYU8305 commented Sep 9, 2022

I did

bash tools/dist_test.sh
configs/discobox/boxcond_discobox_solov2_x101_dcn_fpn_3x.py
work_dirs/coco_x101_dcn_fpn_3x.pth 2
--format-only
--options "jsonfile_prefix=work_dirs/coco_x101_dcn_fpn_results.json"

I got error as below
Traceback (most recent call last):
File "tools/test.py", line 226, in
main()
File "tools/test.py", line 202, in main
outputs = single_gpu_test(model, data_loader, args.show, args.show_dir,
File "/home/user/workdir/mmdet/apis/test.py", line 30, in single_gpu_test
result = model(return_loss=False, rescale=True, **data)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 42, in forward
return super().forward(*inputs, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 165, in forward
return self.module(*inputs[0], **kwargs[0])
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 128, in new_func
output = old_func(*new_args, **new_kwargs)
File "/home/user/workdir/mmdet/models/detectors/single_stage_wsis.py", line 251, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/home/user/workdir/mmdet/models/detectors/base.py", line 164, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/home/user/workdir/mmdet/models/detectors/single_stage_wsis.py", line 262, in simple_test
results = self.bbox_head.get_seg(*seg_inputs, img=img, gt_bboxes=gt_bboxes, gt_labels=gt_labels, gt_masks=gt_masks)
TypeError: get_seg() got an unexpected keyword argument 'gt_bboxes'

How can I solve this error? If I changed
from results = self.bbox_head.get_seg(*seg_inputs, img=img, gt_bboxes=gt_bboxes, gt_labels=gt_labels, gt_masks=gt_masks)
to results = self.bbox_head.get_seg(*seg_inputs, img=img)

Error has disappeared.

@voidrank
Copy link
Contributor

Hi @MIYU8305 ,

What you did was right. Sorry, I haven't tested it very well. I will fix it later.

Thanks,

Shiyi

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