Skip to content
CAI
Software that uses CAICheck a score

Zeyi-Lin/HivisionIDPhotos

57.3

Adequate · 19 September 2026

6k

lines of production code

Python

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

HivisionIDPhotos is an intelligent ID photo generation tool that processes images to create standard and HD portraits with background replacement and layout printing. It provides a modular Python library for core image manipulation, including face detection, matting, and beauty adjustments, alongside a Gradio web demo and a FastAPI REST API for programmatic access. The system supports multiple AI models for matting and detection, allowing for customizable outputs such as specific dimensions, background colors, and watermarks.

How it got here

2023 — Initial release and legacy cleanup

10 changes.

This period marks the initial release of HivisionIDPhotos, introducing a Gradio demo, REST API, and Docker support for ID photo generation. Concurrently, the project removed extensive legacy code, including old service frameworks, beauty plugins, and third-party API integrations, to streamline the core functionality.

2024 — Initial release and feature expansion

11 changes.

This period marks the initial release of the hivision ID photo processing library, establishing core functionality for ID photo generation, face detection, and image manipulation. The work focused on building a modular architecture with pluggable models and plugins, including beauty enhancements, watermarking, and template-based layouts. Supporting infrastructure was also established through automated model downloads, localized demo interfaces, and development environment configurations.

Features

Add ONNX-based RetinaFace face detection

Introduces a new face detection module using the RetinaFace model via ONNX Runtime. This change adds the core inference logic, including bounding box and landmark decoding, prior box generation, and non-maximum suppression, allowing the application to detect faces in images using a configurable ONNX model file.

hivision/creator/retinaface · high confidence

Add template-based photo generation capability

Users can now generate photos using predefined templates. This change introduces a new template calculator that reads configuration data (dimensions, anchor points, and rotation) from a JSON file and applies them to input images. The system rotates, scales, and pastes the input image onto a white background according to the template's geometry, then overlays a template-specific PNG image with alpha blending to produce the final result.

hivision/plugin/template · high confidence

Added VS Code Dev Container configuration for local development

Developers can now open the project in VS Code using the Dev Containers extension to get an immediate, consistent development environment. The configuration uses a Linux universal image and automatically runs a setup script on creation that installs system dependencies (ffmpeg, libsm6, libxext6), creates a Python 3.10 conda environment named 'HivisionIDPhotos', installs project requirements, and downloads necessary models.

.devcontainer · high confidence

Added image watermarking capability with striped and central styles

Users can now apply watermarks to images using the new Watermarker plugin, which supports both striped (repeating diagonal) and central placement styles. The feature allows customization of the watermark text, font, color, opacity, size, spacing, and rotation angle, with the default font file located in the plugin's font directory.

hivision/plugin, hivision/plugin/font · high confidence

Added localized asset files for demo configuration

New CSV and Markdown asset files have been added to the demo's assets directory to support localized content. Specifically, \color\_list\_CN.csv\ and \color\_list\_EN.csv\ define available background colors in Chinese and English, while \size\_list\_CN.csv\ and \size\_list\_EN.csv\ provide lists of standard photo dimensions (such as visa and exam sizes) in both languages. Additionally, \title.md\ was added to define the demo's header layout, including the application title, version (v1.3.1), and associated badges.

demo/assets · high confidence

Automated model download utility with progress tracking

A new \scripts/download\_model.py\ script has been added to allow users to automatically download required AI model weights (such as matting and face detection models) directly from GitHub and Hugging Face. The utility features a command-line interface for selecting specific models or downloading all available ones, includes logic to skip files that already exist, and displays a real-time progress bar during the download process.

scripts · high confidence

Initial release of HivisionIDPhotos with Gradio demo, REST API, and Docker support

This commit introduces the initial version of HivisionIDPhotos, an intelligent ID photo generation tool. It adds a Gradio-based web demo (\app.py\) for interactive use, a FastAPI-based REST API (\deploy\_api.py\) for programmatic access, and a Python inference script (\inference.py\) for command-line usage. The release includes Docker support via a \Dockerfile\ and \docker-compose.yml\ for containerized deployment, along with multi-language documentation (Chinese, English, Japanese, Korean) and an Apache 2.0 license. The application supports various matting models (MODNet, BiRefNet, etc.) and face detection models, allowing users to generate standard and HD ID photos, perform background replacement, and create layout prints.

