Paolo-Fraccaro commited on
Commit
ea2e6cd
1 Parent(s): 9b097c6
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -150,9 +150,9 @@ def inference_on_file(target_image, model, custom_test_pipeline):
150
  ##### get metadata mask
151
  mask = open_tiff(target_image)
152
  # rgb = mask[[2, 1, 0], :, :].transpose((1,2,0))
153
- rgb1 = stretch_rgb((mask[[2, 1, 0], :, :].transpose((1,2,0))/10000*255).astype(np.unint8))
154
- rgb2 = stretch_rgb((mask[[8, 7, 6], :, :].transpose((1,2,0))/10000*255).astype(np.unint8))
155
- rgb3 = stretch_rgb((mask[[14, 13, 12], :, :].transpose((1,2,0))/10000*255).astype(np.unint8))
156
  meta = get_meta(target_image)
157
  mask = np.where(mask == meta['nodata'], 1, 0)
158
  mask = np.max(mask, axis=0)[None]
 
150
  ##### get metadata mask
151
  mask = open_tiff(target_image)
152
  # rgb = mask[[2, 1, 0], :, :].transpose((1,2,0))
153
+ rgb1 = stretch_rgb((mask[[2, 1, 0], :, :].transpose((1,2,0))/10000*255).astype(np.uint8))
154
+ rgb2 = stretch_rgb((mask[[8, 7, 6], :, :].transpose((1,2,0))/10000*255).astype(np.uint8))
155
+ rgb3 = stretch_rgb((mask[[14, 13, 12], :, :].transpose((1,2,0))/10000*255).astype(np.uint8))
156
  meta = get_meta(target_image)
157
  mask = np.where(mask == meta['nodata'], 1, 0)
158
  mask = np.max(mask, axis=0)[None]