This is a convenient and extensible Python OpenGL framework. You can easily refer to the example shader to realize the custom rendering function
- Dlib is installed for face key point detection. It is recommended to search and install the source code, which is not easy to make mistakes
pip install -r requirements.txt
Install OpenGL related environment
if Unable to load/find OpenGL on MacOS refer to Link
- assets
- Storage path of various LUT pictures, indexes, etc
- shader
- Shader script, if you want to achieve their own rendering, you can refer to any .vs and .fs
- shader_function
- Call the function of shader and incoming data. If you want to realize your own rendering, you can refer to any .py
- get_index.py
- Get face key points and triangulation index according to Dlib,thank @codeniko for providing the key points model including forehead
- run.py
- Main file, main functions: deformation + blur + filter
python get_index.py
Get face key points and triangulation index according to Dlibpython run.py
make assets/src.png Deformation + blur + filter to res.png