#1010th of 13 in Image and video

hivisionidphotos

Offline ID photo maker: portrait matting, background swap, sizing and print layouts

Stars
21.6k
License
Apache-2.0
Last commit
Jul 2026
Last release
Jan 2025
Language
Python

Missed the latest GitHub check; these facts may be older.

Overview

HivisionIDPhotos cuts out the person with ONNX matting models (MODNet, hivision_modnet, RMBG-1.4, BiRefNet-v1-lite), detects the face, then crops and resizes to standard ID photo sizes with a chosen background color. It also produces print layout sheets (6-inch, 5-inch, A4, 3R, 4R). It runs as a Gradio demo, a CLI script, or a REST API, and the default models run on CPU.

Who it is for: Self-hosters and developers who need to generate ID photos locally or via an API

Strengths

  • Default MODNet + MTCNN runs on CPU: about 410MB RAM and 0.2s per image on an M1 Max
  • Gradio UI, inference.py CLI and deploy_api.py REST API all included
  • Fully offline; Face++ cloud face detection is optional
  • Preset sizes and colors editable through CSV files

Weaknesses

  • BiRefNet-v1-lite, the most accurate matting option, needs about 6GB RAM and ~16GB VRAM on GPU
  • Model weights must be downloaded separately before running
  • README and docs are mainly Chinese; English is in a separate file
  • Last release is 2025-01-21; the smart outfit-change feature is still marked waiting

What it needs

  • GPU optional
  • Docker + Compose
  • Needs onnxruntime, Face++ API (optional)
  • Models: MODNet, hivision_modnet, RMBG-1.4, BiRefNet-v1-lite, MTCNN
  • port 7860

Also in Image and video

See all 13
Also in Image and video
RankProjectScore
1MoneyPrinterTurboTurns a topic into a short video with script, footage, voiceover and subtitles131k starsMIT76 out of 100
2ComfyUINode-graph engine for diffusion image, video, audio and 3D models137.5k starsGPL-3.075 out of 100
3InvokeAICanvas-first web UI for Stable Diffusion and Flux image generation28.6k starsApache-2.062 out of 100
#4open-generative-aiImage, video and lip-sync studio UI that calls MuAPI, with optional local engines Live demo ↗ (opens in a new tab)30.4k starsMIT61 out of 100
#5AI ToolkitLoRA and LoKr training suite for image, video and audio diffusion models12.3k starsMIT51 out of 100