Update README.md
Browse files
README.md
CHANGED
@@ -1,48 +1,45 @@
|
|
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 |
-
1. **Setup**: Install dependencies with `pip install -r requirements.txt`.
|
47 |
-
2. **Training**: Run `python main.py --model segformer --epochs 20 --visualize True` to train the SegFormer (or any of the other models).
|
48 |
-
3. **Testing**: Use the `python main.py --model segformer --visualize True` to evaluate and visualize model predictions on the test set, with a `segformer.pt` file in the same directory.
|
|
|
1 |
+
---
|
2 |
+
title: Skin Lesion Segmentation Demo
|
3 |
+
emoji: 🧴
|
4 |
+
colorFrom: pink
|
5 |
+
colorTo: purple
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 4.28.1
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: mit
|
11 |
+
---
|
12 |
+
|
13 |
+
# 🧴 Skin Lesion Segmentation Demo
|
14 |
+
|
15 |
+
This interactive web application allows you to upload a skin image, select a segmentation model, and visualize the predicted lesion mask with optional post-processing.
|
16 |
+
|
17 |
+
## 🧠 Available Models
|
18 |
+
- **UNet**
|
19 |
+
- **SegFormer**
|
20 |
+
- **Inception-based CNN**
|
21 |
+
- **KMeans** (Unsupervised)
|
22 |
+
- **Gaussian Mixture Model** (Unsupervised)
|
23 |
+
|
24 |
+
## 🔧 Postprocessing Options
|
25 |
+
- None
|
26 |
+
- Morphological Open
|
27 |
+
- Morphological Close
|
28 |
+
- Erosion
|
29 |
+
- Dilation
|
30 |
+
|
31 |
+
## 💡 How it Works
|
32 |
+
The model takes in a skin lesion image (resized to 128×128), performs segmentation, and visualizes both:
|
33 |
+
- A binary predicted mask
|
34 |
+
- A color overlay on the original image
|
35 |
+
|
36 |
+
## 🛠️ Built With
|
37 |
+
- PyTorch & torchvision
|
38 |
+
- scikit-learn
|
39 |
+
- Hugging Face Transformers
|
40 |
+
- Gradio
|
41 |
+
- OpenCV
|
42 |
+
|
43 |
+
---
|
44 |
+
|
45 |
+
Demo created by Theodore Ioannidis (https://github.com/TheodoreIoannidis).
|
|
|
|
|
|