All Projects → ainrichman → Peppa-Facial-Landmark-PyTorch

ainrichman / Peppa-Facial-Landmark-PyTorch

Licence: Apache-2.0 license
Facial Landmark Detection based on PyTorch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Peppa-Facial-Landmark-PyTorch

Deca
DECA: Detailed Expression Capture and Animation
Stars: ✭ 292 (+69.77%)
Mutual labels:  face, alignment
Facenet-Caffe
facenet recognition and retrieve by using hnswlib and flask, convert tensorflow model to caffe
Stars: ✭ 30 (-82.56%)
Mutual labels:  face, alignment
Mobilenet Yolo
MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB🔥🔥🔥
Stars: ✭ 1,566 (+810.47%)
Mutual labels:  landmark, mnn
Mtcnn
MTCNN face detection implementation for TensorFlow, as a PIP package.
Stars: ✭ 1,689 (+881.98%)
Mutual labels:  face, landmark
Facealignmentcompare
Empirical Study of Recent Face Alignment Methods
Stars: ✭ 15 (-91.28%)
Mutual labels:  face, alignment
Php Opencv Examples
Tutorial for computer vision and machine learning in PHP 7/8 by opencv (installation + examples + documentation)
Stars: ✭ 333 (+93.6%)
Mutual labels:  face, onnx
3ddfa v2
The official PyTorch implementation of Towards Fast, Accurate and Stable 3D Dense Face Alignment, ECCV 2020.
Stars: ✭ 1,961 (+1040.12%)
Mutual labels:  alignment, onnx
Prnet
Joint 3D Face Reconstruction and Dense Alignment with Position Map Regression Network (ECCV 2018)
Stars: ✭ 4,479 (+2504.07%)
Mutual labels:  face, alignment
Mtcnn
face detection and alignment with mtcnn
Stars: ✭ 66 (-61.63%)
Mutual labels:  face, alignment
Php Opencv
php wrapper for opencv
Stars: ✭ 194 (+12.79%)
Mutual labels:  face, onnx
emnist dl2prod
JuPyter Notebooks and Python Package for Deep Learning Model Exploration, Translation and Deployment
Stars: ✭ 31 (-81.98%)
Mutual labels:  onnx
FaceNet-IOT
IOT implementation for FaceNet project by David Sandberg https://github.com/davidsandberg/facenet
Stars: ✭ 18 (-89.53%)
Mutual labels:  face
arcface retinaface mxnet2onnx
arcface and retinaface model convert mxnet to onnx.
Stars: ✭ 53 (-69.19%)
Mutual labels:  onnx
deepvac
PyTorch Project Specification.
Stars: ✭ 507 (+194.77%)
Mutual labels:  onnx
tracy
Basecalling, alignment, assembly and deconvolution of Sanger Chromatogram trace files
Stars: ✭ 73 (-57.56%)
Mutual labels:  alignment
optimizer
Actively maintained ONNX Optimizer
Stars: ✭ 383 (+122.67%)
Mutual labels:  onnx
FaceIDLight
A lightweight face-recognition toolbox and pipeline based on tensorflow-lite
Stars: ✭ 17 (-90.12%)
Mutual labels:  face
epic-awesome-gamer
🍷 Gracefully claim weekly free games and monthly content from Epic Store.
Stars: ✭ 600 (+248.84%)
Mutual labels:  onnx
face rating
Face/Beauty Rating with both the traditional ML approaches and Convolutional Neural Network Approach
Stars: ✭ 68 (-60.47%)
Mutual labels:  landmark
stylegan2-landmark-projection
Experimental repository attempting to project facial landmarks into the StyleGAN2 latent space.
Stars: ✭ 14 (-91.86%)
Mutual labels:  landmarks

26M Flops Facial Landmark Detection

This is a PyTorch Implementation of https://github.com/610265158/face_landmark which is built with Tensorflow. Thanks very much for his pioneer contribution and impressing results. Also respect towards PFLD https://arxiv.org/pdf/1902.10859.pdf.

Here is a Demo with 23M file size :D. 女神迪丽热巴。

Other Chinese famous actors:

这个库是610265158的face_landmark库的PyTorch实现,用户名是他的QQ号,赶紧去面基。

Introduction

The training and inference strategies are just copy of 610265158. WingLoss, Multi-layer feature concatenation, Headpose/Face classification assisted training are all used. The differences with 610265158 are:

  1. I trained the model with the Slim network. The computation cost with 160 input is 26.5M Flops.
  2. I trained the model with 300W-LP dataset.
  3. I added LK optical flow smoothing at inference stage.
  4. Original PyTorch, ONNX, MNN python inference code are included.

训练和推理处理基本是抄上面那个人的。该用的策略都用了。不同点主要是用更轻量的Slim网络和用300W-LP训练模型。Slim网络的结构特别适合通过MNN在移动端上使用。光流跟踪主要是提升视觉稳定性。另外,工程提供了一个简易的人脸检测器来Demo效果,直接把 https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB 这个库里的模型包装了一下就拿来用了。你们可以换成自己的。

Environment

  1. The code is tested on Windows 10. Linux should also be OK. Inference code should work on Mac OS, but Training... 兄弟别想不开。
  2. PyTorch 1.2.0.
  3. OpenCV 4.1.2.30.
  4. Python3

其它版本应该都问题不大,如果有问题,自行翻墙解决。

Train

Modify data_dir variable in make_json.py, and run it. It will generate train.json and val.json. The data_dir should be organized as:

├── 300VW
│   ├── 001_annot
│   ├── 002_annot
│       ....
├── 300W
│   ├── 01_Indoor
│   └── 02_Outdoor
├── AFW
│   └── afw
├── HELEN
│   ├── testset
│   └── trainset
├── IBUG
│   └── ibug
├── LFPW
│   ├── testset
│   └── trainset

Yes, the code above is also copied from 610265158.

Then run python train.py.

In my experience, the training is extremely slow, especially with the exploding balanced training sets. You can run recon_dataset.py before run python train.py to accelerate the training by reduce the size of the images.

这个recon_dataset.py的原理就是把图片裁一下,这样训练的时候读数据的时候能快一些。

I trained with about 4 hours per epoch on my RTX2060. Sad...

Demo

Run demo.py. Change the code as you need.

Others

谁如果训练出了效果更好的模型请分享一下,还有其它问题的话我们Issue见。

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