{"id":23275488,"url":"https://github.com/dor-sketch/pyface3d","last_synced_at":"2026-02-24T00:02:25.284Z","repository":{"id":268778030,"uuid":"905272989","full_name":"Dor-sketch/PyFace3D","owner":"Dor-sketch","description":"Real-time 3D face modeling application that generates textured mesh models from webcam input.","archived":false,"fork":false,"pushed_at":"2024-12-23T08:50:50.000Z","size":48815,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T17:17:08.956Z","etag":null,"topics":["3d-models","computer-vision","delaunay-triangulation","face-detection","facial-recognition","mediapipe","mesh-generation","opengl","pygame","python","real-time","scipy"],"latest_commit_sha":null,"homepage":"https://dorpascal.com/PyFace3D/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dor-sketch.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-18T13:52:15.000Z","updated_at":"2024-12-23T08:50:53.000Z","dependencies_parsed_at":"2024-12-19T15:27:46.992Z","dependency_job_id":null,"html_url":"https://github.com/Dor-sketch/PyFace3D","commit_stats":null,"previous_names":["dor-sketch/pymesh","dor-sketch/pyface3d"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dor-sketch%2FPyFace3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dor-sketch%2FPyFace3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dor-sketch%2FPyFace3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dor-sketch%2FPyFace3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dor-sketch","download_url":"https://codeload.github.com/Dor-sketch/PyFace3D/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247477189,"owners_count":20945206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-models","computer-vision","delaunay-triangulation","face-detection","facial-recognition","mediapipe","mesh-generation","opengl","pygame","python","real-time","scipy"],"created_at":"2024-12-19T21:14:23.726Z","updated_at":"2026-02-24T00:02:25.216Z","avatar_url":"https://github.com/Dor-sketch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# PyFace3D - Face Model Generator\n\n[![Python Version](https://img.shields.io/badge/python-3.7%2B-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Dor-sketch/PyFace3D/graphs/commit-activity)\n[![GitHub issues](https://img.shields.io/github/issues/Dor-sketch/PyFace3D.svg)](https://GitHub.com/Dor-sketch/PyFace3D/issues/)\n[![Documentation Status](https://img.shields.io/badge/docs-passing-brightgreen.svg)](https://Dor-sketch.github.io/PyFace3D/)\n\n\u003cimg src=\"docs/og-image.svg\" alt=\"PyFace3D Banner\" width=\"800\"/\u003e\n\nReal-time 3D face modeling application that captures facial landmarks using your webcam and generates a textured 3D mesh model. Features split-screen interface showing both live camera feed and interactive 3D model.\n\n[Demo](https://dorpascal.com/PyFace3D/) •\n[Installation](#installation) •\n[Documentation](#technical-details) •\n[Contributing](#contributing)\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n- 🎥 Real-time face landmark detection using MediaPipe\n- 🔮 Live 3D mesh generation with Delaunay triangulation\n- 🖼️ Interactive 3D model viewer with texture mapping\n- 📺 Split-screen display showing camera feed and 3D model\n- 🖱️ Model rotation using mouse controls\n- 💾 Export functionality for 3D models (OBJ format with textures)\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.7+\n- OpenGL-compatible graphics card\n- Webcam\n- 4GB+ RAM\n\n### Installation\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/Dor-sketch/PyFace3D.git\n    cd PyFace3D\n    ```\n\n2. Create and activate a virtual environment (optional but recommended):\n\n    ```bash\n    # Windows\n    python -m venv venv\n    .\\venv\\Scripts\\activate\n\n    # macOS/Linux\n    python3 -m venv venv\n    source venv/bin/activate\n    ```\n\n3. Install dependencies:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n### Dependencies\n\n[![OpenCV](https://img.shields.io/badge/OpenCV-4.8.0%2B-red.svg)](https://opencv.org/)\n[![NumPy](https://img.shields.io/badge/NumPy-1.24.0%2B-blue.svg)](https://numpy.org/)\n[![MediaPipe](https://img.shields.io/badge/MediaPipe-0.10.0%2B-green.svg)](https://mediapipe.dev/)\n[![PyGame](https://img.shields.io/badge/PyGame-2.5.0%2B-yellow.svg)](https://www.pygame.org/)\n[![PyOpenGL](https://img.shields.io/badge/PyOpenGL-3.1.7%2B-orange.svg)](http://pyopengl.sourceforge.net/)\n[![SciPy](https://img.shields.io/badge/SciPy-1.11.0%2B-purple.svg)](https://scipy.org/)\n\n## 🎮 Usage\n\n1. Activate virtual environment (if used):\n\n    ```bash\n    # Windows\n    .\\venv\\Scripts\\activate\n\n    # macOS/Linux\n    source venv/bin/activate\n    ```\n\n2. Run application:\n\n    ```bash\n    python3 main.py\n    ```\n\n### Controls\n\n| Key/Action | Description |\n|------------|-------------|\n| Left Mouse + Drag | Rotate 3D model |\n| S | Save model as OBJ |\n| R | Reset rotation |\n| Close Window | Exit application |\n\n## 🏗️ Architecture\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand architecture details\u003c/summary\u003e\n\n### 1. Face Detection and Landmark Tracking\n\n- MediaPipe Face Mesh (468 landmarks)\n- Real-time confidence scoring\n- Smooth landmark transitions\n\n### 2. 3D Mesh Generation\n\n- 3D coordinate mapping\n- Delaunay triangulation\n- Normal vector calculation\n- Texture coordinate mapping\n\n### 3. Rendering Pipeline\n\n- OpenGL-based rendering\n- Split viewport management\n- Dynamic texture updating\n- Lighting system\n\n### 4. Performance Optimization\n\n- Configurable frame buffering\n- Resolution scaling\n- Memory management\n- Vertex optimization\n\n\u003c/details\u003e\n\n## 💾 Output Files\n\nModels are saved with timestamp-based naming:\n\n```plaintext\nface_model_[timestamp].obj    # Geometry\nface_model_[timestamp].mtl    # Materials\nface_texture_[timestamp].png  # Texture\n```\n\n## 🔧 Troubleshooting\n\nThis project has been tested on a MacBook Air M2 using Python 3.11.\n\n\u003cdetails\u003e\n\u003csummary\u003eCommon Issues\u003c/summary\u003e\n\n### Camera Detection\n\n- ✓ Check webcam connection\n- ✓ Verify system permissions\n- ✓ Try alternate camera index\n\n### Performance\n\n- ✓ Adjust process_resolution\n- ✓ Modify max_buffer_size\n- ✓ Ensure proper lighting\n\n### OpenGL\n\n- ✓ Update graphics drivers\n- ✓ Verify PyOpenGL installation\n- ✓ Check version compatibility\n\n\u003c/details\u003e\n\n## 🤝 Contributing\n\n[![Contributors](https://img.shields.io/github/contributors/Dor-sketch/PyFace3D.svg)](https://github.com/Dor-sketch/PyFace3D/graphs/contributors)\n\nContributions are welcome! Contributions guidelines will be added soon.\n\n## 📝 License\n\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- MediaPipe team for face mesh solution\n- OpenGL and PyOpenGL communities\n- Contributors to numpy, scipy, and pygame\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nMade with ❤️ by [Dor Pascal](https://dorpascal.com/)\n\n[![GitHub](https://img.shields.io/badge/GitHub-Dor--sketch-lightgrey.svg?logo=github)](https://github.com/Dor-sketch)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-Dor%20Pascal-blue.svg?logo=linkedin)](https://www.linkedin.com/in/dor-pascal/)\n[![Twitter](https://img.shields.io/badge/Twitter-DorPascalLab-blue.svg?logo=twitter)](https://twitter.com/DorPascalLab)\n\n[![Star History](https://img.shields.io/github/stars/Dor-sketch/PyFace3D.svg?style=social)](https://github.com/Dor-sketch/PyFace3D/stargazers)\n[![Follow](https://img.shields.io/github/followers/Dor-sketch.svg?style=social\u0026label=Follow)](https://github.com/Dor-sketch)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdor-sketch%2Fpyface3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdor-sketch%2Fpyface3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdor-sketch%2Fpyface3d/lists"}