Data Science Project 2020
- PyTorch 1.x or 0.41
pip install -r requirements.txt
- Download dataset from original image: here file annotation image: here to inputs/ and unzip. File structure:
inputs
└── cityscapes
├── images
| ├── 0a7e06.png
│ ├── 0aab0a.png
│ ├── ...
|
└── masks
├── 0
| ├── 0a7e06.png
| ├── ...
|
├── 1
| ├── 0a7e06.png
| ├── ...
|
├── ...
|
└── 27
├── 0a7e06.png
├── ...
- Preprocess
python preprocess.py
- Train model
- with Deep Supervision
python train.py --dataset cityscapes --arch NestedUNet --num_classes 29 --deep_supervision True --epochs 200
- without Deep Supervision
python train.py --dataset cityscapes --arch NestedUNet --num_classes 29 --deep_supervision False --epochs 200
- Evaluate and Visualize
- with Deep Supervision
python val.py --name cityscapes_NestedUNet_wDS
- without Deep Supervision
python val.py --name cityscapes_NestedUNet_woDS
- Loss Function: BCEDiceLoss
Model | IoU | Dice Coeff |
---|---|---|
UNet++ without Deep Supervision | 0.7934 | 0.8785 |
UNet++ with Deep Supervision | 0.7767 | 0.8626 |
UNet | 0.7920 | 0.8776 |
Model | IoU | Dice Coeff |
---|---|---|
UNet++ without Deep Supervision | 0.7934 | 0.8785 |
PSPNet | 0.8628 | 0.6771 |
HRNet-ORC | 0.8886 | 0.7405 |
UNet | 0.7920 | 0.8776 |