-
Notifications
You must be signed in to change notification settings - Fork 634
[Algorithm] Support Circular Smooth Label (CSL, ECCV'20) #153
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c5bf348
Bump version to v0.1.1
ZwwWayne 5fc6347
[Algorithm] Support CSL
yangxue0827 570af21
rm inplace operation in gwd
yangxue0827 58f57d7
fix typo in redet config
yangxue0827 5b46239
update comments, delete useless code, and fix bugs
yangxue0827 dad3a70
fix typo
yangxue0827 d9f2454
add docstring
yangxue0827 b9f32e0
fix docstring typo
yangxue0827 2ee14d3
Organize comments
yangxue0827 98254e1
Add description to anchor generator
yangxue0827 a6c81b3
Delete useless code
yangxue0827 234682e
Add more comments
yangxue0827 d1742b6
fix urls
yangxue0827 1f2278a
speed up csl head
yangxue0827 0511856
update docstring
yangxue0827 7349f30
fix cls-pulse bug
yangxue0827 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # CSL | ||
| > [Arbitrary-Oriented Object Detection with Circular Smooth Label](https://link.springer.com/chapter/10.1007/978-3-030-58598-3_40) | ||
|
|
||
| <!-- [ALGORITHM] --> | ||
| ## Abstract | ||
|
|
||
| <div align=center> | ||
| <img src="https://raw.githubusercontent.com/zytx121/image-host/main/imgs/csl.jpg" width="800"/> | ||
| </div> | ||
|
|
||
| Arbitrary-oriented object detection has recently attracted increasing attention in vision for their importance | ||
| in aerial imagery, scene text, and face etc. In this paper, we show that existing regression-based rotation detectors | ||
| suffer the problem of discontinuous boundaries, which is directly caused by angular periodicity or corner ordering. | ||
| By a careful study, we find the root cause is that the ideal predictions are beyond the defined range. We design a | ||
| new rotation detection baseline, to address the boundary problem by transforming angular prediction from a regression | ||
| problem to a classification task with little accuracy loss, whereby high-precision angle classification is devised in | ||
| contrast to previous works using coarse-granularity in rotation detection. We also propose a circular smooth label (CSL) | ||
| technique to handle the periodicity of the angle and increase the error tolerance to adjacent angles. We further | ||
| introduce four window functions in CSL and explore the effect of different window radius sizes on detection performance. | ||
| Extensive experiments and visual analysis on two large-scale public datasets for aerial images i.e. DOTA, HRSC2016, | ||
| as well as scene text dataset ICDAR2015 and MLT, show the effectiveness of our approach. | ||
|
|
||
| ## Results and models | ||
|
|
||
| DOTA1.0 | ||
|
|
||
| | Backbone | mAP | Angle | Window func. | Omega | lr schd | Mem (GB) | Inf Time (fps) | Aug | Batch Size | Configs | Download | | ||
| |:------------:|:----------:|:-----------:|:-----------:|:-----------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:-------------:| | ||
| | ResNet50 (1024,1024,200) | 68.42 | le90 | - | - | 1x | 3.38 | 17.8 | - | 2 | [rotated_retinanet_obb_r50_fpn_1x_dota_le90](./rotated_retinanet_obb_r50_fpn_1x_dota_le90.py) | [model](https://download.openmmlab.com/mmrotate/v0.1.0/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le90/rotated_retinanet_obb_r50_fpn_1x_dota_le90-c0097bc4.pth) | [log](https://download.openmmlab.com/mmrotate/v0.1.0/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le90/rotated_retinanet_obb_r50_fpn_1x_dota_le90_20220128_130740.log.json) | ||
| | ResNet50 (1024,1024,200) | 68.79 | le90 | - | - | 1x | 2.36 | 25.9 | - | 2 | [rotated_retinanet_obb_r50_fpn_fp16_1x_dota_le90](./rotated_retinanet_obb_r50_fpn_fp16_1x_dota_le90.py) | [model](https://download.openmmlab.com/mmrotate/v0.1.0/rotated_retinanet/rotated_retinanet_obb_r50_fpn_fp16_1x_dota_le90/rotated_retinanet_obb_r50_fpn_fp16_1x_dota_le90-01de71b5.pth) | [log](https://download.openmmlab.com/mmrotate/v0.1.0/rotated_retinanet/rotated_retinanet_obb_r50_fpn_fp16_1x_dota_le90/rotated_retinanet_obb_r50_fpn_fp16_1x_dota_le90_20220303_183714.log.json) | ||
| | ResNet50 (1024,1024,200) | 69.51 | le90 | Gaussian | 4 | 1x | 2.60 | 24.0 | - | 2 | [rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90](./rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90.py) | [model](https://download.openmmlab.com/mmrotate/v0.1.0/csl/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90-b4271aed.pth) | [log](https://download.openmmlab.com/mmrotate/v0.1.0/csl/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90_20220321_010033.log.json) | ||
|
|
||
|
|
||
| ## Citation | ||
| ``` | ||
| @inproceedings{yang2020arbitrary, | ||
| title={Arbitrary-Oriented Object Detection with Circular Smooth Label}, | ||
| author={Yang, Xue and Yan, Junchi}, | ||
| booktitle={European Conference on Computer Vision}, | ||
| pages={677--694}, | ||
| year={2020} | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| Collections: | ||
| - Name: CSL | ||
| Metadata: | ||
| Training Data: DOTAv1.0 | ||
| Training Techniques: | ||
| - SGD with Momentum | ||
| - Weight Decay | ||
| Training Resources: 1x Quadro RTX 8000 | ||
| Architecture: | ||
| - ResNet | ||
| Paper: | ||
| URL: https://link.springer.com/chapter/10.1007/978-3-030-58598-3_40 | ||
| Title: 'Arbitrary-Oriented Object Detection with Circular Smooth Label' | ||
| README: configs/csl/README.md | ||
|
|
||
| Models: | ||
| - Name: rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90 | ||
| In Collection: csl | ||
| Config: configs/csl/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90.py | ||
| Metadata: | ||
| Training Data: DOTAv1.0 | ||
| Results: | ||
| - Task: Oriented Object Detection | ||
| Dataset: DOTAv1.0 | ||
| Metrics: | ||
| mAP: 69.51 | ||
| Weights: https://download.openmmlab.com/mmrotate/v0.1.0/csl/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90-b4271aed.pth |
22 changes: 22 additions & 0 deletions
22
configs/csl/rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| _base_ = \ | ||
| ['../rotated_retinanet/rotated_retinanet_obb_r50_fpn_fp16_1x_dota_le90.py'] | ||
|
|
||
| angle_version = 'le90' | ||
| model = dict( | ||
| bbox_head=dict( | ||
| type='CSLRRetinaHead', | ||
| angle_coder=dict( | ||
| type='CSLCoder', | ||
| angle_version=angle_version, | ||
| omega=4, | ||
| window='gaussian', | ||
| radius=3), | ||
| loss_cls=dict( | ||
| type='FocalLoss', | ||
| use_sigmoid=True, | ||
| gamma=2.0, | ||
| alpha=0.25, | ||
| loss_weight=1.0), | ||
| loss_bbox=dict(type='L1Loss', loss_weight=1.0), | ||
| loss_angle=dict( | ||
| type='SmoothFocalLoss', gamma=2.0, alpha=0.25, loss_weight=0.8))) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| # Copyright (c) OpenMMLab. All rights reserved. | ||
| from .angle_coder import CSLCoder | ||
zytx121 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| from .delta_midpointoffset_rbbox_coder import MidpointOffsetCoder | ||
| from .delta_xywha_hbbox_coder import DeltaXYWHAHBBoxCoder | ||
| from .delta_xywha_rbbox_coder import DeltaXYWHAOBBoxCoder | ||
| from .gliding_vertex_coder import GVFixCoder, GVRatioCoder | ||
|
|
||
| __all__ = [ | ||
| 'DeltaXYWHAOBBoxCoder', 'DeltaXYWHAHBBoxCoder', 'MidpointOffsetCoder', | ||
| 'GVFixCoder', 'GVRatioCoder' | ||
| 'GVFixCoder', 'GVRatioCoder', 'CSLCoder' | ||
| ] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.