Danial-Kord / DigiHuman

Automatic 3D Character animation using Pose Estimation and Landmark Generation techniques
GNU General Public License v3.0
444 stars 72 forks source link
3d-landmarks animation blazeface blazepose blendshapes character-animation deep-neural-networks digital-human facemesh facial-animation facial-expression-recognition gan mediapipe mediapipe-hands metahumans pose-estimation rendering-3d-graphics unity3d

DigiHuman

Digihuman is a project which aims to automatically generate whole body pose animation + facial animation on 3D Character models based on the camera input.
This project is my B.Sc thesis of Computer Engineering at Amirkabir University of Technology(AUT).

About DigiHuman

DigiHuman is a system for bringing automation in animation generation on 3D virtual characters. It uses Pose estimation and facial landmark generator models to create entire body and face animation on 3D virtual characters.
DigiHuman is developed with MediaPipe and Unity3D. MediaPipe generates 3D landmarks for the human whole body and face, and Unity3D is used to render the final animation after processing the generated landmarks from MediaPipe. The diagram below, shows the whole architucture of the application.

Logo

Sample Outputs of the project

Project demo | Tutorial

Hands animations

Logo Logo

Full body animation

Logo Logo

Face animation

Logo Logo Logo Logo

Installation

Follow the instructions to run the program!

Backend server installtion

  1. Install MediaPipe python.
    pip install mediapipe
  2. Install OpenCV python.
    pip install opencv-python
  3. Go to backend directory and install other requirements:
    pip install -r requirements.txt
  4. You'll need to download the pre-trained generator model for the COCO dataset and place it into backend/checkpoints/coco_pretrained/.

Unity3D Installation

Install Unity3D and its requirements by the following guidelines(Skip 1-3 if Unity3D is already installed).

  1. Download and install UnityHub
  2. Add a new license in UnityHub and register it
  3. Install a Unity Editor inside UnityHub(LTS versions and a version higher than 2020.3.25f1 are recommended).
  4. In the Unity project setting, allow HTTP connections in the player setting.

    Logo

  1. Download and import the following packages into your project to enable the recording option available with FFmpeg(Download .unitypackage files and drag them to your project).

[FFmpegOutBinaries package]: https://github.com/keijiro/FFmpegOutBinaries/releases

Usage

Adding new 3D characters

You can add your characters to the project! Characters should have a standard Humanoid rig to show kinematic animations. For rendering face animations, characters should have a facial rig(Blendmesh).
Follow these steps to add your character:

  1. Find a 3D character model from Unity asset store or download a free one(You can download them from websites like Mixamo).
  2. Open the character setting and set the rig to humanoid
Logo
  1. Drag and drop your 3D character model to CharacterChooser/CharacterSlideshow/Parent object in Unity main Scene like the image below
Logo
  1. Add BlendShapeController and QualityData components to the character object in the scene(which is dragged inside the Parent object in the last step).
  2. Set BlendShapeController values
    • Add character SkinnedMeshRenderer component to BlendShapeController component.
Logo
Logo
  1. Open CharacterSlideshow Object on CharacterChooser/CharacterSlideshow path inside the scene hierarchy, then add a new dragged character to the nodes property(all characters should be referenced inside nodes).
Logo
  1. Run the application and you can now select your character for rendering animation!

Features

Resources

Licenses & Citations

DigiHuman Licence

Application License: GPL-3.0 license Non-commercial use only. If you distribute or communicate copies of the modified or unmodified Program, or any portion thereof, you must provide appropriate credit to Danial Kordmodanlou as the original author of the Program. This attribution should be included in any location where the Program is used or displayed.

FFmpeg

GauGan

Contact

Danial Kordmodanlou - kordmodanloo@gmail.com

Website : danial-kord.github.io

Project Link: github.com/Danial-Kord/DigiHuman

Telegram ID: @Danial_km