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
c01f94a3
You need to sign in or sign up before continuing.
Unverified
Commit
c01f94a3
authored
Oct 24, 2021
by
srihari-humbarwadi
Browse files
revert `_convert_to_numpy` call
parent
c15d8a3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
official/vision/beta/evaluation/panoptic_quality_evaluator.py
...cial/vision/beta/evaluation/panoptic_quality_evaluator.py
+2
-6
No files found.
official/vision/beta/evaluation/panoptic_quality_evaluator.py
View file @
c01f94a3
...
@@ -154,6 +154,8 @@ class PanopticQualityEvaluator:
...
@@ -154,6 +154,8 @@ class PanopticQualityEvaluator:
ValueError: if the required prediction or groundtruth fields are not
ValueError: if the required prediction or groundtruth fields are not
present in the incoming `predictions` or `groundtruths`.
present in the incoming `predictions` or `groundtruths`.
"""
"""
groundtruths
,
predictions
=
self
.
_convert_to_numpy
(
groundtruths
,
predictions
)
for
k
in
self
.
_required_prediction_fields
:
for
k
in
self
.
_required_prediction_fields
:
if
k
not
in
predictions
:
if
k
not
in
predictions
:
raise
ValueError
(
raise
ValueError
(
...
@@ -164,10 +166,6 @@ class PanopticQualityEvaluator:
...
@@ -164,10 +166,6 @@ class PanopticQualityEvaluator:
raise
ValueError
(
raise
ValueError
(
'Missing the required key `{}` in groundtruths!'
.
format
(
k
))
'Missing the required key `{}` in groundtruths!'
.
format
(
k
))
if
isinstance
(
groundtruths
[
'image_info'
],
(
list
,
tuple
)):
groundtruths
[
'image_info'
]
=
tf
.
concat
(
groundtruths
[
'image_info'
],
axis
=
0
)
if
self
.
_rescale_predictions
:
if
self
.
_rescale_predictions
:
for
idx
in
range
(
len
(
groundtruths
[
'category_mask'
])):
for
idx
in
range
(
len
(
groundtruths
[
'category_mask'
])):
image_info
=
groundtruths
[
'image_info'
][
idx
]
image_info
=
groundtruths
[
'image_info'
][
idx
]
...
@@ -193,6 +191,4 @@ class PanopticQualityEvaluator:
...
@@ -193,6 +191,4 @@ class PanopticQualityEvaluator:
self
.
_pq_metric_module
.
compare_and_accumulate
(
self
.
_pq_metric_module
.
compare_and_accumulate
(
_groundtruths
,
_predictions
)
_groundtruths
,
_predictions
)
else
:
else
:
groundtruths
,
predictions
=
self
.
_convert_to_numpy
(
groundtruths
,
predictions
)
self
.
_pq_metric_module
.
compare_and_accumulate
(
groundtruths
,
predictions
)
self
.
_pq_metric_module
.
compare_and_accumulate
(
groundtruths
,
predictions
)
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