Generate official ID photos from smartphone pictures without visiting a photo studio.
Build a batch processing pipeline to create formatted ID photos for employee badges or documents.
Deploy as a self-hosted web service for organizations that need offline photo processing without cloud dependencies.
Create print-ready sheets with multiple ID photos in standard layouts for passport or visa applications.
Docker build and model downloads on first run add setup time; CPU inference may be slow for batch processing.
HivisionIDPhotos is a Python tool for making official-style ID photos automatically, the kind of passport, visa, or work-permit photo where the subject is centred on a plain background at a specific size. Normally you would pay a photo shop or fight with a photo editor to get the background colour, framing, and print sizing right. This project takes a regular photo of a person and runs it through an AI pipeline that cuts the subject out from the original background, places them on a clean background, aligns the face, and produces the result at standard ID photo specifications. It works by chaining a person-cutout model (the README lists several options including MODNet, hivision_modnet, rmbg-1.4, and birefnet-v1-lite) with a face-detection model (MTCNN, RetinaFace, or the Face++ online API). The README emphasises that the default models are lightweight enough to run entirely offline on a regular CPU; only the larger birefnet-v1-lite model benefits from an Nvidia GPU. The project also ships a Gradio web demo, a FastAPI service for programmatic use, and a Docker deployment path. Features called out include multiple ID and print-layout sizes such as six-inch and A4, a beauty-retouch option, custom HEX background colours, face-rotation alignment, JPEG download, and a 300 DPI default. Someone would use it when they need a passable ID photo without a studio visit, when they want to self-host an ID-photo service, or when they want to plug ID-photo generation into another product through an API. It runs on Linux, Windows, and macOS with Python 3.7 or newer, and the topics list mentions CNN, face recognition, FastAPI, Gradio, and Docker as the main technologies.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.