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

[Algorithm] Support H2RBox #644

Merged
merged 33 commits into from
Dec 6, 2022
Merged

[Algorithm] Support H2RBox #644

merged 33 commits into from
Dec 6, 2022

Conversation

yangxue0827
Copy link
Collaborator

@yangxue0827 yangxue0827 commented Nov 24, 2022

Motivation

  • Support weakly supervised oriented object detection algorithm H2Rbox in MMRotate 1.x
  • Support DOTA-v1.5 and DOTA-v2.0

Modification

Performance

  • Performance on DOTA1.0

This PR

Backbone mAP Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 68.75 le90 1x 6.25 - 2 h2rbox-le90_r50_fpn_adamw-1x_dota
ResNet50 (1024,1024,200) 71.31 le90 3x 6.64 - 2 h2rbox-le90_r50_fpn_adamw-3x_dota
ResNet50 (1024,1024,200) 74.43 le90 1x 6.12 - - 2 h2rbox-le90_r50_fpn_adamw-1x_dota-ms

Original PyTorch Implementation (Paper)

Backbone mAP Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 67.45 le90 1x 7.02 28.5 - 2 h2rbox_r50_adamw_fpn_1x_dota_le90
ResNet50 (1024,1024,200) 70.77 le90 3x 7.02 28.5 - 2 h2rbox_r50_adamw_fpn_3x_dota_le90
ResNet50 (1024,1024,200) 74.40 le90 1x 8.58 - - 2 h2rbox_r50_adamw_fpn_3x_dota_ms_le90

Jittor Implementation

Backbone mAP Angle lr schd MS Batch Size Configs
ResNet50 (1024,1024,200) 67.62 le135 1x - 2 h2rbox_obb_r50_adamw_fpn_1x_dota
  • Performance on DOTA1.5

This PR

Backbone mAP Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 60.33 le90 1x 6.83 - 2 h2rbox-le90_r50_fpn_adamw-1x_dotav15
ResNet50 (1024,1024,200) 62.65 le90 1x 6.34 - 2 h2rbox-le90_r50_fpn_adamw-3x_dotav15

Original PyTorch Implementation (Paper)

Backbone mAP Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 60.19 le90 1x 10.68 25.8 - 2 h2rbox_r50_adamw_fpn_1x_dotav15_le90
ResNet50 (1024,1024,200) 62.60 le90 3x 10.68 25.8 - 2 h2rbox_r50_adamw_fpn_3x_dotav15_le90
  • Performance on DOTA2.0

This PR

Backbone mAP Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 47.08 le90 1x 7.58 - 2 h2rbox-le90_r50_fpn_adamw-1x_dotav2
ResNet50 (1024,1024,200) 50.20 le90 1x 7.74 - 2 h2rbox-le90_r50_fpn_adamw-3x_dotav2

Original PyTorch Implementation (Paper)

Backbone mAP Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 45.87 le90 1x 11.57 25.0 - 2 h2rbox_r50_adamw_fpn_1x_dotav2_le90
ResNet50 (1024,1024,200) 47.86 le90 3x 11.57 25.0 - 2 h2rbox_r50_adamw_fpn_3x_dotav2_le90
  • Performance on DIOR

This PR

Backbone AP50:95 AP50 AP75 Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 33.06 57.40 32.50 le90 1x 3.83 - 2 h2rbox-le90_r50_fpn_adamw-1x_dior

Original PyTorch Implementation (Paper)

Backbone AP50:95 AP50 AP75 Angle lr schd Mem (GB) Inf Time (fps) MS Batch Size Configs
ResNet50 (1024,1024,200) 33.15 57.00 32.60 le90 1x 3.83 - 2 h2rbox_r50_adamw_fpn_1x_dior_le90

Notes

  • MS means multiple scale image split.
  • Inf Time was tested on a single RTX3090.
  • The memory log of MMRotate 1.x is dynamic, so the last iteration is recorded here.

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Base: 61.20% // Head: 80.35% // Increases project coverage by +19.15% 🎉

Coverage data is based on head (b06e250) compared to base (e8c6eb8).
Patch coverage: 90.25% of modified lines in pull request are covered.

