Spaces:
No application file
No application file
Rafael
commited on
Commit
•
f6022b8
1
Parent(s):
8c18dea
fix error
Browse files- coco_metrics.py +3 -3
coco_metrics.py
CHANGED
@@ -131,10 +131,10 @@ class EvaluateObjectDetection(evaluate.Metric):
|
|
131 |
processed_predictions = []
|
132 |
for pred in predictions:
|
133 |
processed_pred: _TYPING_PREDICTION = {}
|
134 |
-
for
|
135 |
if isinstance(val, torch.Tensor):
|
136 |
-
val =
|
137 |
-
processed_pred[
|
138 |
processed_predictions.append(processed_pred)
|
139 |
return processed_predictions
|
140 |
|
|
|
131 |
processed_predictions = []
|
132 |
for pred in predictions:
|
133 |
processed_pred: _TYPING_PREDICTION = {}
|
134 |
+
for k, val in pred.items():
|
135 |
if isinstance(val, torch.Tensor):
|
136 |
+
val = val.detach().cpu().tolist()
|
137 |
+
processed_pred[k] = val
|
138 |
processed_predictions.append(processed_pred)
|
139 |
return processed_predictions
|
140 |
|