PasFoto Studio is a privacy-first, SaaS-grade online tool for creating professional passport photos. Designed to be a universal solution for users from any country, it supports various international ICAO document standards without requiring logins or server-side data storage.
Powered by a custom ISNet Deep Learning model (exported to ONNX) served via a Python FastAPI backend, the app processes captured photos or uploads on-demand to remove backgrounds with pixel-level hair precision, apply studio-grade retouching, and return transparent PNGs. The frontend leverages Alpine.js and HTML5 Canvas to provide a zero-latency, real-time editing experience where users can manually pan, zoom, change background colors, and export print layouts.
- Smart Background Removal: ISNet Deep Learning model via ONNX Runtime for precise hair-edge detection and alpha matting.
- Real-Time Client-Side Editing: Zero-latency manual pan/zoom and background replacement using native HTML5 Canvas.
- Universal Document Presets: Supports international standards (ID, US, EU, CN, JP/KR, CA, IN) mapped to exact 300 DPI pixel dimensions.
- Print Layout Generator: Automated client-side compositing of multiple passport photos onto a standard 4R (4x6 inch) canvas for printing.
- Stateless & Privacy-First: Server processes images in RAM on-demand; no user data or images are persisted on the server.
- Backend Framework: FastAPI (Python)
- Deep Learning Model: ISNet (
isnet-general-useexported to.onnx) - Inference Engine: ONNX Runtime (
onnxruntime) viarembg - Image Processing: OpenCV (
opencv-python-headless), Pillow, NumPy - Frontend Architecture: HTML5 / Tailwind CSS / Alpine.js (SPA via CDN)
- Canvas Engine: Native HTML5 Canvas API
- License: MIT License
This project is licensed under the MIT License - see the LICENSE file for details.

