Skip to content

[Refactor] Rotated FCOS#543

Merged
RangiLyu merged 8 commits intoopen-mmlab:dev-1.xfrom
liuyanyi:fcos_1.x
Oct 11, 2022
Merged

[Refactor] Rotated FCOS#543
RangiLyu merged 8 commits intoopen-mmlab:dev-1.xfrom
liuyanyi:fcos_1.x

Conversation

@liuyanyi
Copy link
Collaborator

@liuyanyi liuyanyi commented Oct 9, 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

Compared with 0.x, Rotated FCOSHead and CSLFCOSHead merged together.
Added a argument use_hbbox_loss to replace separate_angle to make it better understanding.

Before:
Arg separate_angle control the type of bbox_loss used and whether angle loss is enabled.

After:
Arg use_hbbox_loss control the type of bbox_loss. Whether angle loss is enabled is controlled by loss_angle.
In this case we can use Rotated IoU Loss and L1Loss together, Rotated IoU Loss for bbox, L1 for angle auxiliary losses.

Results:

model Reported ap50 map ap50 ap75
Rotated FCOS 71.28 41.10 70.87 41.21
Rotated FCOS kld 71.89 40.37 71.55 38.92
Rotated FCOS hbb csl 71.76 40.22 70.79 39.26
Rotated FCOS hbb 70.70 38.06 69.71 34.81
Rotated FCOS + l1 - 40.90 71.18 40.87

Note: The result is not stable and may have 1% ap difference. Training process may have unstable too.

We should do some exps on tricks and losses to find the best config settings.

Add l1 loss for angle, results does not appear to have improved, but it has not decreased either.

Modification

  • RotatedFCOSHead
  • PseudoAngleCoder
  • Fix F.cosine_similarity typo in oriented_reppoints
  • Fix typo of encode_size
  • Fix CSLCoder empty input when keepdim=True

BC-breaking (Optional)

Does the modification introduce changes that break the back-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. The documentation has been modified accordingly, like docstring or example tutorials.

@zytx121 zytx121 added the dev-1.x label Oct 9, 2022
zytx121
zytx121 previously approved these changes Oct 10, 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

Copy link
Member

@RangiLyu RangiLyu left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants