• Stars
    star
    110
  • Rank 314,877 (Top 7 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate face mesh dataset using Google's FaceMesh model.

face-mesh-generator

Generate face mesh dataset using Google's FaceMesh model from annotated face datasets.

Watch this 30s video demo:

video demo.

Features

There are built in features to help generating the dataset more efficiently.

  • Automatically centralize the marked face.
  • Rotate the image to align the face horizontally.
  • Crop the face with custom scale range.
  • Generate mark heatmaps.
  • Write TensorFlow Record files, or export the processed image and marks.
  • Support multiple public datasets. Check the full list here

pipeline

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

TensorFlow OpenCV Numpy

Installing

First clone this repo.

# From your favorite development directory
git clone https://github.com/yinguobing/face-mesh-generator.git

Then download Google's FaceMesh tflite model and put it in the assets directory.

Model link: https://github.com/google/mediapipe/blob/master/mediapipe/modules/face_landmark/face_landmark.tflite

How to run

Take WFLW as an example. Download the dataset files from the official website. Extract all files to one directory.

First, Construct the dataset.

ds_wflw = fmd.wflw.WFLW("wflw")
ds_wflw.populate_dataset(wflw_dir)

wflw_dir is the directory for the extracted files.

Then, process the dataset.

process(ds_wflw)

There is a demo file generate_mesh_dataset.py demonstrating how to generate face mesh data and save them in a TFRecord file. Please refer to it for more details.

Authors

Yin Guobing (尹国冰) - yinguobing

wechat

License

GitHub

Acknowledgments

All the authors who made their datasets and model public.

More Repositories

1

head-pose-estimation

Realtime human head pose estimation with ONNXRuntime and OpenCV.
Python
1,025
star
2

cnn-facial-landmark

Training code for facial landmark detection based on deep convolutional neural network.
Python
609
star
3

facial-landmark-detection-hrnet

A TensorFlow implementation of HRNet for facial landmark detection.
Python
137
star
4

facial-landmark-dataset

A collection of facial landmark datasets and Python code to make use of them.
Python
75
star
5

image_utility

Handy python scripts for image dataset processing.
Python
73
star
6

face-marks

Detect facial landmarks with TensorFlow and CoreML on iPhone.
Swift
73
star
7

arcface

A TensorFlow implementation of face recognition model ArcFace.
Python
44
star
8

tfrecord_utility

Generate and view TensorFlow's TFRecord file.
Python
29
star
9

YSUthesis

Master thesis template for Yanshan University
TeX
14
star
10

License-Plate-Generator

Generate random motor vehicle license plate images. 随机车牌生成器。
Python
13
star
11

blaze-face

A TensorFlow implementation of Google's BlazeFace
Python
11
star
12

models

A playground for friendly deep neural network models.
Python
10
star
13

butterfly

A lightweight python module to load TensorFlow frozen model (a single pb file).
Python
7
star
14

linglong

A human friendly implementation of TensorFlow face detection.
Python
7
star
15

yolov5-trt

YOLO v5 inference with TensorRT (C++)
C++
5
star
16

Playground

深度学习新手小广场(机器视觉主题)
Jupyter Notebook
4
star
17

open_images

Extract bounding boxes from Open Images dataset.
Jupyter Notebook
2
star
18

count-files

A simple command line tool to count all files in a directory.
Rust
1
star
19

pyACL_standalone_samples

Standalone samples for Python ACL (Ascend Computing Language) development.
Python
1
star
20

yinguobing

Hi, there!
1
star
21

make-it-glitch

Minimal C++ code for generating glitchy video with FFMPEG.
C++
1
star
22

efficientdet-runner

执行EfficientDet模型推演的最小代码模块
Python
1
star