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]modify dict keys of sot tracking outputs #223

Merged
merged 19 commits into from
Jul 30, 2021

Conversation

JingweiZhang12
Copy link
Collaborator

@JingweiZhang12 JingweiZhang12 commented Jul 27, 2021

replace "score" and "bbox" to "track_results" in dict keys of sot tracking outputs

@JingweiZhang12 JingweiZhang12 changed the title [Fix]For dict keys of tracking outputs, replace "score" and "bbox" to "track_results" [Fix]modify dict keys of sot tracking outputs Jul 27, 2021
@GT9505
Copy link
Collaborator

GT9505 commented Jul 27, 2021

please fix the lint error firstly.

@@ -75,7 +75,8 @@ def evaluate(self, results, metric=['track'], logger=None):
inds.append(len(self.data_infos))

track_results = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change track_results to track_bboxes.
Please also fix the unittest errors.

Copy link
Collaborator

@GT9505 GT9505 Jul 28, 2021

Choose a reason for hiding this comment

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

we should change the code to :
track_bboxes = [
results['track_results'][inds[i]:inds[i + 1]][:4]
for i in range(num_vids)
]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

results['track_results'] is the list[list[nparray]] format

zhangjingwei added 2 commits July 28, 2021 15:50
@@ -452,7 +452,7 @@ def test_lasot_evaluation():
x1, y1, x2, y2 = result.split(',')
track_results.append(np.array([int(x1), int(y1), int(x2), int(y2)]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

The track_results need append a score to be consistent with the above code.

@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #223 (f49e4d7) into master (a8b4152) will decrease coverage by 0.44%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #223      +/-   ##
==========================================
- Coverage   69.81%   69.37%   -0.45%     
==========================================
  Files          87       87              
  Lines        4496     4496              
  Branches      877      877              
==========================================
- Hits         3139     3119      -20     
- Misses       1060     1071      +11     
- Partials      297      306       +9     
Flag Coverage Δ
unittests 69.37% <100.00%> (-0.41%) ⬇️

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

Impacted Files Coverage Δ
mmtrack/datasets/lasot_dataset.py 82.22% <100.00%> (ø)
mmtrack/models/sot/siamrpn.py 89.05% <100.00%> (ø)
mmtrack/models/reid/base_reid.py 75.00% <0.00%> (-10.00%) ⬇️
mmtrack/datasets/sot_train_dataset.py 79.79% <0.00%> (-6.07%) ⬇️
mmtrack/datasets/pipelines/transforms.py 82.18% <0.00%> (-3.13%) ⬇️
mmtrack/models/mot/trackers/base_tracker.py 82.94% <0.00%> (-1.56%) ⬇️

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 a8b4152...f49e4d7. Read the comment docs.

@@ -262,7 +263,7 @@ def simple_test(self, img, img_metas, gt_bboxes, **kwargs):
self.memo.bbox = bbox_xyxy_to_cxcywh(gt_bboxes)
self.memo.z_feat, self.memo.avg_channel = self.init(
img, self.memo.bbox)
best_score = None
best_score = -1
Copy link
Collaborator

Choose a reason for hiding this comment

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

-1. We need be careful about the type of variables

tools/test.py Outdated
for key in [
'interval', 'tmpdir', 'start', 'gpu_collect', 'save_best',
'rule', 'by_epoch'
]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Too ugly here. we can modify as following:
eval_hook_args = [ 'interval', 'tmpdir', 'start', 'gpu_collect', 'save_best' , 'rule', 'by_epoch']
for key in eval_hook_args:

@@ -450,9 +450,9 @@ def test_lasot_evaluation():
track_results = []
for result in results:
x1, y1, x2, y2 = result.split(',')
track_results.append(np.array([int(x1), int(y1), int(x2), int(y2)]))
track_results.append(np.array([int(x1), int(y1), int(x2), int(y2), 0]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

change all int to float

zhangjingwei added 2 commits July 29, 2021 19:38
@GT9505 GT9505 merged commit f68801a into open-mmlab:master Jul 30, 2021
@JingweiZhang12 JingweiZhang12 deleted the tmp branch August 26, 2021 08:47
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