This is the DeepLabv3+ model trained for the AlphaPilot competition.
Create a test folder and extract the Data_LeaderboardTesting images into it:
mkdir -p data/dataset/test
cd data/dataset/test
wget https://s3.amazonaws.com/herox-alphapilot/Data_LeaderboardTesting.zip
unzip Data_LeaderboardTesting.zip
mv Data_LeaderboardTesting/* .
rm -rf Data_LeaderboardTesting
Download the model checkpoint from Shreeyak's alphapilot shared Google Drive folder. The checkpoints are saved at alphapilot -> deeplabv3 -> <model> -> checkpoints
.
Run the inference:
python3 inference.py \
--checkpoint_path <path/to/checkpoint/file> \
--input_images_path "data/dataset/test/images" \
--label_images_path <path/to/labels/if/available> \
--result_folder <name/of/folder/to/save/results> \
--imsize <image_size> \
Here's an example. Also check out results_infer.sh
for an example script:
python3 inference.py \
--checkpoint_path "run/run_03/models/deeplabv3plus-xception_epoch-9.pth" \
--input_images_path "data/dataset/test/images" \
--label_images_path "" \ # This path should be blank if labels do not exist for test set.
--result_folder "512pos8" \
--imsize 512 \
================================== ORIGINAL DEEPLAP README BELOW ==================================
- Basic deeplab v3+ model, using modified xception as backbone
- Training deeplab v3+ on Pascal VOC 2012, SBD, Cityscapes datasets
- Results evaluation on Pascal VOC 2012 test set
- Deeplab v3+ model using resnet as backbone
This is a PyTorch(0.4.0) implementation of DeepLab-V3-Plus. It can use Modified Aligned Xception and ResNet as backbone. Currently, we train DeepLab V3 Plus using Pascal VOC 2012, SBD and Cityscapes datasets.
The code was tested with Anaconda and Python 3.5. After installing the Anaconda environment:
-
Clone the repo:
git clone https://github.com/jfzhang95/pytorch-deeplab-xception.git cd pytorch-deeplab-xception
-
Install dependencies:
For PyTorch dependency, see pytorch.org for more details.
For custom dependencies:
pip install matplotlib pillow tensorboardX
-
Configure your dataset path in mypath.py.
-
You can train deeplab v3+ using xception or resnet as backbone.
To train DeepLabV3+ on Pascal VOC 2012, please do:
python train.py
To train it on Cityscapes, please do:
python train_cityscapes.py