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
7b95816b
Unverified
Commit
7b95816b
authored
May 19, 2020
by
myproblemchild
Committed by
GitHub
May 19, 2020
Browse files
Use round() instead of int() when displaying score in OD API (#8419)
parent
d59897d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/object_detection/utils/visualization_utils.py
research/object_detection/utils/visualization_utils.py
+2
-2
No files found.
research/object_detection/utils/visualization_utils.py
View file @
7b95816b
...
...
@@ -1045,9 +1045,9 @@ def visualize_boxes_and_labels_on_image_array(
display_str
=
str
(
class_name
)
if
not
skip_scores
:
if
not
display_str
:
display_str
=
'{}%'
.
format
(
int
(
100
*
scores
[
i
]))
display_str
=
'{}%'
.
format
(
round
(
100
*
scores
[
i
]))
else
:
display_str
=
'{}: {}%'
.
format
(
display_str
,
int
(
100
*
scores
[
i
]))
display_str
=
'{}: {}%'
.
format
(
display_str
,
round
(
100
*
scores
[
i
]))
if
not
skip_track_ids
and
track_ids
is
not
None
:
if
not
display_str
:
display_str
=
'ID {}'
.
format
(
track_ids
[
i
])
...
...
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