Keras DeepLab V3.1+
DeepLab V3+ for Semantic Image Segmentation With Subpixel Upsampling Layer Implementation in Keras
Added Tensorflow 2 support - Nov 2019
DeepLab is a state-of-art deep learning model for semantic image segmentation.
Original DeepLabV3 can be reviewed here: DeepLab Paper
with the original model implementation.
Features
- Conditional Random Fields (CRF) implementation as post-processing step to aquire better contour that is correlated with nearby pixels and their color. See here: Fully-Connected CRF
- Custom image generator for semantic segmentation with large augmentation capabilities.
New Features That Are Not Included In The Paper
- Keras Subpixel (Pixel-Shuffle layer) from: Keras-Subpixel for efficient upsampling and more accurate segmentation
- ICNR Initializer for subpixel layer (removing checkerboard artifact) ICNR
- Comparisson of the original Deeplab model with my Deeplab+subpixel+CRF
- Fast training - transfer learning from paper's proposed model to a better model within ~1 hour with 1-1080Ti GPU
- Jaccard (mIOU) monitoring during training process for multi-class segmentation tasks.
- Adaptive pixel weights.
Results
I've compared the segmentation visual results and the IOU score between paper's model and mine, as well as the outcome of applying CRF as a post-processing step.
Below depicted few examples:
And the IOU score amid the classes:
I didn't receive a significant improvement of the IOU scores, perhaps due to low number of epochs. However I believe this method can eventually outperform the original model for a bigger dataset and more epochs.
Dependencies
- Python 3.6
- Keras>2.2.x
- pydensecrf
- tensorflow > 1.11