https://github.com/cansik/auto-keypoint-retopology
Auto keypoint extractor for retopology.
https://github.com/cansik/auto-keypoint-retopology
Last synced: about 1 month ago
JSON representation
Auto keypoint extractor for retopology.
- Host: GitHub
- URL: https://github.com/cansik/auto-keypoint-retopology
- Owner: cansik
- Created: 2019-12-09T12:42:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T11:16:21.000Z (over 5 years ago)
- Last Synced: 2025-03-31T02:13:16.634Z (3 months ago)
- Language: Python
- Homepage:
- Size: 15 MB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Auto Keypoint Extractor for Retopology
The idea of this tool is to extract the facial keypoints of a texture, mark the vertices and export the information for retopology tools like [R3DS Wrap](https://www.russian3dscanner.com/).### General Concept
This is the general concept of the script. The actual implementation is more complex and for example includes multiple render steps.1. Render camera image
3. Detect facial landmark keypoints
4. Project all vertices to camera space
5. Find vertices that match detected keypoints (KDTree)
5. Read uv coordinates of selected vertices
6. Export index and uv coordinates as JSON
### Installation
#### Windows
Install [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15) and make sure `cmake.exe` is in the path variable.```bash
python3 -m ensurepip
python3 -m pip install --upgrade pip --user
python3 -m pip install cmake
python3 -m pip install opencv-python opencv-contrib-python imutils numpy scipy dlib --user
```### MacOS
```bash
./python3.7m -m ensurepip
./python3.7m -m pip install --upgrade pip --user
./python3.7m -m pip install opencv-python opencv-contrib-python imutils numpy scipy dlib --user# dlib from source if needed
python3.7m setup.py install
```#### Landmark Model
You can download it here
[http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2](http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2) or [here](https://github.com/AKSHAYUBHAT/TensorFace/blob/master/openface/models/dlib/shape_predictor_68_face_landmarks.dat).### Development
To have autocompletion in various IDE's for blender, install the following package:
```bash
pip3 install fake-bpy-module-2.80
```