Vision Forge API is a FastAPI service for image tagging powered by SigLIP. It scores uploaded images against config-driven canonical tag sets and prediction profiles, with bearer API key authentication and a small admin surface for key management and config reloads.
admin and predict roles/predict scoring with cached text embeddingsThe container uses two directories:
/configConfiguration directory. The image ships with sample config files here at build
time, and the path can be overridden with VISION_FORGE_CONFIG_DIR.
Expected files:
auth.yamlsettings.yamltag_sets.yamlprofiles.yamlprompts.yamlTypical responsibilities:
auth.yaml defines token prefix, token length, and default rolessettings.yaml defines the app name, prediction limits, embedding location,
model cache location, and SigLIP model idtag_sets.yaml defines canonical tag groupsprofiles.yaml defines prediction profiles and which tag sets they useprompts.yaml defines prompt templates for canonical tags/dataWritable runtime storage. The path can be overridden with
VISION_FORGE_DATA_DIR.
Expected content:
api_keys.json - persisted API keys and roles used by the auth cacheembeddings/text_embeddings.json - cached text embeddings for canonical tagsembeddings/metadata.json - embedding cache metadatamodel_cache/ - Hugging Face / Transformers model cacheThe service will create or refresh missing embedding cache entries on startup when needed.
GET /healthGET /tag-setsGET /profilesPOST /predictGET /admin/api-keysPOST /admin/api-keysPATCH /admin/api-keys/{name}DELETE /admin/api-keys/{name}POST /admin/reloadThe prediction endpoint expects a multipart image upload and supports these query parameters:
limitmin_scoreprofiletag_setsextra_tagsReturned scores are normalized to the 0.0..1.0 range.
The prediction pipeline does the following:
min_scorelimitPublished variants:
cpu-litecpu-fullgpu-litegpu-fullRelease builds publish both floating variant tags and versioned tags. For
example, a release such as v1.2.3 publishes:
1.2.3-cpu-lite1.2.3-cpu-full1.2.3-gpu-lite1.2.3-gpu-fullcpu-litecpu-fullgpu-litegpu-fulllatest for cpu-full onlyRun the container with runtime data mounted at /data:
docker run --rm -it \
-p 8000:8000 \
-v "$PWD/data:/data" \
-e VISION_FORGE_DEVICE=cpu \
mlachgar/vision-forge-api:cpu-full
If you want to override the bundled config, mount your own directory at
/config and point VISION_FORGE_CONFIG_DIR to it:
docker run --rm -it \
-p 8000:8000 \
-v "$PWD/config:/config:ro" \
-v "$PWD/data:/data" \
-e VISION_FORGE_CONFIG_DIR=/config \
-e VISION_FORGE_DEVICE=cpu \
mlachgar/vision-forge-api:cpu-full
Content type
Image
Digest
sha256:33520a352…
Size
4.7 GB
Last updated
6 months ago
docker pull mlachgar/vision-forge-api