Día de los Muertos Photo Booth A developer built Día de los Muertos Photo Booth, a small self-hosted Flask web app that detects faces locally with MediaPipe Face Mesh and alpha-composites themed Día de los Muertos adornments — sugar skulls, sombreros, marigold crowns, La Catrina veils and monarch butterflies — onto each face using facial landmarks. Themes are data-driven, defined by folders of transparent PNGs plus a theme.json describing anchoring, scaling, offset and rotation, so new themes can be added without code changes. The app processes uploads entirely in memory with no external API and nothing written to disk, and ships as a single-service Docker stack. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Ghost in the Machine https://dev.to/challenges/hacktoberfest-week3-2026-10-19 Día de los Muertos Photo Booth is a tiny Flask web app that decorates every face in a photo with festive Día de los Muertos adornments — all on your own machine, with no cloud, no account, and no photo ever leaving your computer. You upload one JPEG or PNG. The app detects the faces in the picture locally, randomly assigns each face one of eight Día de los Muertos themes — calavera sugar-skull decoration + forehead marigold , sombrero hat + mustache , flower crown cempasúchil marigold crown , catrina La Catrina veil + stitched lips , papel picado decorative banner , marigold path petal overlay + crown , mariachi mustache + bow tie + sombrero , and monarch monarch butterfly — and alpha-composites transparent PNG adornments onto each face using its facial landmarks. Each adornment is anchored to the face: hats, crowns, veils, the monarch butterfly, and the forehead marigold sit above the head; the calavera decoration frames the eyes; mustaches and stitched lips land on the mouth; the bow tie sits at the chin; and the papel picado and marigold-petal overlays cover the whole frame. Several themes layer multiple pieces for example, mariachi combines a mustache, a bow tie, and a sombrero . Every adornment scales with each face and rotates to follow a tilted head, so the result tracks the real geometry of the photo. You then see the composed image in the browser and can download it in the same format you uploaded. Who it's for: anyone who wants a fun, instant, private way to celebrate Día de los Muertos with a photo effect — families, classrooms, cultural events, or a self-hosted photo-booth kiosk. Because everything runs locally and in memory, it's a good fit for anyone who cares that their faces and family photos are never uploaded to a third-party service. The privacy guarantee is structural, not a promise: there is no external API, nothing is written to disk, and every buffer is released in a try/finally block on every request path. Processing is fully in-memory and ephemeral. The adornment catalog is fully data-driven: each theme is a folder of transparent PNGs plus a theme.json describing how each piece is anchored, scaled, offset, and rotated, so themes can be added, enriched, or swapped without touching a line of code. Run it locally with Docker see the run steps below and open http://localhost:5000 http://localhost:5000 . Pick a JPEG or PNG with one or more faces, click Create portrait , and the composed, adorned image appears in the result panel ready to download. No setup, seeding, or model download is required on first start — the app is ready the moment the container is up. All code lives in desafio5/ and is deliberately small: a thin Flask layer over pure, independently testable domain modules, a vanilla-JS frontend, and a single-service Docker stack. app.py — Flask app factory and routes. GET / renders the single-page upload UI; POST /process runs the full in-memory pipeline validate → detect → assign themes → compose → encode and streams the result back. Loads the adornment set once at startup, warms up the detection model, and enforces a 30 s processing budget. validation.py — decodes and validates the upload entirely in memory 10 MB limit, JPEG/PNG only, decodability, non-zero dimensions . Never touches disk. detection.py — the Detection Engine wrapper around MediaPipe Face Mesh; locates up to 20 faces and derives the eye/mouth/head/chin landmarks used to anchor adornments. composition.py — the Composition Engine: assigns a random theme per face and scales, rotates, and alpha-composites each PNG onto the photo while preserving the input dimensions. adornments.py — loads the Adornment Set PNG assets + per-theme theme.json once at startup and encodes the result image back to bytes. templates/index.html — single-page upload interface all labels in English . static/app.js + static/style.css — the fetch-based uploader and the responsive stylesheet. static/adornments/