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 reppoints unmap fill bug #605

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 5 additions & 1 deletion mmrotate/models/dense_heads/oriented_reppoints_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,11 @@
# map up to original set of proposals
if unmap_outputs:
num_total_proposals = flat_proposals.size(0)
labels = unmap(labels, num_total_proposals, inside_flags)
labels = unmap(

Check warning on line 718 in mmrotate/models/dense_heads/oriented_reppoints_head.py

View check run for this annotation

Codecov / codecov/patch

mmrotate/models/dense_heads/oriented_reppoints_head.py#L718

Added line #L718 was not covered by tests
labels,
num_total_proposals,
inside_flags,
fill=self.num_classes) # fill bg label
label_weights = unmap(label_weights, num_total_proposals,
inside_flags)
bbox_gt = unmap(bbox_gt, num_total_proposals, inside_flags)
Expand Down
6 changes: 5 additions & 1 deletion mmrotate/models/dense_heads/rotated_reppoints_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@
# map up to original set of proposals
if unmap_outputs:
num_total_proposals = flat_proposals.size(0)
labels = unmap(labels, num_total_proposals, inside_flags)
labels = unmap(

Check warning on line 357 in mmrotate/models/dense_heads/rotated_reppoints_head.py

View check run for this annotation

Codecov / codecov/patch

mmrotate/models/dense_heads/rotated_reppoints_head.py#L357

Added line #L357 was not covered by tests
labels,
num_total_proposals,
inside_flags,
fill=self.num_classes) # fill bg label
label_weights = unmap(label_weights, num_total_proposals,
inside_flags)
bbox_gt = unmap(bbox_gt, num_total_proposals, inside_flags)
Expand Down
6 changes: 5 additions & 1 deletion mmrotate/models/dense_heads/sam_reppoints_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,11 @@
# map up to original set of proposals
if unmap_outputs:
num_total_proposals = flat_proposals.size(0)
labels = unmap(labels, num_total_proposals, inside_flags)
labels = unmap(

Check warning on line 417 in mmrotate/models/dense_heads/sam_reppoints_head.py

View check run for this annotation

Codecov / codecov/patch

mmrotate/models/dense_heads/sam_reppoints_head.py#L417

Added line #L417 was not covered by tests
labels,
num_total_proposals,
inside_flags,
fill=self.num_classes) # fill bg label
label_weights = unmap(label_weights, num_total_proposals,
inside_flags)
bbox_gt = unmap(bbox_gt, num_total_proposals, inside_flags)
Expand Down