Git Product home page Git Product logo

lightningft's Introduction

LightningFT

Tracking faces as fast as lightning!

Preparation

1. Prepare for EMOCA v2

mkdir -p assets/EMOCA
wget https://download.is.tue.mpg.de/emoca/assets/EMOCA/models/EMOCA_v2_lr_mse_20.zip -O assets/EMOCA_v2_lr_mse_20.zip
unzip assets/EMOCA_v2_lr_mse_20.zip -d assets/EMOCA
rm assets/EMOCA_v2_lr_mse_20.zip

2. Prepare for FLAME

wget --post-data "username=[username]&password=[password]" https://download.is.tue.mpg.de/download.php\?domain\=flame\&sfile\=FLAME2020.zip\&resume\=1 -O 'assets/FLAME2020.zip' --no-check-certificate
wget --post-data "username=[username]&password=[password]" https://download.is.tue.mpg.de/download.php\?domain\=flame\&resume\=1\&sfile\=TextureSpace.zip -O 'assets/TextureSpace.zip' --no-check-certificate
mkdir -p assets/FLAME
unzip assets/FLAME2020.zip -d assets/FLAME
rm assets/FLAME2020.zip
mv assets/FLAME/Readme.pdf assets/FLAME/Readme_FLAME.pdf
unzip assets/TextureSpace.zip -d assets/FLAME
rm assets/TextureSpace.zip
mv assets/FLAME/Readme.pdf assets/FLAME/Readme_Texture.pdf
unzip assets/FLAME_embedding.zip -d assets/FLAME

Requirement

  • python >= 3.8
  • pytorch == 2.0
  • pytorch3d == 0.7.3 (Following PyTorch3D)
  • mediapipe
  • face_alignment
  • ffmpeg >= 5.1 (conda install -c conda-forge ffmpeg or Static Build)
  • pip install tqdm rich lmdb colored pykalman av pytorch-lightning chumpy

Usage

Our tracker firstly tracks the expression and pose of the target head based on EMOCA v2, then optimize the camera pose based on landmarks (face_alignment and mediapipe).

Please refer to the following command to run the tracker.

python track_lightning.py -d 7 --data ./assets/demo.mp4 -v --synthesis

Tips

  • The camera is calibrated based on 32 randomly sampled frames.
  • The running speed is greatly affected by the iteration number of landmark optimization.
  • Tracking performance is greatly affected by face_alignment and landmarks detected by mediapipe.

lightningft's People

Contributors

xg-chu avatar

Stargazers

Yu Li avatar Victory_K avatar  avatar Yunfei Liu avatar

Watchers

Yu Li avatar Yunfei Liu avatar  avatar

Forkers

jackzhousz

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.