❗ Current head b06e250 differs from pull request most recent head 7a73f36. Consider uploading reports for the commit 7a73f36 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           dev-1.x     #644       +/-   ##
============================================
+ Coverage    61.20%   80.35%   +19.15%     
============================================
  Files           96       98        +2     
  Lines         6562     6806      +244     
  Branches       932      960       +28     
============================================
+ Hits          4016     5469     +1453     
+ Misses        2329     1024     -1305     
- Partials       217      313       +96     
Flag Coverage Δ
unittests ?

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

Impacted Files Coverage Δ
mmrotate/models/detectors/h2rbox.py 85.48% <85.48%> (ø)
mmrotate/models/dense_heads/h2rbox_head.py 89.83% <89.83%> (ø)
mmrotate/datasets/__init__.py 100.00% <100.00%> (ø)
mmrotate/datasets/dota.py 89.74% <100.00%> (+0.85%) ⬆️
mmrotate/models/dense_heads/__init__.py 100.00% <100.00%> (ø)
mmrotate/models/detectors/__init__.py 100.00% <100.00%> (ø)
mmrotate/models/losses/__init__.py 100.00% <100.00%> (ø)
mmrotate/models/losses/h2rbox_consistency_loss.py 100.00% <100.00%> (ø)
mmrotate/evaluation/metrics/dota_metric.py 87.00% <0.00%> (-1.13%) ⬇️
... and 28 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.

docs/zh_cn/model_zoo.md Outdated Show resolved Hide resolved
docs/en/model_zoo.md Outdated Show resolved Hide resolved
mmrotate/models/dense_heads/h2rbox_head.py Outdated Show resolved Hide resolved
mmrotate/models/dense_heads/h2rbox_head.py Outdated Show resolved Hide resolved
mmrotate/models/dense_heads/h2rbox_head.py Outdated Show resolved Hide resolved
mmrotate/models/losses/h2rbox_consistency_loss.py Outdated Show resolved Hide resolved
mmrotate/models/losses/h2rbox_consistency_loss.py Outdated Show resolved Hide resolved
mmrotate/models/losses/h2rbox_consistency_loss.py Outdated Show resolved Hide resolved
mmrotate/models/losses/h2rbox_consistency_loss.py Outdated Show resolved Hide resolved
mmrotate/models/losses/h2rbox_consistency_loss.py Outdated Show resolved Hide resolved
zytx121
zytx121 previously approved these changes Nov 30, 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

zytx121
zytx121 previously approved these changes Nov 30, 2022
liuyanyi
liuyanyi previously approved these changes Dec 1, 2022
Copy link
Collaborator

@liuyanyi liuyanyi left a comment

Choose a reason for hiding this comment

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

LGTM

@yangxue0827 yangxue0827 added the WIP label Dec 1, 2022
@yangxue0827 yangxue0827 dismissed stale reviews from liuyanyi and zytx121 via 7a73f36 December 1, 2022 08:46
@yangxue0827 yangxue0827 removed the WIP label Dec 1, 2022
@RangiLyu RangiLyu merged commit 22320aa into open-mmlab:dev-1.x Dec 6, 2022
@zytx121 zytx121 mentioned this pull request Dec 30, 2022
triple-Mu pushed a commit to triple-Mu/mmrotate that referenced this pull request Jan 31, 2023
* [Algorithm] Support H2RBox

* upload config and readme

* Update dota.py

* update unit loss test

* fix ci

* delete useless codes

* update other implementation

* Create test_h2rbox_head.py

* Upload 3x config

* Update 3x performance

* support dotav1.5 and dotav2

* Update h2rbox performance on dotav15

* Update dotav2

* Update dotav2.py

* Update ms performance on dota

* Update dotav2.py

* Create h2rbox-le90_r50_fpn_adamw-1x_dotav2.py

* Update performance on dotav2

* Create h2rbox-le90_r50_fpn_adamw-3x_dotav15.py

* Update 3x performance on dotav15

* Create h2rbox-le90_r50_fpn_adamw-3x_dotav2.py

* update 3x performance on dotav2

* Add H2Rbox in README

* Add h2rbox in model zoo

* Update test_dota.py

* Create metafile.yml

* Update weights and logs

* Fix

* Update __init__.py

* Create h2rbox-le90_r50_fpn_adamw-1x_dior.py

* Update performance on dior

* Fix wrong param name

Co-authored-by: Yue Zhou <[email protected]>
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.

4 participants