cgh-vision
Image understanding for cgh: a content inventory decides what each image contains, then only the extractors the content warrants run: architecture diagrams become markdown plus Mermaid, tables and charts become data, dense text becomes a summary. Everything runs against a local Ollama daemon; nothing leaves the machine.
pip install cgh-vision
ollama pull qwen2.5vl:3b gemma3:4b # the benchmark-selected pair
cgh vision docs/architecture.png # one image, markdown on stdout
Pipeline
- Inventory (non-directive: an image is never assumed to be a diagram; a logo or a photo costs one call and one summary line).
- Diagram extraction when warranted: structure with the plain contract, enrichment over the found labels (title, kinds, technologies, legend only if actually drawn), then a second model reads the arrows constrained to the found labels. Benchmarked ensemble: node precision 1.00, edge recall 0.80.
- Table / chart / text extractors as routed.
- Post-processing: fuzzy-duplicate merge, arrow annotations
dropped from node lists, reversed-edge dedup, and identity
separation: IPs, CIDRs, FQDNs, emails and server names split out
of labels, recorded as
pii.image_identityfindings so the secure-at-rest layer pseudonymizes them.
Findings
| Key | Content |
|---|---|
image.content |
detected types (architecture_diagram,table,...) |
image.summary |
one-sentence description, FTS-searchable |
diagram.mermaid |
the generated Mermaid |
diagram.entities |
nodes/edges/zones as JSON |
table.markdown / chart.markdown |
extracted data |
text.summary |
dense-text summary |
pii.image_identity |
identities read off the image (warn) |
Configuration
[plugin.vision]
# profile = "default" # default | fast (single call) | photo
# nodes_model = "qwen2.5vl:3b"
# edges_model = "gemma3:4b" # set to "" to disable the edge pass
# ollama_url = "http://127.0.0.1:11434"
# timeout_s = 120
# min_bytes = 5120 # skip icons and badges
# max_bytes = 20971520
Embedding
The pipeline is part of the cgh SDK surface (codegraph.sdk.image_*,
MIT): image_inventory, extract_diagram, extract_table,
extract_chart. See cgh's docs/EMBEDDING.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cgh_vision-0.1.0.tar.gz.
File metadata
- Download URL: cgh_vision-0.1.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e41f91793992ea327a3b930adfbeace7628353c2d93db461507f160bed1779d7
|
|
| MD5 |
427f480f447174055348b62821f7141e
|
|
| BLAKE2b-256 |
732e3a8d9cf356c920ac796f81919726c264eb9b1ba71bc0edb4eaa49eaf56ad
|
Provenance
The following attestation bundles were made for cgh_vision-0.1.0.tar.gz:
Publisher:
release.yml on altikva/cgh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cgh_vision-0.1.0.tar.gz -
Subject digest:
e41f91793992ea327a3b930adfbeace7628353c2d93db461507f160bed1779d7 - Sigstore transparency entry: 2328034308
- Sigstore integration time:
-
Permalink:
altikva/cgh@41ea3e6801171d9902521b836275dc8e97404b8c -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/altikva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@41ea3e6801171d9902521b836275dc8e97404b8c -
Trigger Event:
push
-
Statement type:
File details
Details for the file cgh_vision-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cgh_vision-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5be9ea6d648dc2fdee67f2dd701c8ae75cca3c11c32b5d69a4bafd741f7206a1
|
|
| MD5 |
23d1224162f9bc95db6e1e671c98f43e
|
|
| BLAKE2b-256 |
7323975cc68ae359333592aff875aa86489346df49b9e0051b0a3f1b5e5dc43a
|
Provenance
The following attestation bundles were made for cgh_vision-0.1.0-py3-none-any.whl:
Publisher:
release.yml on altikva/cgh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cgh_vision-0.1.0-py3-none-any.whl -
Subject digest:
5be9ea6d648dc2fdee67f2dd701c8ae75cca3c11c32b5d69a4bafd741f7206a1 - Sigstore transparency entry: 2328034344
- Sigstore integration time:
-
Permalink:
altikva/cgh@41ea3e6801171d9902521b836275dc8e97404b8c -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/altikva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@41ea3e6801171d9902521b836275dc8e97404b8c -
Trigger Event:
push
-
Statement type: