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

[Feature] Support RTMDet-Ins and improve RTMDet test config. #9494

Merged
merged 18 commits into from
Dec 19, 2022

Conversation

RangiLyu
Copy link
Member

@RangiLyu RangiLyu commented Dec 15, 2022

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

  1. Support RTMDet-Ins
    PWC

image

img_v2_d264acb8-5bfc-476a-a207-0c096f8da79g

  1. Update RTMDet with YOLO series test config:
    test_cfg=dict(
        nms_pre=30000,
        min_bbox_size=0,
        score_thr=0.001,
        nms=dict(type='nms', iou_threshold=0.65),
        max_per_img=300),

For a fair comparison, we update the test_cfg in RTMDet.

Modification

Add RTMDet-Ins
Update test_cfg
Support mask mosaic and mixup

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@RangiLyu RangiLyu changed the title [Enhance] Improve RTMDet AP with YOLO test config. [Feature] Support RTMDet-Ins and improve RTMDet test config. Dec 16, 2022
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/rtmdet_ins_head.py Outdated Show resolved Hide resolved
Comment on lines +715 to +717
for gt_instances in batch_gt_instances:
gt_instances.masks = gt_instances.masks.to_tensor(
dtype=torch.bool, device=device)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conversion overhead here is not negligible and it will slow down training. How about moving this to the data pipeline?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. We are considering moving this to PackDetInputs. But this modification is related to all instance segmentation methods. We will open another PR for the refactoring.

hhaAndroid
hhaAndroid previously approved these changes Dec 19, 2022
zytx121
zytx121 previously approved these changes Dec 19, 2022
Copy link
Collaborator

@zytx121 zytx121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZwwWayne ZwwWayne added this to the 3.0.0rc5 milestone Dec 19, 2022
@RangiLyu RangiLyu dismissed stale reviews from zytx121 and hhaAndroid via d012ba1 December 19, 2022 06:16
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@ZwwWayne ZwwWayne merged commit 8f4360f into open-mmlab:dev-3.x Dec 19, 2022
train_cfg=dict(
assigner=dict(type='DynamicSoftLabelAssigner', topk=13),
allowed_border=-1,
pos_weight=-1,
debug=False),
test_cfg=dict(
nms_pre=1000,
nms_pre=30000,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add comments in the config to indicate why and its outcome so that users can better understand it.

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

Successfully merging this pull request may close these issues.

5 participants