This is a Road_extraction_network, it can be easy to read and learn. It also can add your network and dataset to train.
- Git clone from GitHub.
git clone https://github.com/ShanZard/Road_extraction_network
- cd to Semantic-segmentation-framework
cd Semantic-segmentation-framework
- install requirements
pip install -r requirements
- Should organize dataset like this:
├── data
│ ├── your_dataset
| | |——train
| | | ├── images
│ │ │ │ ├── xxx{img_suffix}
│ │ │ │ ├── yyy{img_suffix}
│ │ │ │ ├── zzz{img_suffix}
│ │ │ ├── mask
│ │ │ │ ├── xxx{seg_map_suffix}
│ │ │ │ ├── yyy{seg_map_suffix}
│ │ │ │ ├── zzz{seg_map_suffix}
│ │ ├── val/test
│ │ │ ├── images
│ │ │ │ ├── xxx{img_suffix}
│ │ │ │ ├── yyy{img_suffix}
│ │ │ │ ├── zzz{img_suffix}
│ │ │ ├── mask
│ │ │ │ ├── xxx{seg_map_suffix}
│ │ │ │ ├── yyy{seg_map_suffix}
│ │ │ │ ├── zzz{seg_map_suffix}
Note:
- images names should be same as mask
- mask should be [h,w], if your mask is RGB[3,h,w], you can use
tools/pre_processdataset.py
to convert it .
- should change
utils/palette.py
- change your args in
train.py
We will update the complete code as soon as possible