Update hls_burn_scars.py
Browse files- hls_burn_scars.py +3 -2
hls_burn_scars.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import os
|
2 |
from glob import glob
|
3 |
import datasets
|
|
|
4 |
|
5 |
|
6 |
_CITATION = """\
|
@@ -91,6 +92,6 @@ class HLSBurnScars(datasets.GeneratorBasedBuilder):
|
|
91 |
annotation_filename = filename.replace('_merged.tif', '.mask.tif')
|
92 |
print("!!!!", type(filename))
|
93 |
yield idx, {
|
94 |
-
"image": {"path": filename, "
|
95 |
-
"annotation": {"path": annotation_filename, "
|
96 |
}
|
|
|
1 |
import os
|
2 |
from glob import glob
|
3 |
import datasets
|
4 |
+
import rasterio
|
5 |
|
6 |
|
7 |
_CITATION = """\
|
|
|
92 |
annotation_filename = filename.replace('_merged.tif', '.mask.tif')
|
93 |
print("!!!!", type(filename))
|
94 |
yield idx, {
|
95 |
+
"image": {"path": filename, "data": rasterio.open(filename).read()},
|
96 |
+
"annotation": {"path": annotation_filename, "data": rasterio.open(annotation_filename).read()},
|
97 |
}
|