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
6a6e1994
Unverified
Commit
6a6e1994
authored
Mar 06, 2022
by
srihari-humbarwadi
Browse files
fixed dtypes and formatting
parent
edee549f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
official/vision/beta/projects/panoptic_maskrcnn/dataloaders/panoptic_deeplab_input.py
...s/panoptic_maskrcnn/dataloaders/panoptic_deeplab_input.py
+13
-4
No files found.
official/vision/beta/projects/panoptic_maskrcnn/dataloaders/panoptic_deeplab_input.py
View file @
6a6e1994
...
...
@@ -239,15 +239,20 @@ class Parser(parser.Parser):
padding_start
=
int
(
3
*
self
.
_sigma
+
1
)
padding_end
=
int
(
3
*
self
.
_sigma
+
2
)
# padding should be equal to self._gaussian_size which is calculated
# as size = int(6 * sigma + 3)
padding
=
padding_start
+
padding_end
centers_heatmap
=
tf
.
zeros
(
shape
=
[
height
+
padding
,
width
+
padding
],
dtype
=
self
.
_dtype
)
dtype
=
tf
.
float32
)
centers_offset_y
=
tf
.
zeros
(
shape
=
[
height
,
width
])
shape
=
[
height
,
width
],
dtype
=
tf
.
float32
)
centers_offset_x
=
tf
.
zeros
(
shape
=
[
height
,
width
])
shape
=
[
height
,
width
],
dtype
=
tf
.
float32
)
unique_instance_ids
,
_
=
tf
.
unique
(
tf
.
reshape
(
instance_mask
,
[
-
1
]))
...
...
@@ -292,5 +297,9 @@ class Parser(parser.Parser):
padding_start
:
padding_start
+
height
,
padding_start
:
padding_start
+
width
]
centers_heatmap
=
tf
.
expand_dims
(
centers_heatmap
,
axis
=-
1
)
centers_offset
=
tf
.
stack
([
centers_offset_y
,
centers_offset_x
],
axis
=-
1
)
centers_offset
=
tf
.
stack
(
[
centers_offset_y
,
centers_offset_x
],
axis
=-
1
)
return
centers_heatmap
,
centers_offset
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