This Python project extracts 3D landmarks based on 2D screenshots of a 3D face, including Lateral Left, Lateral Right, and Front View. It has undergone testing with the ESRC dataset curated by Peter Hancock at Stirling and Bernie Tiddeman at Aberystwyth. You can find his work here.
Before utilizing this project, ensure that the facial object is aligned with the Frankfort Horizontal Plane. Detailed instructions on this alignment process can be found here. Note that all ESRC 3D Faces are already aligned with the Frankfort Horizontal Plane.
Begin by cloning the project with the following command:
git clone https://github.com/gigacycle/Extract3DFaceLandmarks.git
Next, install the required dependencies using the following command:
pip install face-alignment, torchvision, vedo
After successfully cloning the project and installing the dependencies, Run main.py
and follow the instructions.
- Starts extracting 3D landmarks for ESRC dataset (stores at ./dataset/)
- Starts extracting your own 3D face object (it needs full path of your .obj) and displays the landmarks at the end.
- Displays the landmarks extracted in phase
1
(you should type the item name like the picture above)
This project leverages the face-alignment and vedo libraries.
- Face-alignment: Link to the project
- Vedo: Link to the website
Please ensure proper citation of these projects in your work.
Contributions to this project are welcomed via the submission of issues or pull requests.
For inquiries or assistance, kindly contact me.