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
b810694e
Unverified
Commit
b810694e
authored
Oct 20, 2021
by
srihari-humbarwadi
Browse files
resize instance masks with bilinear method
parent
7303c9f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
official/vision/beta/projects/panoptic_maskrcnn/dataloaders/panoptic_maskrcnn_input.py
.../panoptic_maskrcnn/dataloaders/panoptic_maskrcnn_input.py
+4
-2
official/vision/beta/projects/panoptic_maskrcnn/modeling/layers/panoptic_segmentation_generator.py
...skrcnn/modeling/layers/panoptic_segmentation_generator.py
+2
-1
No files found.
official/vision/beta/projects/panoptic_maskrcnn/dataloaders/panoptic_maskrcnn_input.py
View file @
b810694e
...
...
@@ -334,7 +334,9 @@ class Parser(maskrcnn_input.Parser):
panoptic_instance_mask
=
panoptic_instance_mask
[:,
:,
0
]
labels
[
'groundtruths'
].
update
({
'gt_panoptic_category_mask'
:
panoptic_category_mask
,
'gt_panoptic_instance_mask'
:
panoptic_instance_mask
})
'gt_panoptic_category_mask'
:
tf
.
cast
(
panoptic_category_mask
,
dtype
=
tf
.
int32
),
'gt_panoptic_instance_mask'
:
tf
.
cast
(
panoptic_instance_mask
,
dtype
=
tf
.
int32
)})
return
image
,
labels
official/vision/beta/projects/panoptic_maskrcnn/modeling/layers/panoptic_segmentation_generator.py
View file @
b810694e
...
...
@@ -91,7 +91,8 @@ class PanopticSegmentationGenerator(tf.keras.layers.Layer):
resized_mask
=
tf
.
image
.
resize
(
mask
,
size
=
(
box_height
,
box_width
),
method
=
'nearest'
)
method
=
'bilinear'
)
resized_mask
=
tf
.
cast
(
resized_mask
,
dtype
=
mask
.
dtype
)
# paste resized mask on a blank mask that matches image shape
pasted_mask
=
tf
.
raw_ops
.
TensorStridedSliceUpdate
(
...
...
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