Auto passport photo generator for Uganda - Kotlin/Compose
# Autopass Uganda
Native Android app (Kotlin + Jetpack Compose) that takes a photo with the
in-app camera and automatically turns it into a Uganda passport/visa
compliant photo — no manual editing.
## What it does
1. In-app camera (CameraX) with an oval framing guide
2. On capture: on-device ML Kit face detection (landmarks + eyes-open) and
selfie segmentation to isolate the person
3. Background is replaced with plain white
4. Head-height and eye-line are measured from the real detected face/hair
silhouette and cropped to match the official Uganda spec (51x51mm,
600x600px @ 300dpi)
5. Basic quality checks: no face / multiple faces, eyes closed, too dark,
too bright, too blurry, face too close to frame edge
6. On confirm, the photo is saved straight to the device's Gallery via
MediaStore (album: **Autopass Uganda**) — no manual export step
All processing is on-device and offline (no cloud API, no billing account
needed).
## Getting the APK
Every push to `main` triggers the **Build Debug APK** GitHub Actions
workflow. Once it finishes (Actions tab → latest run), download the
`autopass-uganda-debug-apk` artifact, unzip it, and install
`app-debug.apk` on your phone (enable "install unknown apps" for your
file manager/browser first).
This is a debug build, so no signing keystore or secrets are required.
## Project structure
```
app/src/main/java/com/autopass/uganda/
standards/ Uganda passport photo spec constants
processing/ Face detection + segmentation + crop math + quality checks
camera/ CameraX screen, permissions, framing guide overlay
ui/ Result screen, theme
util/ MediaStore save
MainActivity.kt Screen state machine (Camera → Processing → Result)
```