Anaconda Environment: Download and install from Anaconda.
conda create --name deeplab python=3.10 -y
Activate the environment using the command:
conda activate deeplab`
Install PyTorch from PyTorch
pip install numpy scikit-learn opencv-python pillow
git clone [email protected]:av2.0/aerial_imagery/lane-marking-detection.git
cd lane-marking-detection/DeepLabV3Plus/pytorch-deeplab-xception/
Training Dataset used: skyscapes
Download the datsaset and copy it to the folder skyscapes
├── DeepLabV3Plus
├── skyscapes
│ ├── test
│ │ ├──images
│ ├── train
│ │ ├──images
│ │ ├──labels
│ ├── val
│ │ ├──images
│ │ ├──labels
Trained model was then tested on the aerial images obtained from Bavarian open data
Next, to obtain the train dataset augmentation
cd DeepLabV3Plus/pytorch-deeplab-xception-master/dataloaders/datasets
Update the skyscapes dataset base directory path and run this to get the augmented dataset
python skyscapes_data_aug.py
cd DeepLabV3Plus/pytorch-deeplab-xception-master/
change the hyperparameters as needed in train.py and run
python train.py
Xception and ResNet101 are two backbones used in this model.
Download the pretrained weights from the following Model Zoo.
Copy them to /DeepLabV3Plus/pytorch-deeplab-xception-master/modeling/backbone/
For Xception backbone
cd modeling/backbone/
Open xcpetion.py, change the weights path as required.
Same process for ResNet101 backbone.
Update the parameters in /DeepLabV3Plus/pytorch-deeplab-xception/bav_photo_resize.py
python bav_photo_resize.py
cd DeepLabV3Plus/pytorch-deeplab-xception-master/
update the directory paths in predict.py and run
python predict.py
*Used only for multi-class dataset. Go to the following folder and then run the following file.
cd DeepLabV3Plus/pytorch-deeplab-xception-master/
python calc_num_pixels.py
![]() |
![]() |
---|---|
Sample Scene | Ground Truth |
![]() |
![]() |
---|---|
Inference 1 (Xception) | Inference 2 (ResNet101) |
![]() |
![]() |
![]() |
---|---|---|
Sample Scene | Inference 1 - Multi-Class | Inference 2 - Binary-Class |
- DeepLabv3+ Pytorch implementation: DeepLabV3+
- Inference: predict
- TUM Course - Introduction to Deep Learning: IN2346