SegNet implementation in Tensorflow.
- Python 3.7.7
- Numpy==1.18.4
- Pillow==7.1.2
- matplotlib==3.2.1
- tensorflow-gpu==2.1.0
- Clone the repo:
git clone https://github.com/msm1089/segnet.git
- Download CamVid Dataset
bash download.sh
If you do not have wget installed, install it and try again. I used Chocalatey and then
choco install wget
- Convert CamVid dataset to TFRecord format
python camvid.py --target train
- Create conda env (recommended but optional):
conda create -n tf-gpu
conda activate tf-gpu
Install tensorflow-gpu:
conda install tensorflow-gpu
Install Pillow & matplotlib:
pip install Pillow matplotlib
- Training
python train.py \
--iteration 20000 \
--snapshot 4000 \
--optimizer adadelta \
--learning_rate 1.0
- Evaluation
python eval.py \
--resdir eval \
--outdir output/camvid/segnet \
--checkpoint_dir output/camvid/segnet/trained_model \
--num_sample 233