Jan 10, 2026 · learning
FaceBlur
An async media anonymization platform that blurs faces in images and videos using FastAPI, Taskiq workers, OpenCV processing, and a React polling UI.
> outcome
- Anonymization runs on a worker queue, so large videos process without blocking the request path.
- Media is processed in-process with OpenCV rather than sent to a third-party API.
- FastAPI
- Taskiq
- RabbitMQ
- Redis
- OpenCV
- React
- Vite
- Tailwind CSS
- Prometheus
- Docker
- Grafana
- Shadcn
> details
I built this as a solo project to demonstrate a production-minded async processing architecture, where heavy CV work runs in workers while the API remains responsive and observable.
Highlights
- Built an async processing pipeline for image and video face blurring that keeps API response paths lightweight while CPU-heavy work runs in workers.
- Implemented distributed background execution with Taskiq, RabbitMQ as broker, and Redis as result backend.
- Added upload validation guards for file type, extension, size, and video duration to protect processing resources.
- Implemented task result polling endpoints that return processed files (single output or zip bundle) and lifecycle status updates.
- Added storage cleanup behavior to remove temporary artifacts after retrieval and on periodic TTL-based sweeps.
- Exposed operations endpoints for health (
/health), queue insight (/queue), vanity stats (/stats), and Prometheus metrics (/metrics). - Added frontend upload and polling orchestration with clear pending/success/error state handling for both image and video flows.
- Included optional Prometheus and Grafana local monitoring profile for quick observability setup in development.
Overview
FaceBlur is an end-to-end media processing system that focuses on a practical architecture decision: keep the API responsive by moving heavy image/video processing into workers.
The project supports both images and videos and is designed to show a full request-to-result lifecycle with queueing, polling, and cleanup.
Backend Processing Architecture
The backend uses FastAPI for transport and Taskiq workers for execution. RabbitMQ handles task dispatch and Redis stores result state so clients can poll without blocking API workers.
This separation gives better latency behavior under load and makes each stage easier to reason about.
Computer Vision Workflow
OpenCV-based processing is used to detect and blur faces across media inputs. For videos, frames are processed and reassembled server-side.
To keep the system safe and predictable, uploads are constrained by file and duration limits before entering the queue.
Frontend UX
The React frontend provides a clear flow:
- upload media
- enqueue processing
- poll task state
- download final outputs
The UI handles both single-file and multi-file outputs and surfaces failures cleanly when processing or validation fails.
Operations And Observability
The service exposes health, queue, and stats endpoints plus Prometheus metrics. I also wired optional Grafana support for local dashboarding.
Background cleanup policies keep temporary storage bounded and reduce manual intervention.
Why This Project Matters
FaceBlur demonstrates a realistic async backend pattern for compute-heavy features: isolate expensive work, preserve API responsiveness, and add enough observability to operate the system with confidence.