All Projects → YuvalNirkin → Face_segmentation

YuvalNirkin / Face_segmentation

Licence: apache-2.0
Deep face segmentation in extremely hard conditions

Projects that are alternatives of or similar to Face segmentation

Face swap
End-to-end, automatic face swapping pipeline
Stars: ✭ 722 (+41.57%)
Mutual labels:  segmentation, face
face video segment
Face Video Segmentation - Face segmentation ground truth from videos
Stars: ✭ 84 (-83.53%)
Mutual labels:  face, segmentation
Fsgan
FSGAN - Official PyTorch Implementation
Stars: ✭ 420 (-17.65%)
Mutual labels:  segmentation, face
Pytorch Goodies
PyTorch Boilerplate For Research
Stars: ✭ 427 (-16.27%)
Mutual labels:  segmentation
Openpose
OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
Stars: ✭ 22,892 (+4388.63%)
Mutual labels:  face
Face Pose Net
Estimate 3D face pose (6DoF) or 11 parameters of 3x4 projection matrix by a Convolutional Neural Network
Stars: ✭ 464 (-9.02%)
Mutual labels:  face
Ringnet
Learning to Regress 3D Face Shape and Expression from an Image without 3D Supervision
Stars: ✭ 504 (-1.18%)
Mutual labels:  face
Trackit
[ECCV'20] Ocean: Object-aware Anchor-Free Tracking
Stars: ✭ 424 (-16.86%)
Mutual labels:  segmentation
Deta parser
快速中文分词分析word segmentation
Stars: ✭ 476 (-6.67%)
Mutual labels:  segmentation
Brfv4 javascript examples
BRFv4 - HTML5/Javascript - examples project. Reference implementation for all other platform example packages.
Stars: ✭ 460 (-9.8%)
Mutual labels:  face
Simpleitk
SimpleITK: a layer built on top of the Insight Toolkit (ITK), intended to simplify and facilitate ITK's use in rapid prototyping, education and interpreted languages.
Stars: ✭ 458 (-10.2%)
Mutual labels:  segmentation
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (-11.37%)
Mutual labels:  segmentation
Vrn
👨 Code for "Large Pose 3D Face Reconstruction from a Single Image via Direct Volumetric CNN Regression"
Stars: ✭ 4,391 (+760.98%)
Mutual labels:  face
Face Track Detect Extract
💎 Detect , track and extract the optimal face in multi-target faces (exclude side face and select the optimal face).
Stars: ✭ 434 (-14.9%)
Mutual labels:  face
Facecropper
✂️ Crop faces, inside of your image, with iOS 11 Vision api.
Stars: ✭ 479 (-6.08%)
Mutual labels:  face
Arcfacedemo
ArcSoft Free SDK demo,support ArcFace2.1, ArcFace2.0, ArcFace1.2
Stars: ✭ 424 (-16.86%)
Mutual labels:  face
Fsa Net
[CVPR19] FSA-Net: Learning Fine-Grained Structure Aggregation for Head Pose Estimation from a Single Image
Stars: ✭ 469 (-8.04%)
Mutual labels:  face
Prnet
Joint 3D Face Reconstruction and Dense Alignment with Position Map Regression Network (ECCV 2018)
Stars: ✭ 4,479 (+778.24%)
Mutual labels:  face
Jetson Inference
Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
Stars: ✭ 5,191 (+917.84%)
Mutual labels:  segmentation
Alfred
alfred-py: A deep learning utility library for **human**, more detail about the usage of lib to: https://zhuanlan.zhihu.com/p/341446046
Stars: ✭ 460 (-9.8%)
Mutual labels:  segmentation

Deep face segmentation in extremely hard conditions

alt text
COFW sample images segmented using our method.

Yuval Nirkin, Iacopo Masi, Anh Tuan Tran, Tal Hassner, and Gerard Medioni.

News (10/07/18)

  • New FCN model released for lower resolution images (300X300), trained without augmentations. Useful if you have limited GPU memory.
  • A better performing and more efficient U-Net model will be released soon, including training and inference scripts using PyTorch.

Overview

This project provides an interface for face segmentation using Caffe with a fully convolutional neural network. The network was trained on IARPA Janus CS2 dataset (excluding subjects that are also in LFW) using a novel process for collecting ground truth face segmentations, involving our tool for semi-supervised Face video segmentation. Additional synthetic images were generated by augmenting hands from the EgoHands dataset, and augmenting 3D models of glasses and microphones.

If you find this code useful, please make sure to cite our paper in your work:

Yuval Nirkin, Iacopo Masi, Anh Tuan Tran, Tal Hassner, Gerard Medioni, "On Face Segmentation, Face Swapping, and Face Perception", IEEE Conference on Automatic Face and Gesture Recognition (FG), Xi'an, China on May 2018

Please see project page for more details, more resources and updates on this project.

Dependencies

Library Minimum Version Notes
Boost 1.47 Optional - For command line tools
OpenCV 3.0
Caffe 1.0 ☕️

Installation

  • Use CMake and your favorite compiler to build and install the library.
  • Download the face_seg_fcn8s.zip or face_seg_fcn8s_300_no_aug.zip and extract to "data" in the installation directory.
  • Add "bin" in the installation directory to path.

Usage

  • For using the library's C++ interface, please take a look at the Doxygen generated documentation.
  • For python go to "interfaces/python" in the installation directory and run:
python face_seg.py
  • For running the segmentation on a single image:
cd path/to/face_segmentation/bin
face_seg_image ../data/images/Alison_Lohman_0001.jpg -o . -m ../data/face_seg_fcn8s.caffemodel -d ../data/face_seg_fcn8s_deploy.prototxt
  • For running the segmentation on all the images in a directory:
cd path/to/face_segmentation/bin
face_seg_batch ../data/images -o . -m ../data/face_seg_fcn8s.caffemodel -d ../data/face_seg_fcn8s_deploy.prototxt
  • For running the segmentation on a list of images, first prepare a file "img_list.txt", in which each line is a path to an image and call the following command:
cd path/to/face_segmentation/bin
face_seg_batch img_list.txt -o . -m ../data/face_seg_fcn8s.caffemodel -d ../data/face_seg_fcn8s_deploy.prototxt

Note: The segmentation model was trained by cropping the training images using find_face_landmarks. For best results crop the input images the same way, with crop resolution below 350 X 350. A Matlab function is available here.

Important note

In our paper we used a different network for our face segmentation. In the process of converting it to the Caffe model used in our end-to-end face swap distribution we notices some performance drop. We are working to fix this. We therefore ask that you please check here soon for updated on this Caffe model.

Citation

Please cite our paper with the following bibtex if you use our face segmentation network:

@inproceedings{nirkin2018_faceswap,
      title={On Face Segmentation, Face Swapping, and Face Perception},
      booktitle = {IEEE Conference on Automatic Face and Gesture Recognition},
      author={Nirkin, Yuval and Masi, Iacopo and Tran, Anh Tuan and Hassner, Tal and Medioni, and G\'{e}rard Medioni},
      year={2018},
    }

Related projects

Copyright

Copyright 2017, Yuval Nirkin, Iacopo Masi, Anh Tuan Tran, Tal Hassner, and Gerard Medioni

The SOFTWARE provided in this page is provided "as is", without any guarantee made as to its suitability or fitness for any particular use. It may contain bugs, so use of this tool is at your own risk. We take no responsibility for any damage of any sort that may unintentionally be caused through its use.

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