For this demo, we used deeplab package available here. The description of the Semantic Segmentation is detailed here Rethinking Atrous Convolution for Semantic Image Segmentation.
- Python 3.x
- Numpy
- Tensorflow 1.9.0
- OpenCV 3.4.1
- deeplab_v3
Place all images with jpeg extension inside images
folder. If the folder does not exist, create it. You need to modify the folder path in CreateTfRecord.ipynb.
Place deeplab package available here inside ./deeplab_v3
. If the folder does not exist, create it.
Place the checkpoints folder inside ./deeplab_v3/resnet
. If the folder does not exist, create it. checkpoints folder should contain files with .graph and .ckpt extensions.
Place the checkpoints folder inside ./deeplab_v3/tboard_logs
. If the folder does not exist, create it.
Run the jupyter notebook CreateTfRecord.ipynb to convert all of the jpeg images to one file with TfRecords extension that is a standard format for tensorflow.
Run the jupyter notebook deeplab_background_removal.ipynb to evaluate the pretrained model on the image dataset.
- Example of processed images without any transfer learning