(repo-wide) · high confidence

Initial release of the hivision ID photo processing library

This change introduces the core \hivision\ package, providing a public API via \IDCreator\, \IDParams\, and \IDResult\ classes for generating ID photos. It includes utility functions for image manipulation, specifically supporting DPI setting, resizing images to a target file size in KB (with base64 output options), and converting between NumPy arrays and base64 strings. The package also defines custom exception classes (\FaceError\, \APIError\) to handle specific face detection and API-related errors.

hivision · high confidence

New beauty plugin with skin grinding, whitening, and base adjustments

The beauty plugin now includes a comprehensive set of image enhancement capabilities. Users can apply skin grinding (smoothing) with adjustable degree, detail, and strength parameters. A new whitening feature allows control over skin tone brightness using a LUT-based approach. Additionally, users can fine-tune the image with sliders for brightness, contrast, sharpness, and saturation. These features are integrated into a unified handler that processes the face image while preserving the alpha channel for transparency.

hivision/plugin/beauty · high confidence

Removals

Removal of beauty plugin components

The beautyPlugin module has been removed, specifically deleting the GrindSkin.py (skin smoothing algorithm), MakeWhiter.py (skin whitening algorithm), and the \_\init\\_.py entry point. Users will no longer have access to these image beautification features.

beautyPlugin · high confidence

Removal of legacy cloud, database, and training utility modules

The \hivisionai/hyService\ and \hivisionai/hyTrain\ packages have been removed, eliminating the codebase's support for Tencent Cloud COS configuration, MongoDB database interactions, and Alibaba Cloud image segmentation/face detection APIs. This change also removes local debugging utilities, image processing helpers, and training data preparation scripts that were previously part of the service layer.

hivisionai/hyService · high confidence

Removal of legacy face detection and ID photo processing modules

The \hycv\ library has removed its legacy face detection and ID photo generation capabilities. Specifically, the \FaceDetection68\ module (which relied on \dlib\ for 68-point landmark detection) and the entire \idphotoTool\ suite (including \idphoto\_cut.py\ for ID photo creation, \idphoto\_change\_cloth.py\ for virtual try-on, and \neck\_processing.py\ for neck transformation) have been deleted. Additionally, supporting files for MTCNN-based face detection (\mtcnn\_onnx\), general matting (\matting\_tools.py\), and core utility modules (\face\tools.py\, \error.py\, and the main \\\init\\_.py\) have been removed, effectively stripping these features from the package.

hivisionai/hycv · high confidence

Removal of legacy hivisionai CLI and SDK management module

The \hivisionai/app.py\ file, which previously provided command-line interface functionality and SDK management utilities, has been removed. This eliminates the built-in capability to download and manage HY-sdk dependencies, retrieve version lists from Tencent Cloud COS, and handle local configuration storage for the SDK.

hivisionai · high confidence

Removal of legacy image processing and API helper library

The \\_lib\ directory, which previously housed reusable utilities for human matting, face detection, and third-party API integrations, has been completely removed. This deletion eliminates the Aliyun human matting API client, the Megvii (Face++) face detection API wrapper, the dlib-based 68-point face landmark detector, and associated configuration and utility modules. Users relying on these specific helper classes or functions for image processing and external API calls will no longer have access to them through this library.

_\lib · high confidence

Removal of legacy service deployment framework

The entire \_service module has been removed, including the main Service class, utility modules (cos, diary, variable), and configuration files. This eliminates the previous deployment framework that handled message reception, parameter validation, log collection, and WebSocket/socket.IO communication for function deployment.

_\service · high confidence

Behavioural changes

3 commits (0 fixes) modifying \_lib/\_\_pycache\_\_

A change to existing behaviour in \lib/\\pycache\\_ — 3 commits, 12 files.

_\lib/\\pycache\\_ · medium confidence · unverified_

