β οΈ Quality standards (Paddy directive β every output must satisfy these)
Zero noise + background REMOVED β all matting via fal-ai/birefnet (no MediaPipe staircase, no background bleed). Hardwired in code.
Clean borders β 12px Photoshop dilation stroke (not blur-threshold halo). Hardwired.
Lucia-style drop shadow β alpha 0.65, blur 90, offset (12, 32). Hardwired.
Sources prepped via Face Prep Tool β 1200Γ1200 canvas, eyes at (500,480)/(700,480), min 800px input, face β₯25% of frame.
Production path is Lucia's hand-Photoshopped PNG β canvas fallback is DEBUG/DRAFT only until Paddy signs it off.
Final assets must look like Lucia's reference β if not, reject and re-prep.
β³ Loading AI face modelβ¦
π Face Library
Pick pre-aligned faces from
Face Prep Tool β the source audit still checks direction and expression before output.
π Refresh
Canvas fallback feature toggles β union-hull A/B ownership only
π Invert A β B
βΊ Locked default
π£ = Face A π‘ = Face B Every region uses the convex hull of Face A landmarks plus transformed Face B landmarks, so no duplicate mouths/eyes/ears can peek through.
Alignment preview β 50% opacity overlay (alignment step ONLY)
Eyes, nose, mouth, ears and jawline should line up. Opacity is used HERE ONLY β the final morph has zero opacity.
Load Face A and Face B. The tool rejects unusable sources, warns on expression differences, and helps flip opposite-facing pairs.
Detecting facial landmarks (eyes, nose, mouth, ears, jaw)β¦
Computing alignment transform (rotate Β· scale)β¦
Removing backgrounds (fal-ai/birefnet HQ matting; MediaPipe fallback only if API fails)β¦
Building morph (Lucia PNG untouched, or explicit debug union-hull fallback)β¦
Applying white border + drop shadow (per spec)β¦
Rendering morph asset + multi-version gridβ¦
πΎ Save to KBT Library
Uploads Q-slot + answer pair to Drive and creates a draft kbt_question row (qtype=19). Question is then playable in the host app.
πΎ Save to Library
Q-slot asset — morph image (replaces [q] in Face Morph Q template)
A-slot face A — clean Face A stickered (left position, transparent)
A-slot face B — clean Face B stickered (right position, transparent)
A-slot asset — both side-by-side (PREVIEW only; not used in final .pptx if you have animations wired)
Individual people files β stickered (border + shadow) AND clean (no border)
Multiple versions β 6 preset feature mixes (each 1920Γ1080, click for link or PNG)
Paddy sign-off comparison β master reference vs current output