amosfang commited on
Commit
5f259ef
1 Parent(s): 1e13053

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -8
app.py CHANGED
@@ -116,22 +116,44 @@ sample_images = get_sample_images('example_images')
116
  gr.Interface(
117
  predict,
118
  title='Land Cover Segmentation',
119
- description=
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  '''
121
  The DeepGlobe Land Cover Classification Challenge offers the first public dataset containing high resolution
122
  satellite imagery focusing on rural areas. As there are multiple land cover types and high density of annotations,
123
  this dataset is more challenging than its counterparts launched in 2018. All satellite images contain RGB pixels,
124
  with a pixel resolution of 50 cm. The total size of the total area of the dataset is equivalent to 10716.9 square kilometers.
125
 
126
- This deep learning project was conducted while I collaborated with the Omdena Team on Seagrass detection challenge in 2024,
127
- I trained on 803 images and their segmentation masks (with split of 80/20%). For this multilabel segmentation task, we trained 4 models,
128
  the basic 4-blocks U-net CNN, VGG16 U-Net, Resnet50 U-net and Efficient Net U-net. Then, I built an ensemble model that achieved a
129
  validation accuracy of about 75% and dice score of about 0.6.
130
- ''',
131
- inputs=[gr.Image()],
132
- outputs=[gr.Image()],
133
- examples=sample_images
134
- ).launch(debug=True, share=True)
135
 
136
  # Launch the interface
137
  iface.launch(share=True)
 
116
  gr.Interface(
117
  predict,
118
  title='Land Cover Segmentation',
119
+ inputs=[gr.Image()],
120
+ outputs=[gr.Image()],
121
+ examples=sample_images
122
+ ).launch(debug=True, share=True)
123
+
124
+ tab1 = gr.Interface(
125
+ fn=predict,
126
+ inputs=gr.Image(label='', type="pil"),
127
+ outputs=[gr.Image(type="pil"), gr.Image(type="pil")],
128
+ title='Images with Ground Truth',
129
+ examples=sample_images,
130
+ tab="Train"
131
+ )
132
+
133
+ # Create the video processing interface
134
+ tab2 = gr.Interface(
135
+ fn=process_video,
136
+ inputs=gr.File(label=""),
137
+ outputs=gr.File(label=""),
138
+ title='Images with Ground Truth',
139
+ examples=sample_images,
140
+ tab="Test"
141
+ )
142
+
143
+ # Create a Multi Interface with Tabs
144
+ iface = gr.TabbedInterface([tab1, tab2],
145
+ title='Land Cover Segmentation',
146
+ description=
147
  '''
148
  The DeepGlobe Land Cover Classification Challenge offers the first public dataset containing high resolution
149
  satellite imagery focusing on rural areas. As there are multiple land cover types and high density of annotations,
150
  this dataset is more challenging than its counterparts launched in 2018. All satellite images contain RGB pixels,
151
  with a pixel resolution of 50 cm. The total size of the total area of the dataset is equivalent to 10716.9 square kilometers.
152
 
153
+ We trained on 803 images and their segmentation masks (with split of 80/20%). For this multilabel segmentation task, we trained 4 models,
 
154
  the basic 4-blocks U-net CNN, VGG16 U-Net, Resnet50 U-net and Efficient Net U-net. Then, I built an ensemble model that achieved a
155
  validation accuracy of about 75% and dice score of about 0.6.
156
+ ''')
 
 
 
 
157
 
158
  # Launch the interface
159
  iface.launch(share=True)