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] Add 6 data pipelines used in STARK method #426

Merged
merged 16 commits into from
Feb 17, 2022

Conversation

JingweiZhang12
Copy link
Collaborator

@JingweiZhang12 JingweiZhang12 commented Feb 12, 2022

We add 6 data pipelines used in STARK method as the following:

  1. TridentSampling
  2. SeqBboxJitter
  3. SeqCropLikeStark
  4. SeqBrightnessAug
  5. CheckDataValidity
  6. ConcatSameTypeFrames

@JingweiZhang12
Copy link
Collaborator Author

JingweiZhang12 commented Feb 12, 2022

Maybe we can include the original 'ConcatVideoReferences' function into the new 'ConcatVideo2TwoParts' function?

@codecov
Copy link

codecov bot commented Feb 12, 2022

Codecov Report

Merging #426 (ff2f979) into master (301f935) will increase coverage by 0.44%.
The diff coverage is 83.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
+ Coverage   70.89%   71.33%   +0.44%     
==========================================
  Files         117      117              
  Lines        6249     6534     +285     
  Branches     1198     1250      +52     
==========================================
+ Hits         4430     4661     +231     
- Misses       1460     1488      +28     
- Partials      359      385      +26     
Flag Coverage Δ
unittests 71.25% <82.75%> (+0.43%) ⬆️

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

Impacted Files Coverage Δ
mmtrack/datasets/pipelines/formatting.py 68.01% <70.17%> (-0.88%) ⬇️
mmtrack/datasets/pipelines/processing.py 80.17% <77.65%> (-10.74%) ⬇️
mmtrack/datasets/pipelines/transforms.py 89.90% <95.32%> (+3.98%) ⬆️
mmtrack/datasets/pipelines/__init__.py 100.00% <100.00%> (ø)
mmtrack/models/reid/base_reid.py 78.26% <0.00%> (-8.70%) ⬇️
mmtrack/datasets/got10k_dataset.py 81.70% <0.00%> (-4.37%) ⬇️
mmtrack/datasets/trackingnet_dataset.py 78.94% <0.00%> (-1.88%) ⬇️
mmtrack/models/trackers/base_tracker.py 84.73% <0.00%> (-1.53%) ⬇️
mmtrack/datasets/base_sot_dataset.py 86.76% <0.00%> (-0.26%) ⬇️
mmtrack/datasets/mot_challenge_dataset.py 73.48% <0.00%> (-0.26%) ⬇️
... 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 301f935...ff2f979. Read the comment docs.

@GT9505
Copy link
Collaborator

GT9505 commented Feb 14, 2022

Maybe we can include the original 'ConcatVideoReferences' function into the new 'ConcatVideo2TwoParts' function?

Souds well. But We still need to keep the interface of ConcatVideoReferences

mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/formatting.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/processing.py Show resolved Hide resolved
mmtrack/datasets/pipelines/processing.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/processing.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/transforms.py Outdated Show resolved Hide resolved
mmtrack/datasets/pipelines/transforms.py Show resolved Hide resolved
mmtrack/datasets/pipelines/transforms.py Show resolved Hide resolved
outs = []
for i, _results in enumerate(results):
image = _results['img']
gt_bbox = _results[_results.get('bbox_fields', [])[0]][0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we change all _results.get('bbox_fields', [])[0] to 'gt_bboxes'?

Copy link
Collaborator Author

@JingweiZhang12 JingweiZhang12 Feb 16, 2022

Choose a reason for hiding this comment

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

I think it's no problem. I do this mainly refer to SeqCropLikeSiamFC though I don't know why.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then please also change the codes in SeqCropLikeSiamFC

_results['img_shape'] = crop_img.shape
_results[_results.get('bbox_fields', [])[0]] = generated_bbox
_results['seg_fields'] = ['att_mask']
_results[_results.get('seg_fields', [])[0]] = att_mask
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not use _results.get('seg_fields', [])[0] to get the mask.
The xxx_field is used for preprocessing some variables with the same type, do not use hard code [0] to get the specific variable.
You should use _results['att_mask'] = att_mask to record the mask

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do this mainly because the mask also need to be cropped in SeqRandomFlip to keep the same offset
as image cropping.
In our codebase, this operation is applicable only when adding 'mask' into 'seg_fields'.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then please use _results['att_mask'] = att_mask to record the mask

@GT9505 GT9505 changed the title [Feature] Add 6 preprocessing functions used in STARK to the data pipeline [Feature] Add 6 data pipelines used in STARK method Feb 17, 2022
@GT9505 GT9505 merged commit b62250d into open-mmlab:master Feb 17, 2022
@JingweiZhang12 JingweiZhang12 deleted the stark_pipeline branch October 13, 2022 11:49
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