A Re-Implementation project Image Segmentation Using Architecture DeepLabV3Plus. The Dataset is CityScapes Dataset
First of all you must download and extract the dataset in data folder. Then download the labels IDs, names and instance classes of the Cityscapes dataset are used and can be found here
# Training
>>> python3 train.py --model ${Name of Model Save} --batch-size ${Number of Batch Size training data} --batch-size-val ${Number of Batch Size validation data} --epochs ${Number of Epochs} --lr ${Number of Learning Rate}
>>> python3 train.py --model model.pth --batch-size 16 --batch-size-val 16 --epochs 100 --lr 1e-4
For Inference have two mode, image prediction and video prediction
- Image Prediction
>>> python3 inference.py --model ${Name of Model Saved} --image ${Path of Single Image file} --save ${Bool to save the image} --name-prediction ${Name of Image Prediction}
>>> python3 inference.py --model model.pth --image images.png --save --name-prediction images_prediction.png # Image Prediction with Save the Prediction to a file
>>> python3 inference.py --model model.pth --image image.png # Image Prediciton just show the Result
- Video Prediction
>>> python3 inference.py --model ${Name of Model Saved} --video ${Path of Video file} --video-prediction ${Name of Video Prediction}
>>> python3 inference.py --model model.pth --video videos.mp4 --video-prediction videos_prediction.mp4