bascobasculino commited on
Commit
b7d7aaa
1 Parent(s): 0806513
Files changed (1) hide show
  1. my_metricv2.py +21 -4
my_metricv2.py CHANGED
@@ -73,10 +73,27 @@ class MyMetricv2(evaluate.Metric):
73
  # This defines the format of each prediction and reference
74
  features=datasets.Features({
75
  "predictions": [
76
- [datasets.Value("float32"), datasets.Value("float32"), datasets.Value("float32"), datasets.Value("float32")]
 
 
 
 
 
 
 
 
 
77
  ],
78
  "references": [
79
- [datasets.Value("float32"), datasets.Value("float32"), datasets.Value("float32"), datasets.Value("float32")]
 
 
 
 
 
 
 
 
80
  ],
81
  }),
82
  # Homepage of the module for documentation
@@ -98,11 +115,11 @@ class MyMetricv2(evaluate.Metric):
98
  # <frame number>, <object id>, <bb_left>, <bb_top>, <bb_width>, <bb_height>, <confidence>, <x>, <y>, <z>
99
  # predictions array de formato []
100
 
101
- # accuracy = sum(i == j for i, j in zip(predictions, references)) / len(predictions)
102
 
103
 
104
  return {
105
-
106
  "predictions": predictions,
107
  "references": references
108
 
 
73
  # This defines the format of each prediction and reference
74
  features=datasets.Features({
75
  "predictions": [
76
+ datasets.Features(
77
+ {
78
+ "scores": datasets.Sequence(datasets.Value("float")),
79
+ "ids": datasets.Sequence(datasets.Value("int64")),
80
+ "frames": datasets.Sequence(datasets.Value("int64")),
81
+ "boxes": datasets.Sequence(
82
+ datasets.Sequence(datasets.Value("float"))
83
+ ),
84
+ }
85
+ )
86
  ],
87
  "references": [
88
+ datasets.Features(
89
+ {
90
+ "ids": datasets.Sequence(datasets.Value("int64")),
91
+ "frames": datasets.Sequence(datasets.Value("int64")),
92
+ "boxes": datasets.Sequence(
93
+ datasets.Sequence(datasets.Value("float"))
94
+ ),
95
+ }
96
+ )
97
  ],
98
  }),
99
  # Homepage of the module for documentation
 
115
  # <frame number>, <object id>, <bb_left>, <bb_top>, <bb_width>, <bb_height>, <confidence>, <x>, <y>, <z>
116
  # predictions array de formato []
117
 
118
+ # accuracy = sum(i == j for i, j in zip(predictions, references)) / len(predictions)
119
 
120
 
121
  return {
122
+
123
  "predictions": predictions,
124
  "references": references
125