Spaces:
Sleeping
Sleeping
VascoDVRodrigues
commited on
Commit
·
f6fb469
1
Parent(s):
c997355
- mot-metrics.py +2 -2
mot-metrics.py
CHANGED
@@ -204,7 +204,7 @@ def calculate_from_payload(payload: dict, max_iou: float = 0.5):
|
|
204 |
for detection in frame:
|
205 |
id = detection['index']
|
206 |
x, y, w, h = detection['bounding_box']
|
207 |
-
formatted_references.append([frame_id, id, x, y, w, h])
|
208 |
|
209 |
for model in models:
|
210 |
frames = payload['sequences'][sequence][model]
|
@@ -215,7 +215,7 @@ def calculate_from_payload(payload: dict, max_iou: float = 0.5):
|
|
215 |
x, y, w, h = detection['bounding_box']
|
216 |
confidence = detection['confidence']
|
217 |
confidence = 1 #TODO: remove this line
|
218 |
-
formated_predictions.append([frame_id, id, x, y, w, h, confidence])
|
219 |
output[sequence][model] = calculate(formated_predictions, formatted_references, max_iou=max_iou)
|
220 |
return output
|
221 |
|
|
|
204 |
for detection in frame:
|
205 |
id = detection['index']
|
206 |
x, y, w, h = detection['bounding_box']
|
207 |
+
formatted_references.append([frame_id+1, id, x, y, w, h])
|
208 |
|
209 |
for model in models:
|
210 |
frames = payload['sequences'][sequence][model]
|
|
|
215 |
x, y, w, h = detection['bounding_box']
|
216 |
confidence = detection['confidence']
|
217 |
confidence = 1 #TODO: remove this line
|
218 |
+
formated_predictions.append([frame_id+1, id, x, y, w, h, confidence])
|
219 |
output[sequence][model] = calculate(formated_predictions, formatted_references, max_iou=max_iou)
|
220 |
return output
|
221 |
|