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

[Feature] Support STARK training #434

Merged
merged 18 commits into from
Feb 23, 2022

Conversation

JingweiZhang12
Copy link
Collaborator

No description provided.

@JingweiZhang12
Copy link
Collaborator Author

JingweiZhang12 commented Feb 18, 2022

  1. The head of STARK doesn't have functions such as get_targets like siamprn++, and the unit test of stark head is all included in the test_stark_forward, so I don't write repeatedly unit test about stark_head.py.

@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #434 (f07b1f2) into master (297c106) will increase coverage by 0.78%.
The diff coverage is 89.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #434      +/-   ##
==========================================
+ Coverage   71.23%   72.01%   +0.78%     
==========================================
  Files         119      121       +2     
  Lines        6748     6954     +206     
  Branches     1294     1326      +32     
==========================================
+ Hits         4807     5008     +201     
  Misses       1546     1546              
- Partials      395      400       +5     
Flag Coverage Δ
unittests 71.91% <89.42%> (+0.73%) ⬆️

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

Impacted Files Coverage Δ
mmtrack/models/sot/stark.py 80.85% <80.85%> (ø)
mmtrack/models/track_heads/stark_head.py 91.71% <91.71%> (ø)
mmtrack/models/sot/__init__.py 100.00% <100.00%> (ø)
mmtrack/models/track_heads/__init__.py 100.00% <100.00%> (ø)
mmtrack/models/reid/base_reid.py 78.26% <0.00%> (-8.70%) ⬇️
mmtrack/models/trackers/base_tracker.py 84.73% <0.00%> (-1.53%) ⬇️
mmtrack/datasets/pipelines/transforms.py 88.07% <0.00%> (+0.91%) ⬆️
mmtrack/models/sot/siamrpn.py 81.56% <0.00%> (+1.11%) ⬆️
mmtrack/datasets/sot_train_dataset.py 85.85% <0.00%> (+3.03%) ⬆️
mmtrack/datasets/pipelines/processing.py 80.17% <0.00%> (+5.17%) ⬆️
... and 1 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 297c106...f07b1f2. Read the comment docs.

@JingweiZhang12
Copy link
Collaborator Author

The refactored code of STARK testing is ready, I will create PR of that after this PR is merged.

Copy link
Collaborator

@GT9505 GT9505 left a comment

Choose a reason for hiding this comment

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

In the forward_train of stark, we only need to

  1. extract the features of imgs,
  2. pass the feature into the head
  3. get the training targets from head
  4. compute loss
    you can refer to siamrpn

mmtrack/models/sot/stark.py Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@GT9505 GT9505 left a comment

Choose a reason for hiding this comment

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

If there is anything that makes you confused, you can discuss it with me.

Copy link
Collaborator

@GT9505 GT9505 left a comment

Choose a reason for hiding this comment

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

Generally speaking, the model can only call the general API of head, such as head.init_weights, head.loss and so on.
The model should not call the unique attribute of head, such as head.run_cls_head, head.run_reg_head, head.cls_head, head.reg_head and so on.

mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/track_heads/stark_head.py Show resolved Hide resolved
mmtrack/models/track_heads/stark_head.py Outdated Show resolved Hide resolved
mmtrack/models/track_heads/stark_head.py Outdated Show resolved Hide resolved
mmtrack/models/track_heads/stark_head.py Outdated Show resolved Hide resolved
mmtrack/models/track_heads/stark_head.py Outdated Show resolved Hide resolved
mmtrack/models/track_heads/stark_head.py Outdated Show resolved Hide resolved
mmtrack/models/sot/stark.py Outdated Show resolved Hide resolved
mmtrack/models/track_heads/stark_head.py Outdated Show resolved Hide resolved
@GT9505 GT9505 merged commit 91a742e into open-mmlab:master Feb 23, 2022
@JingweiZhang12 JingweiZhang12 deleted the stark_train_new branch October 13, 2022 11:50
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.

None yet

2 participants