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
de1d7424
Commit
de1d7424
authored
Sep 01, 2021
by
A. Unique TensorFlower
Browse files
Merge pull request #10230 from srihari-humbarwadi:master
PiperOrigin-RevId: 394354557
parents
2584c1e0
8a30da7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
official/vision/detection/ops/postprocess_ops.py
official/vision/detection/ops/postprocess_ops.py
+1
-8
No files found.
official/vision/detection/ops/postprocess_ops.py
View file @
de1d7424
...
@@ -270,11 +270,6 @@ def _generate_detections_batched(boxes, scores, max_total_size,
...
@@ -270,11 +270,6 @@ def _generate_detections_batched(boxes, scores, max_total_size,
`valid_detections` boxes are valid detections.
`valid_detections` boxes are valid detections.
"""
"""
with
tf
.
name_scope
(
'generate_detections'
):
with
tf
.
name_scope
(
'generate_detections'
):
# TODO(tsungyi): Removes normalization/denomalization once the
# tf.image.combined_non_max_suppression is coordinate system agnostic.
# Normalizes maximum box cooridinates to 1.
normalizer
=
tf
.
reduce_max
(
boxes
)
boxes
/=
normalizer
(
nmsed_boxes
,
nmsed_scores
,
nmsed_classes
,
(
nmsed_boxes
,
nmsed_scores
,
nmsed_classes
,
valid_detections
)
=
tf
.
image
.
combined_non_max_suppression
(
valid_detections
)
=
tf
.
image
.
combined_non_max_suppression
(
boxes
,
boxes
,
...
@@ -284,9 +279,7 @@ def _generate_detections_batched(boxes, scores, max_total_size,
...
@@ -284,9 +279,7 @@ def _generate_detections_batched(boxes, scores, max_total_size,
iou_threshold
=
nms_iou_threshold
,
iou_threshold
=
nms_iou_threshold
,
score_threshold
=
score_threshold
,
score_threshold
=
score_threshold
,
pad_per_class
=
False
,
pad_per_class
=
False
,
)
clip_boxes
=
False
)
# De-normalizes box cooridinates.
nmsed_boxes
*=
normalizer
nmsed_classes
=
tf
.
cast
(
nmsed_classes
,
tf
.
int32
)
nmsed_classes
=
tf
.
cast
(
nmsed_classes
,
tf
.
int32
)
return
nmsed_boxes
,
nmsed_scores
,
nmsed_classes
,
valid_detections
return
nmsed_boxes
,
nmsed_scores
,
nmsed_classes
,
valid_detections
...
...
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