This is a Face Motion Blender animation addon.
The main idea of keypoints usage is from blender-addon-openpose repository. Code from this this repository you can see in the openpose folder.
This addon can be installed in two ways:
- Zip the moface folder. And install the zipfile like any other Blender addon.
- Copy moface folder or make a symlink to the addon directory (for example
~/blender-2.83.4-linux64/2.83/scripts/addons/
or/Applications/Blender.app/Contents/Resources/2.81/scripts/addons/
).
An example of keypooints .tsv file you can see in the assets folder.
For example:
ffmpeg -i ../data/moface/video.mp4 ../data/moface/frames/frame%05d.png
Example of keypoints extracting you can see in the run_openpose.py script. For more information about keypoints you can see in the OpenPose Project documentation.
python3 run_openpose.py
See the preprocess_keypoints.py script.
python3 preprocess_keypoints.py
If you have a Blender scene file, you can rendrer animation from the comand line. There is an example of render script: render.py. And you can run it in the command line:
~/blender-2.83.4-linux64/blender ./assets/rigged_face.blend --background --python render.py -- --save_path ./debug/ --keypoints_filepath ./assets/op_keypoints.tsv --render_engine eevee --render