bascobasculino commited on
Commit
0b001c5
1 Parent(s): 01e58c2
Files changed (2) hide show
  1. my_metricv2.py +10 -2
  2. requirements.txt +2 -0
my_metricv2.py CHANGED
@@ -15,7 +15,8 @@
15
 
16
  import evaluate
17
  import datasets
18
-
 
19
 
20
  # TODO: Add BibTeX citation
21
  _CITATION = """\
@@ -89,7 +90,14 @@ class MyMetricv2(evaluate.Metric):
89
  def _compute(self, predictions, references):
90
  """Returns the scores"""
91
  # TODO: Compute the different scores of the module
 
 
 
 
92
  accuracy = sum(i == j for i, j in zip(predictions, references)) / len(predictions)
 
 
93
  return {
94
  "accuracy": accuracy,
95
- }
 
 
15
 
16
  import evaluate
17
  import datasets
18
+ import motmetrics as mm
19
+ import numpy as np
20
 
21
  # TODO: Add BibTeX citation
22
  _CITATION = """\
 
90
  def _compute(self, predictions, references):
91
  """Returns the scores"""
92
  # TODO: Compute the different scores of the module
93
+
94
+ # <frame number>, <object id>, <bb_left>, <bb_top>, <bb_width>, <bb_height>, <confidence>, <x>, <y>, <z>
95
+ # predictions array de formato []
96
+
97
  accuracy = sum(i == j for i, j in zip(predictions, references)) / len(predictions)
98
+
99
+
100
  return {
101
  "accuracy": accuracy,
102
+ }
103
+
requirements.txt CHANGED
@@ -1,2 +1,4 @@
1
  git+https://github.com/huggingface/evaluate@main
 
 
2
  scikit-learn
 
1
  git+https://github.com/huggingface/evaluate@main
2
+ numpy
3
+ motmetrics
4
  scikit-learn