Home

Awesome

PortraitNet

Code for the paper "PortraitNet: Real-time portrait segmentation network for mobile device". @ CAD&Graphics 2019


Introduction

We propose a real-time portrait segmentation model, called PortraitNet, that can run effectively and efficiently on mobile device. PortraitNet is based on a lightweight U-shape architecture with two auxiliary losses at the training stage, while no additional cost is required at the testing stage for portrait inference.

<div align="center"> <img src="figures/Introduction.jpg" width="800px"/> <p> Portrait segmentation applications on mobile device.</p> </div>

Experimental setup

Requirements

Download datasets


Training

Network Architecture

<div align="center"> <img src="figures/PortraitNet.jpg" width="800px"/> <p> Overview of PortraitNet.</p> </div>

Training Steps

cd myTrain
python2.7 train.py

Testing

In the folder of myTest:


Visualization

Using tensorboard to visualize the training process:

cd path_to_save_model
tensorboard --logdir='./log'

Download models

from Dropbox:

from Baidu Cloud: