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

[Fix] Fix two significant bugs in SOT and provide new SOT pretrained models #349

Merged
merged 15 commits into from
Dec 9, 2021

Conversation

JingweiZhang12
Copy link
Collaborator

@JingweiZhang12 JingweiZhang12 commented Dec 1, 2021

This PR mainly contains the following:

  1. **Fix bug: ** The gradient of some SiamRPN++ parameters initially fixed are out of sync in DDP after they are required updated halfway through training.
  2. **Fix bug: ** Considering the performance fluctuation in SOT, we set the fixed seed, deterministic=True and cudnn_benchmark=False in SOT configs.
  3. Fix the typos about fp16 path.
  4. Provide new pretrained models for SiameseRPN++

@JingweiZhang12 JingweiZhang12 changed the title [Fix] results of eval hook and test are not aligned [Fix] results of eval hook and test are not aligned in SOT Dec 1, 2021
configs/sot/siamese_rpn/siamese_rpn_r50_1x_lasot.py Outdated Show resolved Hide resolved
mmtrack/models/backbones/sot_resnet.py Show resolved Hide resolved
configs/sot/siamese_rpn/README.md Outdated Show resolved Hide resolved
@JingweiZhang12 JingweiZhang12 changed the title [Fix] results of eval hook and test are not aligned in SOT [Fix] Parameters' grad is out of sync in DDP and performance fluctuation in SOT Dec 2, 2021
@JingweiZhang12 JingweiZhang12 changed the title [Fix] Parameters' grad is out of sync in DDP and performance fluctuation in SOT [Fix] Parameters' grads are out of sync in DDP and performance fluctuation in SOT Dec 2, 2021
@@ -164,6 +164,27 @@ class SOTResNet(ResNet):
def __init__(self, depth, *args, **kwargs):
assert depth == 50, 'Only support r50 backbone for sot.'
super(SOTResNet, self).__init__(depth, *args, **kwargs)
# unfreeze the backbone parameters so that DDP can build all parameters
# into buckets.
self._unfreeze_stages()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need a bool variable (e.g. unfreeze_backbone) to control whether do _unfreeze_stages?

@JingweiZhang12 JingweiZhang12 requested a review from GT9505 December 7, 2021 12:52
@codecov
Copy link

codecov bot commented Dec 7, 2021

Codecov Report

Merging #349 (c9c8c34) into master (7687ad0) will increase coverage by 0.46%.
The diff coverage is 71.24%.

❗ Current head c9c8c34 differs from pull request most recent head 1f52cd4. Consider uploading reports for the commit 1f52cd4 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #349      +/-   ##
==========================================
+ Coverage   69.52%   69.99%   +0.46%     
==========================================
  Files          94      107      +13     
  Lines        4709     5519     +810     
  Branches      906     1083     +177     
==========================================
+ Hits         3274     3863     +589     
- Misses       1149     1324     +175     
- Partials      286      332      +46     
Flag Coverage Δ
unittests 69.88% <71.13%> (+0.40%) ⬆️

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

Impacted Files Coverage Δ
mmtrack/apis/inference.py 12.50% <0.00%> (+0.12%) ⬆️
mmtrack/core/evaluation/eval_sot_ope.py 91.48% <ø> (ø)
mmtrack/core/utils/visualization.py 40.18% <0.00%> (-7.60%) ⬇️
mmtrack/datasets/pipelines/transforms.py 88.62% <ø> (ø)
mmtrack/datasets/sot_train_dataset.py 85.85% <ø> (ø)
mmtrack/models/mot/__init__.py 100.00% <ø> (ø)
mmtrack/models/motion/kalman_filter.py 92.30% <ø> (ø)
mmtrack/models/roi_heads/selsa_roi_head.py 80.59% <0.00%> (ø)
mmtrack/models/sot/base.py 47.00% <0.00%> (ø)
mmtrack/models/trackers/base_tracker.py 84.73% <ø> (ø)
... and 53 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 cccb34c...1f52cd4. Read the comment docs.

configs/sot/siamese_rpn/README.md Outdated Show resolved Hide resolved
configs/sot/siamese_rpn/README.md Outdated Show resolved Hide resolved
configs/sot/siamese_rpn/README.md Outdated Show resolved Hide resolved
@JingweiZhang12 JingweiZhang12 requested a review from GT9505 December 9, 2021 04:20
@GT9505 GT9505 changed the title [Fix] Parameters' grads are out of sync in DDP and performance fluctuation in SOT [Fix] Fix two significant bugs in SOT and provide new SOT pretrained models Dec 9, 2021
@GT9505 GT9505 merged commit 7ee4302 into open-mmlab:master Dec 9, 2021
@JingweiZhang12 JingweiZhang12 deleted the ddp_fix branch April 29, 2022 02:29
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.

2 participants