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

Suitable for Ascend. Modify SSD and RetinaHead Model #9614

Merged
merged 13 commits into from Jan 18, 2023
Merged

Suitable for Ascend. Modify SSD and RetinaHead Model #9614

merged 13 commits into from Jan 18, 2023

Conversation

akstt
Copy link

@akstt akstt commented Jan 11, 2023

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

Suitable for Ascend. Modify SSD and RetinaHead Model.

Modification

  • The main modification points are as follows:
    1. Create a new file mmdet/models/dense_heads/ascend_anchor_head.py. Create class AscendAnchorHead that inherits class AnchorHead.
    2. Create a new file mmdet/models/dense_heads/ascend_retina_head.py. Create class AscendRetinaHead that inherits class RetinaHead and class AscendAnchorHead.
    3. Create a new file mmdet/models/dense_heads/ascend_ssd_head.py. Create class AscendSSDHead that inherits class SSDHead and class AscendAnchorHead.
    4. Create a new file mmdet/core/bbox/assigners/ascend_assign_result.py. Create class AscendAssignResult that similar class AssignResult.
    5. Create a new file mmdet/core/bbox/assigners/ascend_max_iou_assigner.py. Create class AscendMaxIoUAssigner that similar class MaxIoUAssigner.
    6. Create a new file mmdet/utils/ascend_util.py. Build function that suitable ascend.
    7. Modify mmdet/models/dense_heads/__init__.py, mmdet/core/bbox/assigners/__init__.py, mmdet/utils/__init__.py. For new classes and functions can be able to be called into.

BC-breaking (Optional)

None

Use cases (Optional)

  • test case
    • tests/test_models/test_dense_heads/test_ascend_head.py

Checklist

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

@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Base: 64.17% // Head: 64.34% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (8f927c0) compared to base (91a4539).
Patch coverage: 81.91% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9614      +/-   ##
==========================================
+ Coverage   64.17%   64.34%   +0.16%     
==========================================
  Files         363      369       +6     
  Lines       29661    29942     +281     
  Branches     4943     4992      +49     
==========================================
+ Hits        19036    19267     +231     
- Misses       9615     9649      +34     
- Partials     1010     1026      +16     
Flag Coverage Δ
unittests 64.33% <81.91%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmdet/utils/ascend_util.py 68.00% <68.00%> (ø)
...det/core/bbox/assigners/ascend_max_iou_assigner.py 72.72% <72.72%> (ø)
mmdet/models/dense_heads/ascend_ssd_head.py 84.21% <84.21%> (ø)
mmdet/models/dense_heads/ascend_anchor_head.py 85.32% <85.32%> (ø)
mmdet/core/bbox/assigners/__init__.py 100.00% <100.00%> (ø)
mmdet/core/bbox/assigners/ascend_assign_result.py 100.00% <100.00%> (ø)
mmdet/models/dense_heads/__init__.py 100.00% <100.00%> (ø)
mmdet/models/dense_heads/ascend_retina_head.py 100.00% <100.00%> (ø)
mmdet/utils/__init__.py 100.00% <100.00%> (ø)
mmdet/utils/rfnext.py 0.00% <0.00%> (-17.65%) ⬇️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ZwwWayne ZwwWayne assigned hhaAndroid and unassigned zytx121 Jan 16, 2023
@ZwwWayne ZwwWayne added this to the 2.28.0 milestone Jan 16, 2023
mmdet/core/bbox/assigners/ascend_assign_result.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/ascend_assign_result.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/ascend_max_iou_assigner.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ascend_anchor_head.py Outdated Show resolved Hide resolved
mmdet/utils/ascend_util.py Outdated Show resolved Hide resolved
mmdet/utils/ascend_util.py Outdated Show resolved Hide resolved
mmdet/utils/ascend_util.py Outdated Show resolved Hide resolved
mmdet/utils/ascend_util.py Show resolved Hide resolved
mmdet/utils/ascend_util.py Show resolved Hide resolved
@ZwwWayne ZwwWayne merged commit 9054e4c into open-mmlab:dev Jan 18, 2023
@jason102811
Copy link

Dear akstt,
First of all, we want to express our gratitude for your significant PR in the MMDet . Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.
As a valued contributor, we would also like to invite you to join our Special Interest Group (SIG) private channel, where you can share your experiences, ideas, and build connections with like-minded peers.
Join us :https://discord.gg/raweFPmdzG
To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. We look forward to seeing you there!
Also,if you have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx,or scan the following QR code to join us. Please add "mmsig + Github ID" as a remark when adding friends:)
Best regards! @akstt

thmegy pushed a commit to thmegy/mmdetection that referenced this pull request May 5, 2023
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

5 participants