GengCauWong / OPENGL-FRAMEWORK-PYTHON

This is a convenient and extensible Python OpenGL framework. You can easily refer to the example shader to realize the custom rendering function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OPENGL-FRAMEWORK-PYTHON

English version
中文版本

Introduce

This is a convenient and extensible Python OpenGL framework. You can easily refer to the example shader to realize the custom rendering function

Environmental preparation

  • 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.txtInstall OpenGL related environment
    if Unable to load/find OpenGL on MacOS refer to Link

File Structure

  • 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.pyGet face key points and triangulation index according to Dlib
  • python run.pymake assets/src.png Deformation + blur + filter to res.png

About

This is a convenient and extensible Python OpenGL framework. You can easily refer to the example shader to realize the custom rendering function


Languages

Language:Python 78.5%Language:GLSL 21.5%