Real-time face filters for Android using MediaPipe's 468-point facial landmark detection. Snap on glasses, noses, and more — all tracking your face in live camera preview.
FaceFlux overlays AR filters on your face in real time using the device camera. It uses MediaPipe's Face Mesh model to detect 468 precise facial landmarks — and maps filter assets (glasses, noses, accessories) directly onto the right points on your face, frame by frame.
No cloud processing. Everything runs on-device.
| Language | Kotlin |
| Platform | Android |
| Face Tracking | MediaPipe Face Mesh (468 landmarks) |
| Rendering | Android Canvas / Custom View |
| Camera | CameraX |
MediaPipe's Face Mesh model returns 468 3D landmarks per frame — each one a precise point on the face (eye corners, nose tip, lip edges, cheekbones, etc.). FaceFlux uses specific landmark indices to anchor filter assets to the right anatomical positions.
Camera Frame
│
▼
MediaPipe Face Mesh
│
▼
468 Landmark Points (x, y, z per point)
│
▼
Map assets to landmark positions
(glasses → eye landmarks, nose → tip landmark, etc.)
│
▼
Draw overlay on Canvas → Live Preview
Each filter asset is anchored to specific landmark indices:
| Filter | Anchored To |
|---|---|
| Glasses | Left eye corner → Right eye corner |
| Nose | Nose tip landmark |
| Accessories | Forehead / chin landmarks |
Asset scale and rotation are calculated dynamically per frame — so the filter moves, scales, and rotates naturally as you move your head.
- Real-time face tracking at camera frame rate
- Multiple filter types — glasses, noses, accessories
- Accurate landmark-based anchoring — filters stick to the right face region
- Fully on-device — no network calls, no latency
- Works with front camera live preview
- Android Studio (latest stable)
- Android device or emulator with camera support
- Min SDK: 21+
git clone https://github.com/ishan739/FaceFlux.gitOpen in Android Studio → Run on device or emulator.
Camera permission is required on first launch.
app/
└── src/main/
├── java/ # Kotlin source — camera, landmark processing, filter rendering
├── res/ # Filter assets, layouts
└── AndroidManifest.xml
- More filter types — hats, beards, makeup overlays
- Custom filter import
- Filter intensity / opacity control
- Face expression triggers (open mouth → swap filter)
- Video recording with filters applied