3 commits (1 fix) modifying hivisionai/\_\_pycache\_\_

A change to existing behaviour in hivisionai/\_\pycache\\_ — 3 commits (1 fix), 3 files.

hivisionai/\\pycache\\_ · medium confidence · unverified_

Demo application restructured with modular configuration and multi-language support

The demo interface has been refactored into distinct modules (config, locales, processor, UI, utils) to support a more robust user experience. Users can now select from four languages (English, Chinese, Japanese, Korean) via a dropdown, with all UI labels and error messages translated accordingly. The ID photo generation logic is now handled by a dedicated processor class that manages complex inputs like custom sizes (px/mm), background colors (including custom RGB/HEX), and various plugins (face alignment, horizontal flip, layout crop lines, JPEG format). Configuration for size lists and color palettes is now loaded dynamically from CSV assets, allowing for easier updates to available presets without code changes.

demo · high confidence

ID photo creation engine refactored with pluggable models and new adjustment options

The \hivision/creator\ module has been restructured into a modular pipeline that allows users to select from multiple human matting models (including \modnet\_photographic\_portrait\_matting\, \birefnet-v1-lite\, \hivision\_modnet\, \rmbg-1.4\, and \mnn\_hivision\_modnet\) and face detection backends (MTCNN, RetinaFace, or Face++ API). The core \IDCreator\ class now exposes granular beauty controls for whitening, brightness, contrast, sharpening, and saturation, alongside new options for face alignment and horizontal flipping. The image adjustment logic has been updated to support these parameters and includes a new layout calculator for generating multi-photo prints with optional crop lines.

hivision/creator · high confidence

Test coverage

Added test script for ID photo creation

Added a new test script (test/create\_id\_photo.py) that exercises the IDCreator component by loading a test image, generating standard and HD ID photos, and saving the results to a temporary directory.

test · high confidence

Dependencies

Initial dependency manifest creation

The project now includes three new requirements files to manage dependencies: requirements.txt defines core runtime libraries including OpenCV, ONNX Runtime, NumPy, and Starlette; requirements-app.txt specifies Gradio (version 4.43.0 or higher) and FastAPI for the application layer; and requirements-dev.txt adds Black for development and formatting tasks.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 57.

Lenses

  • Code Health 95
  • Architecture 99
  • Maturity 60
  • Readiness 44
  • Security 65

Changes since last survey

  • 300 commits — 260 feature/other, 40 fixes

By area

  • (root) — 189 commits
  • (repo) — 21 commits
  • hivision/creator — 19 commits
  • .github/workflows — 13 commits
  • demo/processor.py — 11 commits
  • docs/api_CN.md — 7 commits
  • demo/ui.py — 5 commits
  • demo/assets — 4 commits
  • demo/locales.py — 4 commits
  • hivision/plugin — 4 commits
  • demo/images — 3 commits
  • docs/api_EN.md — 3 commits
  • docs/python_api_CN.md — 3 commits
  • docs/face++_CN.md — 2 commits
  • .devcontainer/devcontainer.json — 1 commit
  • app/images — 1 commit
  • assets/demo.png — 1 commit
  • assets/demoImage.jpg — 1 commit
  • assets/hivision_logo.png — 1 commit
  • beautyPlugin/lut_image — 1 commit

Notable commits

  • fix: fix api func name (#87)
  • fix: fix(action): support multiple models (#64)
  • fix: fix-docker_compose
  • fix: fix: 1024kb error
  • fix: fix: action
  • fix: fix: action
  • fix: fix: action
  • fix: fix: add loguru
  • fix: fix: api
  • fix: fix: api CN
  • fix: fix: app bug
  • fix: fix: argparse
  • fix: fix: argparse
  • fix: fix: creator bug(#95)
  • fix: fix: cross-domain issue (#110)
  • fix: fix: default face model
  • fix: fix: deploy api type (#100)
  • fix: fix: face align beauty(#148)
  • fix: fix: face detect onnxruntime
  • fix: fix: face++ handler choose
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Zeyi-Lin/HivisionIDPhotos was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5c191e2577f14755a69d9df6db415fab23aca484 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.