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

[Refactor]: Unified parameter initialization #4750

Merged
merged 39 commits into from
Apr 28, 2021

Conversation

hhaAndroid
Copy link
Collaborator

@hhaAndroid hhaAndroid commented Mar 11, 2021

Motivation

Refactoring model initialization methods based MMCV. For more information, please refer to open-mmlab/mmcv#780

Dependency

Models

Models that have been refactored as follow:

  • ATSS
  • CARAFE
  • Cascade R-CNN
  • Faster R-CNN
  • DCN
  • Double Head
  • Dynamic R-CNN
  • Empirical Attention
  • Foveabox
  • FreeAnchor
  • FASF
  • GCNet
  • GFL
  • GN
  • GROIE
  • Guided Anchoring
  • HRNet
  • HTC
  • MS R-CNN
  • NAS FPN
  • PAA
  • PAFPN
  • PISA
  • RepPoints
  • ResneSt
  • RetinaNet
  • GHM
  • RPN
  • SABL
  • SCNet
  • TridentNet
  • Sparse R-CNN
  • VFNet
  • YOLOV3
  • FPG
  • cascade_rpn
  • centripetalnet
  • cornernet
  • detectors
  • detr
  • nas_fcos
  • gn+ws (40.2/36.2) vs (40.6/36.6)
  • grid_rcnn
  • libra_rcnn
  • point_rend
  • regnet
  • res2net
  • ssd
  • yolact

All models have been checked and passed!

@hhaAndroid hhaAndroid requested a review from jshilong March 11, 2021 03:35
@ZwwWayne
Copy link
Collaborator

  1. Fix lint
  2. Involve @MeowZheng to have a look.

@hhaAndroid
Copy link
Collaborator Author

@MeowZheng @jshilong Please review the one-stage algorithm first, I tagged todo where I couldn't be sure.

mmdet/models/backbones/darknet.py Outdated Show resolved Hide resolved
mmdet/models/backbones/darknet.py Outdated Show resolved Hide resolved
mmdet/models/backbones/detectors_resnet.py Outdated Show resolved Hide resolved
mmdet/models/backbones/detectors_resnet.py Show resolved Hide resolved
mmdet/models/backbones/res2net.py Outdated Show resolved Hide resolved
mmdet/models/backbones/trident_resnet.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/nasfcos_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/yolact_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/yolact_head.py Outdated Show resolved Hide resolved
mmdet/models/necks/hrfpn.py Outdated Show resolved Hide resolved
mmdet/models/necks/nas_fpn.py Outdated Show resolved Hide resolved
mmdet/models/necks/rfp.py Outdated Show resolved Hide resolved
mmdet/models/necks/nasfcos_fpn.py Outdated Show resolved Hide resolved
mmdet/models/backbones/hourglass.py Outdated Show resolved Hide resolved
mmdet/models/backbones/res2net.py Show resolved Hide resolved
mmdet/models/dense_heads/cascade_rpn_head.py Show resolved Hide resolved
@jshilong jshilong self-requested a review March 18, 2021 12:11
@jshilong
Copy link
Collaborator

Please set self._is_init as True in all init_weight your overload in this PR.

Copy link

@MeowZheng MeowZheng left a comment

Choose a reason for hiding this comment

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

Many thanks for your nice work, it looks good.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hhaAndroid
❌ qwe12369
You have signed the CLA already but the status is still pending? Let us recheck it.

@hhaAndroid hhaAndroid requested a review from ZwwWayne March 29, 2021 09:34
@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #4750 (a11e276) into master (0425fb6) will decrease coverage by 1.18%.
The diff coverage is 80.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4750      +/-   ##
==========================================
- Coverage   66.03%   64.85%   -1.19%     
==========================================
  Files         261      261              
  Lines       20306    19915     -391     
  Branches     3466     3371      -95     
==========================================
- Hits        13410    12916     -494     
- Misses       6156     6251      +95     
- Partials      740      748       +8     
Flag Coverage Δ
unittests 64.85% <80.49%> (-1.15%) ⬇️

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

Impacted Files Coverage Δ
mmdet/models/detectors/atss.py 100.00% <ø> (ø)
mmdet/models/detectors/cascade_rcnn.py 50.00% <ø> (ø)
mmdet/models/detectors/cornernet.py 94.87% <ø> (-5.13%) ⬇️
mmdet/models/detectors/detr.py 100.00% <ø> (ø)
mmdet/models/detectors/fast_rcnn.py 43.75% <ø> (ø)
mmdet/models/detectors/faster_rcnn.py 100.00% <ø> (ø)
mmdet/models/detectors/fcos.py 100.00% <ø> (ø)
mmdet/models/detectors/fovea.py 100.00% <ø> (ø)
mmdet/models/detectors/fsaf.py 100.00% <ø> (ø)
mmdet/models/detectors/gfl.py 100.00% <ø> (ø)
... and 145 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0425fb6...a11e276. Read the comment docs.

@ZwwWayne ZwwWayne merged commit 670ecc2 into open-mmlab:master Apr 28, 2021
@shinya7y
Copy link
Contributor

Will recent detectors be modified?

  • Deformable DETR
  • YOLOF
  • AutoAssign
  • Localization Distillation

@hhaAndroid
Copy link
Collaborator Author

Will recent detectors be modified

No modification for the time being, if you think it is necessary, we can consider doing it in advance.

@shinya7y
Copy link
Contributor

Thanks. My understanding is that modification is not essential (except for backbones).

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.

7 participants