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

FilterAnnotations bug fix #8136

Merged
merged 6 commits into from
Jun 14, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions mmdet/datasets/pipelines/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def __repr__(self):
repr_str += f'with_mask={self.with_mask}, '
repr_str += f'with_seg={self.with_seg}, '
repr_str += f'poly2mask={self.poly2mask}, '
repr_str += f'poly2mask={self.file_client_args})'
repr_str += f'file_client_args={self.file_client_args})'
return repr_str


Expand Down Expand Up @@ -564,7 +564,7 @@ def __call__(self, results):

def __repr__(self):
return self.__class__.__name__ + \
f'(num_max_proposals={self.num_max_proposals})'
f'(num_max_proposals={self.num_max_proposals})'


@PIPELINES.register_module()
Expand Down Expand Up @@ -625,6 +625,8 @@ def __call__(self, results):
for t in tests[1:]:
keep = keep & t

keep = keep.nonzero()[0]
MiXaiLL76 marked this conversation as resolved.
Show resolved Hide resolved

keys = ('gt_bboxes', 'gt_labels', 'gt_masks')
for key in keys:
if key in results:
Expand All @@ -636,8 +638,8 @@ def __call__(self, results):

def __repr__(self):
return self.__class__.__name__ + \
f'(min_gt_bbox_wh={self.min_gt_bbox_wh},' \
f'(min_gt_mask_area={self.min_gt_mask_area},' \
f'(by_box={self.by_box},' \
f'(by_mask={self.by_mask},' \
f'always_keep={self.always_keep})'
f'(min_gt_bbox_wh={self.min_gt_bbox_wh},' \
f'(min_gt_mask_area={self.min_gt_mask_area},' \
f'(by_box={self.by_box},' \
f'(by_mask={self.by_mask},' \
MiXaiLL76 marked this conversation as resolved.
Show resolved Hide resolved
f'always_keep={self.always_keep})'