face recognition to drive blender model to emotion and pose
This is a blender addon for driving the face model of smplx.It has two parts: face recognition(use FLAME) and face model driving(blender smplx addon).
The blender addon part base on blender-smplx-addon download and face recognition part base on DECA
run blender addon frist, then local face recognition part
- download the addon from here, or download from release page
Clone the repo:
git clone https://github.com/YadiraF/DECA
-
face-alignment (Optional for detecting face, i use yolov8 pretrained)
You can runpip install -r requirements.txt
-
Prepare data
download encoded pretrained model from here, put the file
flame_encode_params.pkl
under thedata
.yolov8 face pretrained model from here, put the file
yolov8n_100e.pt
under thedata
. -
run the face recognition part cd to the DECA folder
python demo_video.py -i 0
-
in blender make sure addon was loaded , and select
View
->Sidebar
, in Sidebar selectWebcam
-
in blender choose the smplx model to add
-
push the webcam
start
botton -
run the face recognition part cd to the smpl_face_blender
python demo_video.py -i 0
-
more video can watch SMPL-X Blender Add-On -- Tutorial
-
my addon video
- tracking on target face (multi-face situation tracking)
- more blender addon user interaction
- extend smplx model expression
- drive custom model
- merge two part(blender addon and face recognition) version,in blender install pytorch ?
For functions or scripts that are based on external sources, we acknowledge the origin individually in each file.
Here are some great resources we benefit:
- FLAME_PyTorch and TF_FLAME for the FLAME model
- blender
- smplx for blender model
- ultralytics for face dectection and recognition
- face_landmarks for face landmarks