Skip to main content

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

  1. Inventory (non-directive: an image is never assumed to be a diagram; a logo or a photo costs one call and one summary line).
  2. 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.
  3. Table / chart / text extractors as routed.
  4. 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_identity findings 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

cgh_vision-0.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cgh_vision-0.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

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

Hashes for cgh_vision-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e41f91793992ea327a3b930adfbeace7628353c2d93db461507f160bed1779d7
MD5 427f480f447174055348b62821f7141e
BLAKE2b-256 732e3a8d9cf356c920ac796f81919726c264eb9b1ba71bc0edb4eaa49eaf56ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for cgh_vision-0.1.0.tar.gz:

Publisher: release.yml on altikva/cgh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for cgh_vision-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5be9ea6d648dc2fdee67f2dd701c8ae75cca3c11c32b5d69a4bafd741f7206a1
MD5 23d1224162f9bc95db6e1e671c98f43e
BLAKE2b-256 7323975cc68ae359333592aff875aa86489346df49b9e0051b0a3f1b5e5dc43a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cgh_vision-0.1.0-py3-none-any.whl:

Publisher: release.yml on altikva/cgh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page