Downloads · 30 days
0
birwatkar123/FacialDeviationAssessment
FacialDeviationAssessment is a machine learning model from birwatkar123. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for android. The card lists the license as mit.
Experimental V1 Android application that quantifies facial symmetry and smile dynamics from the front camera in real time, using MediaPipe Face Landmarker (478 landmarks) and Jetpack Compose.
Downloads · 30 days
0
Access
Public
Updated Sep 9, 2026
Repo size
75.7 MB
Likes
0
Public
Click a slice to open those files.
.apk71.9 MB · 95%
From the Hugging Face model README
Experimental V1 Android application that quantifies facial symmetry and smile dynamics from the front camera in real time, using MediaPipe Face Landmarker (478 landmarks) and Jetpack Compose.
Important: This is an experimental V1 algorithmic prototype. It is NOT a clinically validated diagnostic tool and does not provide medical advice. Consult a healthcare professional for any medical concerns.
app-debug.apk — 68.6 MB debug build (com.facialdeviation.assessment, v1.0.0, minSdk 24 / targetSdk 37)Install on device:
adb install -r app-debug.apk
On first launch, grant the camera permission. Hold your face centered, keep the head near-frontal, and follow the on-screen instructions (neutral pose → smile).
The app captures a short neutral-face sequence followed by a short smile sequence, then computes an Overall Symmetry score (0–100) from relative asymmetries of the mouth corners, mouth-line tilt, eyebrow heights, and eye openings, plus a separate Smile symmetry assessment derived from anatomical left/right mouth-corner excursion during the smile.
It is designed as a research/validation scaffold: ground-truth asymmetry can be induced (e.g., reduced one-sided smile movement) and compared against the reported metrics.
HomeScreen, CameraScreen, ResultsScreen)AssessmentViewModel (AndroidViewModel) backed by StateFlow; AssessmentState drives the UI flow: HOME → PERMISSION_REQUEST → CALIBRATING → NEUTRAL_FACE → SMILE_TEST → RESULTSPreview + ImageAnalysis, front camera, 640×480, RGBA_8888)FaceLandmarker (tasks-vision:0.10.29), RunningMode.LIVE_STREAM, CPU delegate, model face_landmarker.task bundled in app/src/main/assetsFacialSymmetryCalculator emits component metrics and weighted overall score.| Module | Produces |
|---|---|
HeadPoseAnalyzer | yaw / pitch / roll gating (acceptable), head-pose validity |
TrackingQualityAnalyzer | GOOD / FAIR / POOR tracking quality |
LandmarkSmoother | smoothed landmarks + temporal stability (0–1) |
FacialSymmetryCalculator | mouth-corner asymmetry (%), mouth-line tilt (°), eyebrow-height asymmetry (%), eye-opening asymmetry (%), deviations, and the weighted Overall Symmetry score |
SmileAnalyzer | smile symmetry (%), anatomical left/right excursion (%), excursion ratio |
FaceLandmarkUtils | landmark index constants (NOSE_TIP=1, LEFT_EAR=234, LEFT/RIGHT_MOUTH=61/291, …) and geometric helpers |
Overall Symmetry weights: mouth corners 0.30, mouth-line tilt 0.20, eyebrows 0.25, eyes 0.25. Each component normalized to 0–100 and combined; result clamped to [0, 100]. Smile symmetry is computed separately.
| Control | smileSymmetry | leftExcursion % | rightExcursion % | excursionRatio |
|---|---|---|---|---|
| A – normal smile | 82.1 | 9.06 | 10.84 | 0.91 |
| B – reduced anatomical-left smile | 12.9 | 3.28 | 8.35 | 0.56 |
| C – reduced anatomical-right smile | 0.0 | 12.22 | 3.59 | 0.45 |
RESULT_SUMMARY line (tag AssessmentViewModel) with component scores, smile metrics, tracking stability, FPS, and valid-frame counts.Requirements:
jvmToolchain(25)), e.g. JDK 25 or the JBR bundled with Android StudiocompileSdk = 37gradle wrapper --gradle-version 9.5.0 # once, if wrapper scripts missing
gradlew.bat assembleDebug
gradlew.bat testDebugUnitTest
APK output: app/build/outputs/apk/debug/app-debug.apk
The full source tree in this repository is buildable as an Android Studio / Gradle project and can be used as a scaffold for validating algorithmic facial metrics against induced asymmetry.
Full source lives on GitHub:
https://github.com/birwatkar123-collab/FacialDeviationAssessment