Paolo-Fraccaro commited on
Commit
77e0567
1 Parent(s): 2b979cd
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -158,7 +158,7 @@ def inference_on_file(target_image, model, custom_test_pipeline):
158
  time_taken = np.round(et - st, 1)
159
  print(f'Inference completed in {str(time_taken)} seconds')
160
 
161
- return rgb, result[0][0]*255
162
 
163
  def process_test_pipeline(custom_test_pipeline, bands=None):
164
 
@@ -190,7 +190,7 @@ func = partial(inference_on_file, model=model, custom_test_pipeline=custom_test_
190
 
191
  with gr.Blocks() as demo:
192
 
193
- gr.Markdown(value='# Prithvi burn scars detection')
194
  gr.Markdown(value='''Prithvi is a first-of-its-kind temporal Vision transformer pretrained by the IBM and NASA team on continental US Harmonised Landsat Sentinel 2 (HLS) data. This demo showcases how the model was finetuned to detect water at a higher resolution than it was trained on (i.e. 10m versus 30m) using Sentinel 2 imagery from on the [sen1floods11 dataset](https://github.com/cloudtostreet/Sen1Floods11). More detailes can be found [here](https://huggingface.co/ibm-nasa-geospatial/Prithvi-100M-sen1floods11).\n
195
  The user needs to provide a Sentinel 2 image with all the 12 bands (in the usual Sentinel 2) order in reflectance units multiplied by 10,000 (e.g. to save on space), with the code that is going to pull up Blue, Green, Red, Narrow NIR, SWIR, SWIR 2.
196
  ''')
 
158
  time_taken = np.round(et - st, 1)
159
  print(f'Inference completed in {str(time_taken)} seconds')
160
 
161
+ return rgb/10000, result[0][0]*255
162
 
163
  def process_test_pipeline(custom_test_pipeline, bands=None):
164
 
 
190
 
191
  with gr.Blocks() as demo:
192
 
193
+ gr.Markdown(value='# Prithvi sen1floods11')
194
  gr.Markdown(value='''Prithvi is a first-of-its-kind temporal Vision transformer pretrained by the IBM and NASA team on continental US Harmonised Landsat Sentinel 2 (HLS) data. This demo showcases how the model was finetuned to detect water at a higher resolution than it was trained on (i.e. 10m versus 30m) using Sentinel 2 imagery from on the [sen1floods11 dataset](https://github.com/cloudtostreet/Sen1Floods11). More detailes can be found [here](https://huggingface.co/ibm-nasa-geospatial/Prithvi-100M-sen1floods11).\n
195
  The user needs to provide a Sentinel 2 image with all the 12 bands (in the usual Sentinel 2) order in reflectance units multiplied by 10,000 (e.g. to save on space), with the code that is going to pull up Blue, Green, Red, Narrow NIR, SWIR, SWIR 2.
196
  ''')