GithubHelp home page GithubHelp logo

face_data_augmentation's Introduction

Face Data Augmentation

This repository provides a face data augmentation technique by 3D geometric transformation.

Geometric transformation performed by using FLAME model. FLAME is a lightweight and expressive generic head model learned from over 33,000 of accurately aligned 3D scans. FLAME combines a linear identity shape space (trained from head scans of 3800 subjects) with an articulated neck, jaw, and eyeballs, pose-dependent corrective blendshapes, and additional global expression blendshapes.

Requirements

  1. The FLAME model can be downloaded from the FLAME project website. You need to sign up and agree to the license for access. Copy 'generic_model.pkl' to ./data folder.
  2. Python3
  3. PyTorch
  4. OpenCV
  5. dlib
  6. pyrender
  7. trimesh

Installation

git clone https://github.com/ainur699/face_data_augmentation.git
cd face_data_augmentation

pip install -r requirements.txt

Demo

Generate geometric augmentations of face images from folder. You can add paths to facial landmarks or masks to apply the same transformations on them. Run the following command from the terminal.

python main.py --source_dir ./images --mask_dir ./images/masks --landmarks_dir ./images/landmarks --dst_dir ./results --aug_num 10

Notes

I use the FLAME.py from FLAME_PyTorch.

face_data_augmentation's People

Contributors

ainur699 avatar

Stargazers

Lê Ngọc Đức avatar Wenjun Huang avatar  avatar  avatar

Watchers

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