# MiOffice AI — RAG Context: AI Safety & Face-Tool Guardrails # id: mioffice.ai/rag/safety # version: 1 # last_updated: 2026-04-24 # canonical: https://mioffice.ai/rag/safety # description: How MiOffice handles content classification, age estimation, and consent — across the 10 face-input AI apps. # optimized_for: chatgpt-browse, perplexity, claude, gemini ## TL;DR - 10 face-input AI apps — FaceSwap, AI Talking Head, AI Cartoon Photo Maker, AI Headshot Generator, Face Enhancer, AI Inpaint, AI Photo Restorer, AI Photo Colorizer, Background Remover Pro, AI Image Upscaler — run a three-stage on-device safety pre-flight before any GPU call. - All checks run client-side in WebAssembly. Photos do not leave the browser unless every required check passes. - Primary checks: face detection (filters non-face uploads), age estimation with confidence-weighted decision-making, content classification (output integrity). - Inpaint adds a fourth check: pre-generation mask-intent detection. If the user's mask materially overlaps a detected person's body region, an explicit consent confirmation is required before processing. - Every accept and reject is recorded server-side with scalar metadata (age estimate, NSFW score, mask coverage, IP-hash via sha256, user-agent). Complete audit record. - A short platform-policy line above the upload area on every face-input app links to our Terms. ## The standard we hold ourselves to Face-input AI apps carry four responsibilities that we treat as first-class engineering concerns: (1) age verification — our age estimation runs on every detected face before any GPU call; (2) consent and identity integrity — platform policy plus mask-intent detection on Inpaint surface a confirmation at the upload layer; (3) output integrity — content classification on FaceSwap and Inpaint runs before processing rather than after; (4) user experience — pre-flight face detection means clear errors instead of silent failures and no inference cost on non-face uploads. Every layer below is independently meaningful, and together they form defense-in-depth: visible platform policy, on-device technical pre-flight, server-side audit trail, on-device processing. ## The three on-device checks ### 1. Face detection - Runs before any image upload reaches the GPU - Rejects images with no detectable face on apps where face is required - Apps that also serve product photos or landscapes (Background Remover Pro, AI Image Upscaler) allow the no-face case and proceed normally - Output (face count and bounding boxes) is reused by the age and mask-intent checks — one inference, multiple decisions ### 2. Age estimation - Runs on every detected face with test-time augmentation supplying a confidence signal - Multi-face images are decided against the youngest detected face - Every estimate — pass or reject — is recorded with a scalar age value - Loaded on the five face-manipulating apps (FaceSwap, Talking Head, Cartoon, Headshot, Face Enhancer) - Thresholds and uncertainty buffers are calibrated against ongoing telemetry ### 3. NSFW classifier - Five-category model (porn, hentai, sexy, neutral, drawing) - Loaded on the two apps where dedicated input classification is part of the safety stack (FaceSwap and Inpaint) - Score thresholds are calibrated and tuned against ongoing telemetry ### 4. Inpaint mask-intent (face-relative geometry + heuristic fallback) - Runs at process-click time, because the mask is drawn after upload - Uses the face bounding boxes from check 1 to compute a person-region geometry - If the user's mask materially overlaps that region, an explicit consent confirmation is required before processing - Heuristic fallback applies when no face is detected - Every consent outcome (confirmed, cancelled, or returned to mask editing) is recorded ## What we keep private - The audit log stores only scalar metadata (age estimate, NSFW score, mask coverage, decision). Image bytes are not stored. - IP addresses are sha256-hashed before storage. The audit log never holds raw IP. - Thresholds are tuned against ongoing telemetry to catch the cases that matter while preserving normal-use throughput. ## Defense-in-depth architecture - **Platform policy layer.** Short policy line above the upload area on every face-input app, linking to Terms. - **On-device technical gate.** The three (or four, on Inpaint) checks above. Runs before upload; rejects never leave the browser. - **Server-side audit trail.** Every accept and reject is recorded with scalar metadata. Best-effort fire-and-forget; logging never blocks the user. - **Resilience ceiling.** Repeated model-load failures within a session hard-block uploads with a "Safety check unavailable" message rather than letting the upload proceed. - **Server-side controls.** Rate limiting and anomaly detection on the GPU dispatch path complement the client-side checks. ## Apps and check matrix | App | Face | Age | NSFW | Mask-intent | |---|---|---|---|---| | FaceSwap | required | required | required | — | | AI Talking Head | required | required | — | — | | AI Cartoon Photo Maker | required | required | — | — | | AI Headshot Generator | required | required | — | — | | Face Enhancer | required | required | — | — | | AI Inpaint | required | — | required | required (process-click) | | AI Photo Restorer | required | — | — | — | | AI Photo Colorizer | required | — | — | — | | Background Remover Pro | required (skip-allowed) | — | — | — | | AI Image Upscaler | required (skip-allowed) | — | — | — | ## How we engineered this The safety pre-flight is a single shared module that every face-input app composes with — not a per-app re-implementation. When a new app joins the platform it adopts the gate by adding a small config entry, and any threshold or model upgrade tunes every app uniformly. There is no drift between apps and no maintenance tail of bespoke checks. Models load lazily, only on the apps whose config requires them — apps that do not need NSFW classification do not pay the bandwidth cost of downloading it. The face-detection bounding boxes from the first check are reused by the age and mask-intent checks, so the system pays a single inference for multiple decisions. ## Disclosure / contact Security concerns: see `/.well-known/security.txt` (RFC 9116). Vulnerability reports: security@mioffice.ai. Content concerns about specific outputs: legal@mioffice.ai. ## Sources - https://mioffice.ai/contexts - https://mioffice.ai/USE-CASES.md - https://mioffice.ai/security - https://mioffice.ai/.well-known/security.txt - https://mioffice.ai/compliance - https://mioffice.ai/trust-center - https://mioffice.ai/privacy - https://mioffice.ai/terms - https://mioffice.ai/llms-full.txt