-
Notifications
You must be signed in to change notification settings - Fork 599
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
Conversation
please fix the lint error firstly. |
mmtrack/datasets/lasot_dataset.py
Outdated
@@ -75,7 +75,8 @@ def evaluate(self, results, metric=['track'], logger=None): | |||
inds.append(len(self.data_infos)) | |||
|
|||
track_results = [ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
]
There was a problem hiding this comment.
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
tests/test_data/test_dataset.py
Outdated
@@ -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)])) |
There was a problem hiding this comment.
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 Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
mmtrack/models/sot/siamrpn.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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' | ||
]: |
There was a problem hiding this comment.
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:
tests/test_data/test_dataset.py
Outdated
@@ -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])) |
There was a problem hiding this comment.
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
replace "score" and "bbox" to "track_results" in dict keys of sot tracking outputs