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

Fix: RandomSamplingNegPos forget to remove gt_ignore_flags #11669

Open
wants to merge 1 commit into
base: dev-3.x
Choose a base branch
from

Conversation

jiangtann
Copy link

https://github.com/open-mmlab/mmdetection/blob/dev-3.x/mmdet/datasets/transforms/formatting.py#L109 中,会根据valid_idx = np.where(results['gt_ignore_flags'] == 0)[0]来获得valid_idx,并通过valid_idx从gt_bboxes中取得有效的bboxes。

https://github.com/open-mmlab/mmdetection/blob/dev-3.x/mmdet/datasets/transforms/text_transformers.py#L62 中,如果positive labels的token数之和超过了256,会随机删掉一部分gt_bboxes和gt_labels,但是没有对gt_ignore_flags进行相应的处理,导致在PackDetInputs中,通过valid_idx从gt_bboxes中取得有效的bboxes会出现index越界error。

参考RandomCrop中处理gt_ignore_flags的方式对RandomSamplingNegPos进行相应的修改

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck 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

Successfully merging this pull request may close these issues.

None yet

3 participants