Lukas Braach
commited on
Commit
•
c235442
1
Parent(s):
1eb300a
try new dataset loading
Browse files
rwth_phoenix_weather_2014.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from typing import List, Dict
|
2 |
|
|
|
3 |
import datasets
|
4 |
import pandas as pd
|
5 |
from datasets.download.streaming_download_manager import ArchiveIterable
|
@@ -87,7 +88,7 @@ class RWTHPhoenixWeather2014(datasets.GeneratorBasedBuilder):
|
|
87 |
}
|
88 |
|
89 |
if self.config.name != "pre-training":
|
90 |
-
features_dict["frames"] = datasets.Sequence(feature=datasets.
|
91 |
|
92 |
return datasets.DatasetInfo(
|
93 |
description=_DESCRIPTION + self.config.description,
|
@@ -178,7 +179,7 @@ class RWTHPhoenixWeather2014(datasets.GeneratorBasedBuilder):
|
|
178 |
|
179 |
if self.config.name != 'pre-training':
|
180 |
result["frames"] = [
|
181 |
-
|
182 |
]
|
183 |
|
184 |
yield key, result
|
|
|
1 |
from typing import List, Dict
|
2 |
|
3 |
+
import cv2
|
4 |
import datasets
|
5 |
import pandas as pd
|
6 |
from datasets.download.streaming_download_manager import ArchiveIterable
|
|
|
88 |
}
|
89 |
|
90 |
if self.config.name != "pre-training":
|
91 |
+
features_dict["frames"] = datasets.Sequence(feature=datasets.Array3D(shape=(3, 224, 224), dtype="uint8"))
|
92 |
|
93 |
return datasets.DatasetInfo(
|
94 |
description=_DESCRIPTION + self.config.description,
|
|
|
179 |
|
180 |
if self.config.name != 'pre-training':
|
181 |
result["frames"] = [
|
182 |
+
cv2.imdecode(im, 1) for p, im in frames
|
183 |
]
|
184 |
|
185 |
yield key, result
|