Spaces:
Running
Running
update compute_from_payload with kwargs and used area_ranges_tuples from it
Browse files- det-metrics.py +3 -3
det-metrics.py
CHANGED
@@ -420,7 +420,7 @@ class DetectionMetric(evaluate.Metric):
|
|
420 |
return predictions, references
|
421 |
|
422 |
|
423 |
-
def compute_from_payload(self, payload: Payload):
|
424 |
"""
|
425 |
Compute the metric from the payload.
|
426 |
Args:
|
@@ -464,7 +464,7 @@ class DetectionMetric(evaluate.Metric):
|
|
464 |
sequences={seq_name: sequence}
|
465 |
)
|
466 |
module = DetectionMetric(
|
467 |
-
area_ranges_tuples=
|
468 |
iou_threshold=self.iou_threshold,
|
469 |
class_agnostic=self.class_agnostic,
|
470 |
bbox_format=self.bbox_format,
|
@@ -481,7 +481,7 @@ class DetectionMetric(evaluate.Metric):
|
|
481 |
sequences=payload.sequences
|
482 |
)
|
483 |
module = DetectionMetric(
|
484 |
-
area_ranges_tuples=
|
485 |
iou_threshold=self.iou_threshold,
|
486 |
class_agnostic=self.class_agnostic,
|
487 |
bbox_format=self.bbox_format,
|
|
|
420 |
return predictions, references
|
421 |
|
422 |
|
423 |
+
def compute_from_payload(self, payload: Payload, **kwargs):
|
424 |
"""
|
425 |
Compute the metric from the payload.
|
426 |
Args:
|
|
|
464 |
sequences={seq_name: sequence}
|
465 |
)
|
466 |
module = DetectionMetric(
|
467 |
+
area_ranges_tuples=kwargs["area_ranges_tuples"],
|
468 |
iou_threshold=self.iou_threshold,
|
469 |
class_agnostic=self.class_agnostic,
|
470 |
bbox_format=self.bbox_format,
|
|
|
481 |
sequences=payload.sequences
|
482 |
)
|
483 |
module = DetectionMetric(
|
484 |
+
area_ranges_tuples=kwargs["area_ranges_tuples"],
|
485 |
iou_threshold=self.iou_threshold,
|
486 |
class_agnostic=self.class_agnostic,
|
487 |
bbox_format=self.bbox_format,
|