GithubHelp home page GithubHelp logo

informaticacba / face-mesh-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yinguobing/face-mesh-generator

1.0 0.0 0.0 229 KB

Generate face mesh dataset using Google's FaceMesh model.

License: GNU General Public License v3.0

Python 100.00%

face-mesh-generator's Introduction

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.

face-mesh-generator's People

Contributors

yinguobing avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.