bascobasculino commited on
Commit
04c098b
1 Parent(s): 4f61238
Files changed (1) hide show
  1. my_metricv2.py +5 -2
my_metricv2.py CHANGED
@@ -181,5 +181,8 @@ def calculate(predictions, references, max_iou: float = 0.5):
181
  acc.update(refs[:,0].astype('int').tolist(), preds[:,0].astype('int').tolist(), C)
182
 
183
  mh = mm.metrics.create()
184
- summary = mh.compute(acc)
185
- return summary.to_dict()
 
 
 
 
181
  acc.update(refs[:,0].astype('int').tolist(), preds[:,0].astype('int').tolist(), C)
182
 
183
  mh = mm.metrics.create()
184
+ summary = mh.compute(acc).to_dict()
185
+ for key in summary:
186
+ summary[key] = summary[key][0]
187
+
188
+ return summary