TensorFlow implementation of Automatic Portrait Segmentation
Setup
Dependencies
- Python 3.6+
- TensorFlow 1.6+
- caffe (only use to transform pretrained model)
Prepare environment, model and data
$ pip install -r requirements.txt
$ wget http://dl.caffe.berkeleyvision.org/fcn8s-heavy-pascal.caffemodel
$ python caffe_mat_transform.py
$ mkdir model
$ cd data
$ python data_download.py
Usage
Training
$ python train.py
Testing
$ python test.py
References
- Fully Convolutional Models for Semantic Segmentation by Evan Shelhamer*, Jonathan Long*, Trevor Darrell
- Automatic Portrait Segmentation for Image Stylization by Xiaoyong Shen, Aaron Hertzmann, Jiaya Jia, Sylvain Paris, Brian Price, Eli Shechtman, Ian Sachs