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
c5b6d8da
Commit
c5b6d8da
authored
Sep 01, 2021
by
A. Unique TensorFlower
Browse files
Merge pull request #10230 from srihari-humbarwadi:master
PiperOrigin-RevId: 394354557
parents
923290ec
8a30da7c
Changes
1
Show 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 @
c5b6d8da
...
...
@@ -270,11 +270,6 @@ def _generate_detections_batched(boxes, scores, max_total_size,
`valid_detections` boxes are valid 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
,
valid_detections
)
=
tf
.
image
.
combined_non_max_suppression
(
boxes
,
...
...
@@ -284,9 +279,7 @@ def _generate_detections_batched(boxes, scores, max_total_size,
iou_threshold
=
nms_iou_threshold
,
score_threshold
=
score_threshold
,
pad_per_class
=
False
,
)
# De-normalizes box cooridinates.
nmsed_boxes
*=
normalizer
clip_boxes
=
False
)
nmsed_classes
=
tf
.
cast
(
nmsed_classes
,
tf
.
int32
)
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