Skip to main content

Shared vision library for image storage, CLIP embedding, and cross-modal search

Project description

memini-vision

Shared vision library used by both videre-mcp (the MCP server that exposes vision tools to agents) and memini-ai-dev (the semantic memory server that fuses image results into its existing RRF). Owns image storage, CLIP embedding, the memories_image table CRUD, and cross-modal query logic.

No FastMCP, no CLI, no HTTP server. Library only — the two consuming servers register their own tools.

Install

pip install memini-vision

Environment variables

Variable Default Description
MEMINI_IMAGE_SEARCH_ENABLED false Master kill-switch (consumer checks flag)
MEMINI_IMAGE_CLIP_MODEL clip-ViT-B-32 clip-ViT-B-32 or clip-ViT-L-14
MEMINI_IMAGE_CLIP_DEVICE auto auto, cpu, or cuda
MEMINI_IMAGE_DIR ~/.memini-ai/images Filesystem image storage root
MEMINI_IMAGE_MAX_FILE_SIZE 10485760 Max image file size in bytes (10MB)
MEMINI_IMAGE_DB_URL (empty) PostgreSQL connection string (falls back to MEMINI_DB_URL)

Quickstart

from memini_vision import VisionConfig, ImageStore, ClipEmbedder, ImageIndex, ImageQuery

cfg = VisionConfig()                     # reads MEMINI_IMAGE_* env vars
store = ImageStore(cfg.image_dir)        # filesystem sharded storage
embedder = ClipEmbedder(cfg.clip_model, cfg.clip_device)
index = ImageIndex(cfg.db_url)           # asyncpg pool, memories_image CRUD
query = ImageQuery(embedder, index)       # cross-modal CLIP search

# Encode + store an image (lazy model load on first call)
vec = embedder.encode_image(pil_image)    # list[float], zero-padded to 768 for B/32
record = await index.insert(memory_id, sha256, vec, file_path, mime_type)
results = await query.search_by_text("terminal traceback", limit=5)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memini_vision-0.1.0.tar.gz (129.6 kB view details)

Uploaded Source

Built Distribution

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

memini_vision-0.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file memini_vision-0.1.0.tar.gz.

File metadata

  • Download URL: memini_vision-0.1.0.tar.gz
  • Upload date:
  • Size: 129.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memini_vision-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b67abc81cd0d15ecb0a88b28b0c37f13bf20ba374944eed83c9c1d0f6dc0eab
MD5 c8c12ccd0bfbefa22e42f14b31e35042
BLAKE2b-256 a1cb9ad7faa214a39faaf21af7dcfc5ad46a34c3f9a529017656c1eeed417e9a

See more details on using hashes here.

Provenance

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

Publisher: pypi-release.yml on Veedubin/memini-vision

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

File details

Details for the file memini_vision-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: memini_vision-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memini_vision-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b1185de412ed6fd28066167c5c87c07999456fde94ce95ffa2993a6a95ccfe7
MD5 11c5200d1df4400e32e2000202b493d4
BLAKE2b-256 06977004ad1d68a4a207221212b2a5ceed71037b0c94217f52f5f73bbabdfded

See more details on using hashes here.

Provenance

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

Publisher: pypi-release.yml on Veedubin/memini-vision

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

Supported by

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