Update README.md
Browse files
README.md
CHANGED
@@ -37,18 +37,18 @@ python app.py
|
|
37 |
2.We provide two forms of segmentation results for download at β’.
|
38 |

|
39 |
|
40 |
-
|
41 |
-
***Creating a Dataset***
|
42 |
|
43 |
Here is an example if you want to make own dataset.
|
44 |
|
45 |
-
|
46 |
<pre>
|
47 |
π CVRPDataset/
|
48 |
ββπ images/
|
49 |
ββπ labelme_jsons/
|
50 |
</pre>
|
51 |
-
|
52 |
```bash
|
53 |
python run/labelme2mask.py
|
54 |
```
|
@@ -58,7 +58,7 @@ Here is an example if you want to make own dataset.
|
|
58 |
ββπ img_dir/
|
59 |
ββπ ann_dir/
|
60 |
</pre>
|
61 |
-
|
62 |
```bash
|
63 |
python run/split_dataset.py
|
64 |
```
|
@@ -76,7 +76,7 @@ Here is an example if you want to make own dataset.
|
|
76 |
|
77 |
You can download our training set and validation set [here](http://61.155.111.202:18080/cvrp).
|
78 |
|
79 |
-
***Dataset Configs***
|
80 |
|
81 |
```bash
|
82 |
pip install -r run/requirements.txt
|
@@ -88,7 +88,7 @@ cd ../../configs/_base_/datasets
|
|
88 |
wget https://huggingface.co/CVRPDataset/Model/resolve/main/dataset_configs/CVRP_pipeline.py
|
89 |
```
|
90 |
If you want to register your own dataset,
|
91 |
-
|
92 |
```python
|
93 |
from .CVRP import CVRPDataset
|
94 |
```
|
@@ -97,7 +97,7 @@ If you want to register your own dataset,
|
|
97 |
# other datasets
|
98 |
__all__ = ['CVRPDataset']
|
99 |
```
|
100 |
-
|
101 |
```python
|
102 |
class CVRPDataset(BaseSegDataset):
|
103 |
METAINFO = {
|
@@ -106,7 +106,7 @@ If you want to register your own dataset,
|
|
106 |
}
|
107 |
```
|
108 |
|
109 |
-
|
110 |
```python
|
111 |
dataset_type = 'CVRPDataset'
|
112 |
data_root = 'CVRPDataset/'
|
@@ -121,7 +121,7 @@ If you want to register your own dataset,
|
|
121 |
|
122 |
|
123 |
|
124 |
-
***Model Configs***
|
125 |
|
126 |
You can generate model config files using *run_configs.py*
|
127 |
|
@@ -142,7 +142,7 @@ cd CVRP_configs
|
|
142 |
wget https://huggingface.co/CVRPDataset/Model/resolve/main/model_configs/CVRP_mask2former.py
|
143 |
```
|
144 |
|
145 |
-
***Train***
|
146 |
```bash
|
147 |
cd mmsegmentation
|
148 |
python tools/train.py CVRP_configs/CVRP_mask2former.py
|
@@ -155,7 +155,7 @@ cd CVRP_mask2former
|
|
155 |
wget https://huggingface.co/CVRPDataset/Model/resolve/main/checkpoint/Mask2Former.pth
|
156 |
```
|
157 |
|
158 |
-
***Test***
|
159 |
```bash
|
160 |
python ../run/test.py -d CVRPDataset/val -m CVRP_configs/CVRP_mask2former.py -pth work_dirs/CVRP_mask2former/Mask2Former.pth -o outputs/CVRP_mask2former
|
161 |
```
|
|
|
37 |
2.We provide two forms of segmentation results for download at β’.
|
38 |

|
39 |
|
40 |
+
***Train and Test***
|
41 |
+
1. ***Creating a Dataset***
|
42 |
|
43 |
Here is an example if you want to make own dataset.
|
44 |
|
45 |
+
β Directory structure of the dataset:
|
46 |
<pre>
|
47 |
π CVRPDataset/
|
48 |
ββπ images/
|
49 |
ββπ labelme_jsons/
|
50 |
</pre>
|
51 |
+
β‘ Convert labelme files to mask:
|
52 |
```bash
|
53 |
python run/labelme2mask.py
|
54 |
```
|
|
|
58 |
ββπ img_dir/
|
59 |
ββπ ann_dir/
|
60 |
</pre>
|
61 |
+
β’ Split the training set and test set.
|
62 |
```bash
|
63 |
python run/split_dataset.py
|
64 |
```
|
|
|
76 |
|
77 |
You can download our training set and validation set [here](http://61.155.111.202:18080/cvrp).
|
78 |
|
79 |
+
2. ***Dataset Configs***
|
80 |
|
81 |
```bash
|
82 |
pip install -r run/requirements.txt
|
|
|
88 |
wget https://huggingface.co/CVRPDataset/Model/resolve/main/dataset_configs/CVRP_pipeline.py
|
89 |
```
|
90 |
If you want to register your own dataset,
|
91 |
+
β Import and register datasets in `mmseg/datasets/__init__.py`
|
92 |
```python
|
93 |
from .CVRP import CVRPDataset
|
94 |
```
|
|
|
97 |
# other datasets
|
98 |
__all__ = ['CVRPDataset']
|
99 |
```
|
100 |
+
β‘ Register dataset class in `mmseg/datasets/CVRP.py'
|
101 |
```python
|
102 |
class CVRPDataset(BaseSegDataset):
|
103 |
METAINFO = {
|
|
|
106 |
}
|
107 |
```
|
108 |
|
109 |
+
β’ Modify pipeline of data process in `config/_base_/CVRP_pipeline.py`
|
110 |
```python
|
111 |
dataset_type = 'CVRPDataset'
|
112 |
data_root = 'CVRPDataset/'
|
|
|
121 |
|
122 |
|
123 |
|
124 |
+
3. ***Model Configs***
|
125 |
|
126 |
You can generate model config files using *run_configs.py*
|
127 |
|
|
|
142 |
wget https://huggingface.co/CVRPDataset/Model/resolve/main/model_configs/CVRP_mask2former.py
|
143 |
```
|
144 |
|
145 |
+
4. ***Train***
|
146 |
```bash
|
147 |
cd mmsegmentation
|
148 |
python tools/train.py CVRP_configs/CVRP_mask2former.py
|
|
|
155 |
wget https://huggingface.co/CVRPDataset/Model/resolve/main/checkpoint/Mask2Former.pth
|
156 |
```
|
157 |
|
158 |
+
5. ***Test***
|
159 |
```bash
|
160 |
python ../run/test.py -d CVRPDataset/val -m CVRP_configs/CVRP_mask2former.py -pth work_dirs/CVRP_mask2former/Mask2Former.pth -o outputs/CVRP_mask2former
|
161 |
```
|