Unverified Commit c01f94a3 authored by srihari-humbarwadi's avatar srihari-humbarwadi
Browse files

revert `_convert_to_numpy` call

parent c15d8a3b
......@@ -154,6 +154,8 @@ class PanopticQualityEvaluator:
ValueError: if the required prediction or groundtruth fields are not
present in the incoming `predictions` or `groundtruths`.
"""
groundtruths, predictions = self._convert_to_numpy(groundtruths,
predictions)
for k in self._required_prediction_fields:
if k not in predictions:
raise ValueError(
......@@ -164,10 +166,6 @@ class PanopticQualityEvaluator:
raise ValueError(
'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:
for idx in range(len(groundtruths['category_mask'])):
image_info = groundtruths['image_info'][idx]
......@@ -193,6 +191,4 @@ class PanopticQualityEvaluator:
self._pq_metric_module.compare_and_accumulate(
_groundtruths, _predictions)
else:
groundtruths, predictions = self._convert_to_numpy(
groundtruths, predictions)
self._pq_metric_module.compare_and_accumulate(groundtruths, predictions)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment