All Projects → thangtran480 → Hair Segmentation

thangtran480 / Hair Segmentation

Licence: mit
hair segmentation in mobile device

Projects that are alternatives of or similar to Hair Segmentation

Deeplabv3 Plus
Tensorflow 2.3.0 implementation of DeepLabV3-Plus
Stars: ✭ 32 (-80%)
Mutual labels:  jupyter-notebook, segmentation
Multiclass Semantic Segmentation Camvid
Tensorflow 2 implementation of complete pipeline for multiclass image semantic segmentation using UNet, SegNet and FCN32 architectures on Cambridge-driving Labeled Video Database (CamVid) dataset.
Stars: ✭ 67 (-58.12%)
Mutual labels:  jupyter-notebook, segmentation
Pytorch connectomics
PyTorch Connectomics: segmentation toolbox for EM connectomics
Stars: ✭ 46 (-71.25%)
Mutual labels:  jupyter-notebook, segmentation
Realtime multi Person pose estimation
Code repo for realtime multi-person pose estimation in CVPR'17 (Oral)
Stars: ✭ 4,760 (+2875%)
Mutual labels:  jupyter-notebook, realtime
Dstl unet
Dstl Satellite Imagery Feature Detection
Stars: ✭ 117 (-26.87%)
Mutual labels:  jupyter-notebook, segmentation
Parallelwavegan
Unofficial Parallel WaveGAN (+ MelGAN & Multi-band MelGAN) with Pytorch
Stars: ✭ 682 (+326.25%)
Mutual labels:  jupyter-notebook, realtime
Relaynet pytorch
Pytorch Implementation of retinal OCT Layer Segmentation (with trained models)
Stars: ✭ 63 (-60.62%)
Mutual labels:  jupyter-notebook, segmentation
Unet
unet for image segmentation
Stars: ✭ 3,751 (+2244.38%)
Mutual labels:  jupyter-notebook, segmentation
3dunet abdomen cascade
Stars: ✭ 91 (-43.12%)
Mutual labels:  jupyter-notebook, segmentation
Fcn.tensorflow
Tensorflow implementation of Fully Convolutional Networks for Semantic Segmentation (http://fcn.berkeleyvision.org)
Stars: ✭ 1,230 (+668.75%)
Mutual labels:  jupyter-notebook, segmentation
Mobilepose Pytorch
Light-weight Single Person Pose Estimator
Stars: ✭ 427 (+166.88%)
Mutual labels:  jupyter-notebook, realtime
Tfvos
Semi-Supervised Video Object Segmentation (VOS) with Tensorflow. Includes implementation of *MaskRNN: Instance Level Video Object Segmentation (NIPS 2017)* as part of the NIPS Paper Implementation Challenge.
Stars: ✭ 151 (-5.62%)
Mutual labels:  jupyter-notebook, segmentation
Fsgan
FSGAN - Official PyTorch Implementation
Stars: ✭ 420 (+162.5%)
Mutual labels:  jupyter-notebook, segmentation
Severstal Steel Defect Detection
Kaggle Segmentation Challenge
Stars: ✭ 160 (+0%)
Mutual labels:  jupyter-notebook, segmentation
Fbrs interactive segmentation
[CVPR2020] f-BRS: Rethinking Backpropagating Refinement for Interactive Segmentation https://arxiv.org/abs/2001.10331
Stars: ✭ 366 (+128.75%)
Mutual labels:  jupyter-notebook, segmentation
Avgn
A generative network for animal vocalizations. For dimensionality reduction, sequencing, clustering, corpus-building, and generating novel 'stimulus spaces'. All with notebook examples using freely available datasets.
Stars: ✭ 50 (-68.75%)
Mutual labels:  jupyter-notebook, segmentation
Cascaded Fcn
Source code for the MICCAI 2016 Paper "Automatic Liver and Lesion Segmentation in CT Using Cascaded Fully Convolutional NeuralNetworks and 3D Conditional Random Fields"
Stars: ✭ 296 (+85%)
Mutual labels:  jupyter-notebook, segmentation
Tianchi Medical Lungtumordetect
天池医疗AI大赛[第一季]:肺部结节智能诊断 UNet/VGG/Inception/ResNet/DenseNet
Stars: ✭ 314 (+96.25%)
Mutual labels:  jupyter-notebook, segmentation
Mit Deep Learning
Tutorials, assignments, and competitions for MIT Deep Learning related courses.
Stars: ✭ 8,912 (+5470%)
Mutual labels:  jupyter-notebook, segmentation
Keras Yolo2
Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
Stars: ✭ 1,693 (+958.13%)
Mutual labels:  jupyter-notebook, realtime

Hair Segmentation Realtime using Keras

The architecture was inspired by Real-time deep hair matting on mobile devices

Build Status

Prerequisites

python 3.6 tensorflow-gpu==1.13.1, opencv-python==4.1.0.25, Keras==2.2.4, numpy==1.16.4, scikit-image==0.15.0

install environment in conda:

conda env create -f environment.yml

Dataset

Download data CelebAMask-HQ and use preprocess in ./data/pre-process-data-CelebAMask-HQ.ipynb to create dataset

Data structure training

├── my-data
│   ├── train
│   │   ├──image
│   │   │   ├── 1.jpg
│   │   │   ├── 2.jpg
│   │   │   ├── 3.jpg
...
│   │   ├──mask
│   │   │   ├── 1.jpg
│   │   │   ├── 2.jpg
│   │   │   ├── 3.jpg
...
│   ├── val
...
│   ├── test
...

Train model

python train.py [--datadir PATH_FOLDER] [--batch_size BATCH_SIZE] [epochs EPOCHS] [--lr LEARNING_RATE] []

optional arguments:
    --datadir:        path to folder dataset, default ./data
    --batch_size:     batch size training, default 4
    --epochs:         number of eposchs, default 5
    --lr:             learning rate, default 1e-4
    --image_size:     size image input, default (224, 224)
    --use_pretrained: use pretrained, default false
    --path_model:     directory is saved checkpoint, default ./checkpoints
    --device:         device training model, default 0 (GPU:0), 1(GPU:1), -1(CPU)          

Evaluate model

python evaluate.py

Run pretrain model

# Run test.py
python demo.py

You will see the predicted results of test image in test/data

Result

original result

original result

original result

Convert to Tensorflow Lite

  • Convert
# Convert Model to Mobile
python convert_to_tflite.py
  • Show shape model tflite
# Shape input and output shape model tflite 
python shape_input_output_tflite.py

About Keras

Keras is a minimalist, highly modular neural networks library, written in Python and capable of running on top of either TensorFlow or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research.

Use Keras if you need a deep learning library that:

allows for easy and fast prototyping (through total modularity, minimalism, and extensibility). supports both convolutional networks and recurrent networks, as well as combinations of the two. supports arbitrary connectivity schemes (including multi-input and multi-output training). runs seamlessly on CPU and GPU. Read the documentation Keras.io

Keras is compatible with: Python 3.6.

TODO

  • [x] Implement model using Keras
  • [x] Convert model to Tensorflow Lite
  • [ ] Implement model to Android (DOING)

License

Copyright (c) 2019 Thang Tran Van

Licensed under the MIT License. You may not use this file except in compliance with the License

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].