Hivision ID Photo Processor
Overview
Task skill for executing HivisionIDPhotos image workflows from terminal commands. This skill is for real processing outputs, not repository analysis.
When to Use
Use this skill when user requests include:
- Modify ID photo / 修改证件照
- Cutout / 抠图
- Change background color / 换底色
- Replace background / 换背景
- Crop to standard size / 裁剪
- Generate print layout / 排版
- Remove background / portrait matting
- Change ID photo background color
- Crop to passport or visa size
- Generate print layout sheets (6-inch / 5-inch / A4 style by size settings)
- End-to-end pipeline from raw portrait to final files
Do not use this skill for generic Photoshop editing or non-ID-photo composition work.
Trigger Examples (Natural Language)
The following user phrases should trigger this skill:
修改证件照证件照抠图证件照换底色证件照换背景证件照裁剪成1寸证件照排版把这张照片做成证件照
Required Inputs
inputimage pathoutdiroutput directorywidthandheightin pixels (default295x413)- optional
bg_colorin hex without#(default638cce)
Command Entry
Run the wrapper script:
python3 scripts/hivision_task.py <command> [options]
Commands:
pipeline: matting -> crop -> background -> layoutmatting: output transparent pngcrop: crop transparent id photo by sizebackground: apply pure/gradient background to RGBA imagelayout: generate print layout from final ID photo
Typical Usage
python3 scripts/hivision_task.py pipeline \
--input /abs/path/photo.jpg \
--outdir /abs/path/out \
--width 295 --height 413 \
--bg-color 438edb \
--render 0
Expected outputs in outdir:
idphoto_matting.pngidphoto_crop.pngidphoto_crop_hd.pngidphoto_bg.jpgidphoto_layout.jpg
Environment Notes
- By default wrapper reads repo path from
HIVISION_REPO. - Default repo path:
/Users/wsxwj/.codex/skills/hivision-idphotos/vendor/HivisionIDPhotos - Ensure model weights exist under:
hivision/creator/weights/- (optional)
hivision/creator/retinaface/weights/
If model files are missing, download them with the upstream repo script:
python3 scripts/download_model.py --models hivision_modnet