File size: 1,169 Bytes
f37bf63
 
 
 
 
 
 
 
 
 
 
5e4b3a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
title: Pytorch Image Segmentation
emoji: 📊
colorFrom: pink
colorTo: pink
sdk: gradio
sdk_version: 3.22.1
app_file: app.py
pinned: false
---

# Pytorch Image Segmentation

## This repo contains the code for training a U-Net model for image segmentation on the Human Segmentation Dataset.

<a href="https://colab.research.google.com/github/josebenitezg/Pytorch-Image-Segmentation/blob/main/Learn_PyTorch_ImageSegmentation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"> 
</a>

## Usage :nut_and_bolt:

1. Clone this repo

```
git clone https://github.com/josebenitezg/Pytorch-Image-Segmentation
```

2. Create a virtual enviroment

```
python -m venv env
```

3. Activate virtual enviroment

- for linux

```
source env/bin/activate
```

- for windows

```
env\Scripts\Activate.bat
```

4. Install requirements

```
pip install -r requirements.txt
```

5. Train the model

```
python train.py
```

6. Run gradio inference app

```
python gradio_inference.py
```

This repo contains dataset files to train a small model.

Dataset Credit : https://github.com/VikramShenoy97/Human-Segmentation-Datasets