All Projects → takiyu → Portrait_matting

takiyu / Portrait_matting

Licence: gpl-3.0
Implementation of "Automatic Portrait Segmentation" and "Deep Automatic Portrait Matting" with Chainer.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Portrait matting

Spacenet building detection
Project to train/test convolutional neural networks to extract buildings from SpaceNet satellite imageries.
Stars: ✭ 83 (-68.91%)
Mutual labels:  semantic-segmentation, chainer
Chainer Segnet
SegNet implementation & experiments in Chainer
Stars: ✭ 42 (-84.27%)
Mutual labels:  semantic-segmentation, chainer
Imgclsmob
Sandbox for training deep learning networks
Stars: ✭ 2,405 (+800.75%)
Mutual labels:  semantic-segmentation, chainer
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (-71.54%)
Mutual labels:  semantic-segmentation, chainer
Fcn
Chainer Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)
Stars: ✭ 211 (-20.97%)
Mutual labels:  semantic-segmentation, chainer
DDUnet-Modified-Unet-for-WMH-with-Dense-Dilate
WMH segmentaion with unet, dilated_unet, and with ideas from denseNet
Stars: ✭ 23 (-91.39%)
Mutual labels:  semantic-segmentation
voxelnet chainer
VoxelNet implementation in Chainer
Stars: ✭ 26 (-90.26%)
Mutual labels:  chainer
HugsVision
HugsVision is a easy to use huggingface wrapper for state-of-the-art computer vision
Stars: ✭ 154 (-42.32%)
Mutual labels:  semantic-segmentation
ObjectNet
PyTorch implementation of "Pyramid Scene Parsing Network".
Stars: ✭ 15 (-94.38%)
Mutual labels:  semantic-segmentation
Torchsat
🔥TorchSat 🌏 is an open-source deep learning framework for satellite imagery analysis based on PyTorch.
Stars: ✭ 261 (-2.25%)
Mutual labels:  semantic-segmentation
Indoor-segmentation
Indoor segmentation for robot navigating, which is based on deeplab model in TensorFlow.
Stars: ✭ 105 (-60.67%)
Mutual labels:  semantic-segmentation
waifu2x-chainer
Chainer implementation of waifu2x
Stars: ✭ 137 (-48.69%)
Mutual labels:  chainer
pointnet2 semantic
A pointnet++ fork, with focus on semantic segmentation of differents datasets
Stars: ✭ 69 (-74.16%)
Mutual labels:  semantic-segmentation
inv rl
Inverse Reinforcement Learning Argorithms
Stars: ✭ 34 (-87.27%)
Mutual labels:  chainer
SAComputerVisionMachineLearning
Computer Vision and Machine Learning related projects of Udacity's Self-driving Car Nanodegree Program
Stars: ✭ 36 (-86.52%)
Mutual labels:  semantic-segmentation
Face Makeup.pytorch
Lip and hair color editor using face parsing maps.
Stars: ✭ 254 (-4.87%)
Mutual labels:  semantic-segmentation
DST-CBC
Implementation of our paper "DMT: Dynamic Mutual Training for Semi-Supervised Learning"
Stars: ✭ 98 (-63.3%)
Mutual labels:  semantic-segmentation
TensorFlow-Advanced-Segmentation-Models
A Python Library for High-Level Semantic Segmentation Models based on TensorFlow and Keras with pretrained backbones.
Stars: ✭ 64 (-76.03%)
Mutual labels:  semantic-segmentation
captioning chainer
A fast implementation of Neural Image Caption by Chainer
Stars: ✭ 17 (-93.63%)
Mutual labels:  chainer
PiCIE
PiCIE: Unsupervised Semantic Segmentation using Invariance and Equivariance in clustering (CVPR2021)
Stars: ✭ 102 (-61.8%)
Mutual labels:  semantic-segmentation

Portrait Matting

Deep Automatic Portrait Matting and Automatic Portrait Segmentation for Image Stylization implementation which predicts alpha or binary masks of portrait images automatically.

This is NOT official implementation.

Notice of License

This software is released under the GPL License except data_original directory.

Data under data_original directory is copied from the paper author's. Rights of the data belong to them.

We created our original alpha masks and the following results are generated by them.

Implemented Models

  • FCN8s for binary segmentation with RGB image
  • FCN8s for binary segmentation with RGB image, mean mask and grid images
  • FCN8s for trimap segmentation with RGB image, mean mask and grid images
  • FCN8s and matting layer with RGB image, mean mask and grid images

Testing Environments

  • OS: Ubuntu 16.04 and Latest Arch Linux
  • Python: 3.5
  • Chainer: 3.4.0
  • OpenCV: 3.4.0
  • Dlib: 19.9.0

Training

Training data which is contained this repository is binary mask for segmentation created by paper's author.

For training of trimap and matting, extra alpha masks are needed.

Preparation

# Download images from the internet.
$ python scripts/prepare_seg_dataset.py

# Generate mean masks and grids.
$ python scripts/prepare_seg_plus_dataset.py

# Generate trimaps from alpha masks. (extra alpha mask are needed)
$ python scripts/prepare_seg_tri_dataset.py

# Computes loss weight matrixs. (extra alpha mask are needed)
$ python scripts/prepare_matting_dataset.py

Training

$ python scripts/train.py --mode {seg,seg+,seg_tri,mat}

Testing

$ python scripts/train.py --mode {seg,seg+,seg_tri,mat} --model_path <path> -i <image path>

Results

Matting

First column is input image. Second column is output alpha mask. Third column is background replacement result.

ToDo

  • [ ] Collect more data.
  • [ ] Seek more effective training method about matting layer.
  • [ ] Tune hyper parameters automatically.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].