Datasets:

Modalities:
Image
Languages:
English
DOI:
Libraries:
Datasets
License:
xhagrg commited on
Commit
0144a21
·
1 Parent(s): 4f22a8b

Update hls_burn_scars.py

Browse files
Files changed (1) hide show
  1. 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, "bytes": open(filename).read()},
95
- "annotation": {"path": annotation_filename, "bytes": open(annotation_filename).read()},
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
  }