Datasets:
NimaBoscarino
commited on
Commit
•
32e763a
1
Parent(s):
d4b196c
Update LILA.py
Browse files
LILA.py
CHANGED
@@ -106,43 +106,42 @@ class LILA(datasets.GeneratorBasedBuilder):
|
|
106 |
# TODO: Use ClassLabel for categories...
|
107 |
# TODO: Deal with 404s -> In my manual preprocessing, or in the datasets library?
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
"
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
"
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
"
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
})
|
146 |
|
147 |
def _info(self):
|
148 |
features = self._get_features()
|
|
|
106 |
# TODO: Use ClassLabel for categories...
|
107 |
# TODO: Deal with 404s -> In my manual preprocessing, or in the datasets library?
|
108 |
|
109 |
+
if self.config.name == 'Caltech Camera Traps':
|
110 |
+
return datasets.Features({
|
111 |
+
"id": datasets.Value("string"), "file_name": datasets.Value("string"),
|
112 |
+
"width": datasets.Value("int32"), "height": datasets.Value("int32"),
|
113 |
+
"seq_num_frames": datasets.Value("int32"),
|
114 |
+
"date_captured": datasets.Value("date32"),
|
115 |
+
"seq_id": datasets.Value("string"),
|
116 |
+
"location": datasets.Value("string"),
|
117 |
+
"rights_holder": datasets.Value("string"),
|
118 |
+
"frame_num": datasets.Value("int32"),
|
119 |
+
|
120 |
+
|
121 |
+
"annotations": datasets.Sequence({
|
122 |
+
"id": datasets.Value("string"),
|
123 |
+
"category_id": datasets.Value("int32"),
|
124 |
+
}),
|
125 |
+
|
126 |
+
"bboxes": datasets.Sequence({
|
127 |
+
"id": datasets.Value("string"),
|
128 |
+
"category_id": datasets.Value("int32"),
|
129 |
+
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
130 |
+
}),
|
131 |
+
|
132 |
+
"image": datasets.Image(decode=False),
|
133 |
+
})
|
134 |
+
elif self.config.name == 'ENA24':
|
135 |
+
return datasets.Features({
|
136 |
+
"id": datasets.Value("string"), "file_name": datasets.Value("string"),
|
137 |
+
"width": datasets.Value("int32"), "height": datasets.Value("int32"),
|
138 |
+
"annotations": datasets.Sequence({
|
139 |
+
"id": datasets.Value("string"),
|
140 |
+
"category_id": datasets.Value("int32"),
|
141 |
+
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
142 |
+
}),
|
143 |
+
"image": datasets.Image(decode=False),
|
144 |
+
})
|
|
|
145 |
|
146 |
def _info(self):
|
147 |
features = self._get_features()
|