eksemyashkina commited on
Commit
9dc7cf0
·
verified ·
1 Parent(s): 61123b8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -87
README.md CHANGED
@@ -1,87 +1,13 @@
1
- # Clothes Segmentation
2
-
3
- ![Sample Images and Segmentation Masks from Dataset](assets/dataset_examples.png)
4
-
5
- This project provides a solution for segmenting clothes into 18 categories using DINO, ViT and UNet models.
6
-
7
- * DINO: Pretrained backbone with a segmentation head
8
- * https://arxiv.org/abs/2104.14294
9
- * https://huggingface.co/facebook/dinov2-small
10
- * ViT: Pretrained vision transformer with a segmentation head
11
- * https://arxiv.org/abs/2010.11929
12
- * https://huggingface.co/google/vit-base-patch16-224
13
- * UNet: Custom implementation
14
- * https://arxiv.org/abs/1505.04597
15
-
16
- Gradio is used for building a web interface and Weights & Biases for experiments tracking.
17
-
18
- ## Installation
19
-
20
- 1. Clone the repository:
21
- ```bash
22
- git clone https://github.com/your-project/clothes-segmentation.git
23
- cd plant-classifier
24
- ```
25
-
26
- 2. Create and activate a virtual environment:
27
- ```bash
28
- python -m venv venv
29
- source venv/bin/activate
30
- ```
31
-
32
- 3. Install dependencies:
33
- ```bash
34
- pip install -r requirements.txt
35
- ```
36
-
37
- ## Usage
38
-
39
- ### Training the Model
40
- To train a model, specify one of the following using the --model argument: **dino**, **vit** or **unet**.
41
- ```bash
42
- python src/train.py --model dino
43
- python src/train.py --model vit
44
- python src/train.py --model unet
45
- ```
46
-
47
- You can also adjust other parameters, such as the number of epochs, batch size, and learning rate, by adding additional arguments. For example:
48
- ```bash
49
- python src/train.py --model unet --num-epochs 20 --batch-size 16 --learning-rate 0.001
50
- ```
51
-
52
- ### Launching the Gradio Interface
53
- ```bash
54
- python app.py
55
- ```
56
-
57
- Once the interface is running, you can select a model, upload an image and view the segmentation mask.
58
-
59
- ![Web Interface Screen](assets/spaces_screen.jpg)
60
-
61
- #### добавить ссылку
62
-
63
- ## Results
64
-
65
- | Model | Test Micro Recall | Test Micro Precision | Test Macro Precision | Test Macro Recall | Test Accuracy | Test Loss | Train Micro Recall | Train Micro Precision | Train Macro Precision | Train Macro Recall | Train Accuracy | Train Loss |
66
- |------------|-------------------|----------------------|----------------------|-------------------|---------------|-----------|--------------------|-----------------------|-----------------------|--------------------|----------------|------------|
67
- | DINO | 0.94986 | 0.94986 | 0.71364 | 0.67052 | 0.94986 | 0.53124 | 0.97019 | 0.97019 | 0.78185 | 0.72336 | 0.97019 | 0.30441 |
68
- | ViT | 0.9358 | 0.9358 | 0.63939 | 0.58365 | 0.9358 | 0.71193 | 0.96734 | 0.96734 | 0.74418 | 0.66295 | 0.96734 | 0.31166 |
69
- | UNet | 0.95798 | 0.95798 | 0.76354 | 0.7289 | 0.95798 | 0.56764 | 0.98035 | 0.98035 | 0.82934 | 0.82688 | 0.98035 | 0.25301 |
70
-
71
- ### Training Results of DINO
72
-
73
- ![DINO_test](assets/dino_test_plots.png)
74
-
75
- ![DINO_train](assets/dino_train_plots.png)
76
-
77
- ### Training Results of ViT
78
-
79
- ![ViT_test](assets/vit_test_plots.png)
80
-
81
- ![ViT_train](assets/vit_train_plots.png)
82
-
83
- ### Training Results of UNet
84
-
85
- ![UNet_test](assets/unet_test_plots.png)
86
-
87
- ![UNet_train](assets/unet_train_plots.png)
 
1
+
2
+ ---
3
+ title: Clothes Segmentation
4
+ emoji: 🏆
5
+ colorFrom: green
6
+ colorTo: indigo
7
+ sdk: gradio
8
+ sdk_version: 5.12.0
9
+ app_file: app.py
10
+ pinned: false
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference