Finds every face in an image, estimates whether each person is under 18 and pixelates only the minors, with microservices coordinated through Kafka events and a demo that runs entirely in the browser.
- Discipline
- Computer vision
- Year
- 2026
- Stack
- Python
- TensorFlow
- Keras
- YOLOv8
- PyTorch
- OpenCV
- ONNX Runtime Web
- FastAPI
- Apache Kafka
- PostgreSQL
- MinIO
- Docker
- Caddy
- Vercel
- < 1 sper image, down from ~15 s
- 11services coordinated by Kafka
- 82 → 22 MBmodel size for the browser

The problem
Images that contain minors cannot be published or stored without protecting their identity, and reviewing them by hand does not scale.
How I solved it
Detection
YOLOv8An event-driven architecture of 11 services (API gateway, 4 orchestrators and 3 processing services) that only communicate through Kafka in KRaft mode, with no direct calls between them.
Age
EfficientNetV2-SFace detection with YOLOv8 and a custom age classifier (EfficientNetV2-S with transfer learning), using oversampling of the critical ages (13–17) and class weights for the imbalance.
Pixelation
OpenCVSeveral faces per image, with results aggregated before pixelation; per-stage tracing with timings in PostgreSQL and a dead letter queue for errors.
Events
Kafka · MinIO · PostgreSQLOptimisation: age inference went from ~15 s to under 1 s per image, and the detection Docker image from 9.3 GB to 2.7 GB.
Production-ready with automatic HTTPS on Caddy, internal services not exposed, rate limiting, file validation and automatic image deletion.
A serverless demo: models exported to ONNX and compressed to int8 (82 MB to 22 MB) without changing their decisions, running in the browser with ONNX Runtime Web.
A closer look

The demo on a sample photo: each face with its probability of being a minor, the threshold and the original/protected comparison. 
The full architecture: an API gateway, four orchestrators and three services that only talk through Kafka events.
Result
A system that protects minors with no human review, and a public demo where images never leave the device. Built together with a classmate.
Need something similar?