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
efe7c3ea
Commit
efe7c3ea
authored
Jun 23, 2020
by
syiming
Browse files
fix tiny errors.
parent
b88095dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
research/object_detection/utils/spatial_transform_ops.py
research/object_detection/utils/spatial_transform_ops.py
+4
-2
No files found.
research/object_detection/utils/spatial_transform_ops.py
View file @
efe7c3ea
...
...
@@ -415,7 +415,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels,
crop_size
,
scope
=
None
):
#FIXME: fix docstring
"""doc string."""
if
not
box_levels
:
if
box_levels
is
None
:
return
native_crop_and_resize
(
images
[
0
],
boxes
,
crop_size
,
scope
=
None
)
croped_feature_list
=
[]
for
level
,
image
in
enumerate
(
images
):
...
...
@@ -424,6 +424,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels,
croped_feature_list
.
append
(
cropped
)
return
tf
.
concat
(
croped_feature_list
,
axis
=
0
)
def
native_crop_and_resize
(
image
,
boxes
,
crop_size
,
scope
=
None
):
"""Same as `matmul_crop_and_resize` but uses tf.image.crop_and_resize."""
def
get_box_inds
(
proposals
):
...
...
@@ -443,6 +444,7 @@ def native_crop_and_resize(image, boxes, crop_size, scope=None):
tf
.
shape
(
cropped_regions
)[
1
:]],
axis
=
0
)
return
tf
.
reshape
(
cropped_regions
,
final_shape
)
def
multilevel_matmul_crop_and_resize
(
images
,
boxes
,
box_levels
,
crop_size
,
extrapolation_value
=
0.0
,
scope
=
None
):
#FIXME: fix docstring
...
...
@@ -450,7 +452,7 @@ def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size,
with
tf
.
name_scope
(
scope
,
'MatMulCropAndResize'
):
if
box_levels
is
None
:
box_levels
=
tf
.
zeros
(
tf
.
shape
(
boxes
)[:
2
],
dtype
=
tf
.
int32
)
return
multilevel_roi_align
(
[
image
]
,
return
multilevel_roi_align
(
image
s
,
boxes
,
box_levels
,
crop_size
,
...
...
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