Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
9ff76392
Commit
9ff76392
authored
Feb 19, 2021
by
Vighnesh Birodkar
Committed by
TF Object Detection Team
Feb 19, 2021
Browse files
Internal change.
PiperOrigin-RevId: 358432885
parent
306dafc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
research/object_detection/eval_util.py
research/object_detection/eval_util.py
+8
-6
No files found.
research/object_detection/eval_util.py
View file @
9ff76392
...
...
@@ -570,15 +570,17 @@ def _resize_detection_masks(arg_tuple):
Returns:
"""
detection_boxes
,
detection_masks
,
image_shape
,
pad_shape
=
arg_tuple
detection_masks_reframed
=
ops
.
reframe_box_masks_to_image_masks
(
detection_masks
,
detection_boxes
,
image_shape
[
0
],
image_shape
[
1
])
paddings
=
tf
.
concat
(
[
tf
.
zeros
([
3
,
1
],
dtype
=
tf
.
int32
)
,
tf
.
expand_dims
(
tf
.
concat
([
tf
.
zeros
([
1
],
dtype
=
tf
.
int32
),
pad_shape
-
image_shape
],
axis
=
0
),
1
)
],
axis
=
1
)
pad_instance_dim
=
tf
.
zeros
([
3
,
1
],
dtype
=
tf
.
int32
)
pad_hw_dim
=
tf
.
concat
([
tf
.
zeros
([
1
],
dtype
=
tf
.
int32
),
pad_shape
-
image_shape
],
axis
=
0
)
pad_hw_dim
=
tf
.
expand_dims
(
pad_hw_dim
,
1
)
paddings
=
tf
.
concat
([
pad_instance_dim
,
pad_hw_dim
],
axis
=
1
)
detection_masks_reframed
=
tf
.
pad
(
detection_masks_reframed
,
paddings
)
# If the masks are currently float, binarize them. Otherwise keep them as
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment