gauthamk commited on
Commit
5393f37
Β·
1 Parent(s): 32ba8e8

Minor Changes

Browse files
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: Water Body Segmentation
3
- emoji: πŸƒ
4
  colorFrom: blue
5
  colorTo: gray
6
  sdk: gradio
@@ -9,4 +9,19 @@ app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: Water Body Segmentation
3
+ emoji: πŸ€—
4
  colorFrom: blue
5
  colorTo: gray
6
  sdk: gradio
 
9
  pinned: false
10
  ---
11
 
12
+ # UNET Water Body Segmentation - PyTorch
13
+
14
+ This project contains the code for training and deploying a UNET model for water body segmentation from satellite images. The model is trained on the [Satellite Images of Water Bodies](https://www.kaggle.com/datasets/franciscoescobar/satellite-images-of-water-bodies) from Kaggle. The model is trained using PyTorch and deployed using [Gradio](https://gradio.app/) on [Hugging Face Spaces](https://huggingface.co/spaces).
15
+
16
+ ## πŸš€ Getting Started
17
+
18
+ All the code for training the model and exporting to ONNX format is present in the [notebook](notebooks) folder or you can use this [Kaggle Notebook](https://www.kaggle.com/code/gauthamkrishnan119/water-body-segmentation-pytorch) for training the model. The [app.py](app.py) file contains the code for deploying the model using Gradio.
19
+
20
+ ## πŸ€— Demo
21
+
22
+ You can try out the model on [Hugging Face Spaces](https://huggingface.co/spaces/gauthamk/water-body-segmentation)
23
+
24
+ ## πŸ–₯️ Sample Inference
25
+
26
+ ![Sample Inference](samples/sample1.png)
27
+
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from functions import *
3
 
4
  title = "Water Body Segmentation - Image Segmentation PyTorch"
5
- examples = ['samples/image1.png', 'samples/image2.png', 'samples/image3.png', 'samples/image4.png', 'samples/image5.png']
6
 
7
  interface = gr.Interface(fn=predict, inputs=gr.Image(type= 'numpy').style(height= 256),
8
  outputs= gr.Image(type = "numpy").style(height= 256),
 
2
  from functions import *
3
 
4
  title = "Water Body Segmentation - Image Segmentation PyTorch"
5
+ examples = ['examples/image1.png', 'examples/image2.png', 'examples/image3.png', 'examples/image4.png', 'examples/image5.png']
6
 
7
  interface = gr.Interface(fn=predict, inputs=gr.Image(type= 'numpy').style(height= 256),
8
  outputs= gr.Image(type = "numpy").style(height= 256),
{samples β†’ examples}/image1.png RENAMED
File without changes
{samples β†’ examples}/image2.png RENAMED
File without changes
{samples β†’ examples}/image3.png RENAMED
File without changes
{samples β†’ examples}/image4.png RENAMED
File without changes
{samples β†’ examples}/image5.png RENAMED
File without changes
samples/sample1.png ADDED

Git LFS Details

  • SHA256: 234c6f6c2ef11e15eb248698c09669cde7c8cc5ba8e9939f75c4b212d0859562
  • Pointer size: 131 Bytes
  • Size of remote file: 265 kB