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.1.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.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: memini_vision-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5b27e6c3963ab3f5a6f107585214b6deb9756f0da8660061e50981213e66bc18
MD5 1490c55040fe95c7a709d4f0dd032d1c
BLAKE2b-256 2b54af7e72f17bd675f9b2c4fd8d5dfb35f6c275579ee69537eb12fcb6848b8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for memini_vision-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: memini_vision-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6033915fb6b008eb7887db3b0559a8ec2634f535c597554bd5e76493a3936cf
MD5 cce4f6750b2bf74d73189d32e097de22
BLAKE2b-256 bff3b4e0e475c349c35d3ac939ad258eeb8b331e971bf63852c52c35a498607d

See more details on using hashes here.

Provenance

The following attestation bundles were made for memini_vision-0.1.1-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