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
782d3852
"router/vscode:/vscode.git/clone" did not exist on "6685e8fcdaf7ca2fb4f81f1c5efbcd5864fae1dd"
Commit
782d3852
authored
Jul 26, 2020
by
syiming
Browse files
fix code style
parent
740ef06b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
...ect_detection/meta_architectures/faster_rcnn_meta_arch.py
+6
-6
No files found.
research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
View file @
782d3852
...
...
@@ -1955,11 +1955,12 @@ class FasterRCNNMetaArch(model.DetectionModel):
num_levels
=
len
(
features_to_crop
)
box_levels
=
None
if
num_levels
!=
1
:
# If there are mutiple levels to select, get the box levels
box_levels
=
ops
.
fpn_feature_levels
(
num_levels
,
num_levels
-
2
,
tf
.
sqrt
(
self
.
_resize_shape
[
1
]
*
self
.
_resize_shape
[
2
]
*
1.0
)
/
224.0
,
proposal_boxes_normalized
)
# If there are mutiple levels to select, get the box levels
box_levels
=
ops
.
fpn_feature_levels
(
num_levels
,
num_levels
-
2
,
tf
.
sqrt
(
self
.
_resize_shape
[
1
]
*
self
.
_resize_shape
[
2
]
*
1.0
)
/
224.0
,
proposal_boxes_normalized
)
cropped_regions
=
self
.
_flatten_first_two_dimensions
(
self
.
_crop_and_resize_fn
(
features_to_crop
,
proposal_boxes_normalized
,
box_levels
,
...
...
@@ -2528,7 +2529,6 @@ class FasterRCNNMetaArch(model.DetectionModel):
box_list
.
BoxList
(
tf
.
reshape
(
proposal_boxes
,
[
-
1
,
4
])),
image_shape
[
1
],
image_shape
[
2
],
check_range
=
False
).
get
()
# TODO(syiming): check this!
flat_cropped_gt_mask
=
self
.
_crop_and_resize_fn
(
[
tf
.
expand_dims
(
flat_gt_masks
,
-
1
)],
tf
.
expand_dims
(
flat_normalized_proposals
,
axis
=
1
),
None
,
...
...
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