Datasets:

ArXiv:
License:
PeterTor commited on
Commit
d964989
·
verified ·
1 Parent(s): a78e1d1

Update BioMap.py

Browse files
Files changed (1) hide show
  1. BioMap.py +6 -6
BioMap.py CHANGED
@@ -105,13 +105,13 @@ class NewDataset(datasets.GeneratorBasedBuilder):
105
 
106
  def denormalize_s2(self,patch):
107
  r,g,b = patch[3],patch[2],patch[1]
108
- res = []
109
- for band, band_value in zip(['B04','B03','B02'],[r,g,b]) :
110
- p1, p99 = norm_values[band]['p1'], norm_values[band]['p99']
111
- band_value = (p99 - p1) * band_value + p1
112
- res.append(band_value)
113
  patch[3],patch[2],patch[1] = res
114
- return patch
115
 
116
  def _split_generators(self, dl_manager):
117
  # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
 
105
 
106
  def denormalize_s2(self,patch):
107
  r,g,b = patch[3],patch[2],patch[1]
108
+ res = []
109
+ for band, band_value in zip(['B04','B03','B02'],[r,g,b]) :
110
+ p1, p99 = norm_values[band]['p1'], norm_values[band]['p99']
111
+ band_value = (p99 - p1) * band_value + p1
112
+ res.append(band_value)
113
  patch[3],patch[2],patch[1] = res
114
+ return patch
115
 
116
  def _split_generators(self, dl_manager):
117
  # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration