-
Notifications
You must be signed in to change notification settings - Fork 597
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 bugs in RandomConcatDataset, SeqCropLikeStark and TridentSampling #438
Conversation
mmtrack/datasets/dataset_wrappers.py
Outdated
self.CLASSES = datasets[0].CLASSES | ||
if hasattr(datasets[0], 'flag'): | ||
flags = [] | ||
for i in range(0, len(datasets)): | ||
flags.append(datasets[i].flag) | ||
self.flag = np.concatenate(flags) |
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.
why add flag
attribute?
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 isinstance(dataset, BaseSOTDataset)
in build_dataloader
need it. The RandomSampleConcatDataset
is not an instance of BaseSOTDataset
. It will go into other case which needs flag
.
I have tried an alternative.
extra_template_index = self.random_sample_inds( | ||
video_visibility, | ||
num_samples=1, | ||
frame_range=[min_ind, max_ind], | ||
allow_invisible=True)[0] | ||
allow_invisible=False)[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.
Why change like this?
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 bboxes of invisible object are invalid, and it will cause interruptions in the pipeline.
Codecov Report
@@ Coverage Diff @@
## master #438 +/- ##
==========================================
+ Coverage 71.03% 71.20% +0.16%
==========================================
Files 119 119
Lines 6747 6748 +1
Branches 1295 1294 -1
==========================================
+ Hits 4793 4805 +12
+ Misses 1558 1548 -10
+ Partials 396 395 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -56,10 +57,13 @@ def build_dataloader(dataset, | |||
DataLoader: A PyTorch dataloader. | |||
""" | |||
rank, world_size = get_dist_info() | |||
is_sotdataset = isinstance(dataset, BaseSOTDataset) or ( | |||
isinstance(dataset, ConcatDataset) | |||
and isinstance(dataset.datasets[0], BaseSOTDataset)) |
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.
add comments for isinstance(dataset, ConcatDataset) and isinstance(dataset.datasets[0], BaseSOTDataset)
@@ -32,6 +32,8 @@ def __init__(self, dataset_cfgs, dataset_sampling_weights=None): | |||
] | |||
|
|||
datasets = [build_dataset(cfg) for cfg in dataset_cfgs] | |||
self.CLASSES = datasets[0].CLASSES |
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.
add comments that why we need CLASSES
No description provided.