Skip to content

digital-nomad-cheng/Hair_Segmentation_Keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

!! update ported some of the network to pytorch for it's easier to convert to ncnn. Check it here: mobile phone portrait matting

Hair_Segmentation_Keras

Implement some light weight hair segmentation network with keras which can be used on mobile devices easily.

Dataset

  1. CelebA Face/Hair segmentation database
  2. Figaro
  3. LFW Part Labels

Model

  1. [DeeplabV3plus]: MobileNetV2 as the encoder
  2. PrismaNet: network architecture as described in the Prisma-AI blog a.jpg
  3. FastDeepMatting 1.png 2.png
  4. PrismaNet + FastDeepMatting: base PrismaNet architecture plus the feathering block in fast deep matting

Training

Results

DeeplabV3plus

4.jpg

PrismaNet

4.jpg

FastDeepMatting

PrismaNet + FastDeepMatting

4.jpg

Matting methods used channel split operation which is unportable to CoreML as I wrote.

Serving

I have also use this model to predict hair color with tensorflow serving. Follow instructions bellow.

  1. Use this scripts to python serving/keras_to_serving.py generate model used for tensorflow serving deployment.
  2. Prepare tensorflow serving environments. Please refer to README.md

Todo

About

Implement some hair segmentation network and a color similarity calculating method.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages