AetherLens - Face Mesh is a high-fidelity computer vision application that performs real-time 3D facial geometry tracking. By leveraging the MediaPipe Face Landmarker task, it maps 478 unique 3D landmarks onto the human face, providing a dense mesh suitable for facial analysis, augmented reality (AR) filters, and virtual avatars.
- 478 3D Facial Landmarks: Detects a high-density mesh including eye contours, lips, and facial silhouettes.
- Expression Detection (Blendshapes): Capable of outputting 52 blendshape scores to recognize facial expressions like smiling, blinking, or brow movement.
- Real-Time Performance: Optimized for sub-millisecond processing on standard CPU/GPU hardware.
- Mirror Mode: Horizontally flipped feed for an intuitive user experience.
git clone https://github.com/NKumar-B/AetherLens-FaceMesh.git
cd AetherLens-FaceMesh
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt
You must download the Face Landmarker model bundle from Google and place it in your project root:
- Model Name:
face_landmarker.task - Download Link: MediaPipe Face Landmarker Guide
- Run the application:
python FaceLandmarker.py
- Face Mesh Visualization: Look into the camera to see the green landmark mesh track your face in real-time.
- Exit: Press 'q' to close the window.
The system uses a multi-stage ML pipeline:
- Face Detection: A short-range BlazeFace model identifies the presence of a face.
- Landmark Estimation: A 3D landmark model predicts 478 landmarks via regression on the detected face region.
- Coordinate Mapping: Normalized coordinates are converted to pixel values based on the live camera resolution.
This project is licensed under the MIT License. See the LICENSE file for details.
- Google MediaPipe: For providing the robust Face Landmarker Tasks API and pre-trained
.taskmodels. - OpenCV (Open Source Computer Vision Library): For the powerful real-time image processing and visualization tools.
- The COCO Dataset Team: For their foundational work in standardizing computer vision training data.
- NumPy: For the efficient numerical processing required for coordinate mapping.