Shreeyak / pytorch-deeplabv3-alphapilot

Deeplabv3 used for alphapilot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AlphaPilot pytorch-deeplab-xception

This is the DeepLabv3+ model trained for the AlphaPilot competition.

Results

Instructions to run inference

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 ==================================

TODO

  • 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

Introduction

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.

Results

Installation

The code was tested with Anaconda and Python 3.5. After installing the Anaconda environment:

  1. Clone the repo:

    git clone https://github.com/jfzhang95/pytorch-deeplab-xception.git
    cd pytorch-deeplab-xception
  2. Install dependencies:

    For PyTorch dependency, see pytorch.org for more details.

    For custom dependencies:

    pip install matplotlib pillow tensorboardX
  3. Configure your dataset path in mypath.py.

  4. 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

About

Deeplabv3 used for alphapilot

License:MIT License


Languages

Language:Python 89.3%Language:Jupyter Notebook 10.3%Language:Shell 0.3%