memery  by deepfates

Image search tool using natural language and computer vision

created 4 years ago
558 stars

Top 58.3% on sourcepulse

GitHubView on GitHub
Project Summary

Memery provides natural language and computer vision-based search for local image collections, targeting users overwhelmed by large, unorganized image folders. It enables searching with descriptive text or example images, offering a significant improvement over manual thumbnail browsing for locating specific visual content.

How It Works

Memery leverages OpenAI's CLIP (Contrastive Language-Image Pretraining) model. CLIP learns a shared latent space for images and their textual descriptions by training a vision transformer and a language transformer. This allows Memery to effectively map natural language queries to relevant images within a local dataset, facilitating semantic search.

Quick Start & Requirements

  • Installation: pip install git+https://github.com/deepfates/memery.git or pip install memery (after cloning and poetry install). Also requires pip install git+https://github.com/openai/CLIP.git.
  • Prerequisites: Python 3.9+, GPU (CPU-only requires specific PyTorch installation: pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html).
  • Usage:
    • GUI: memery serve [directory]
    • CLI: memery recall PATH/TO/IMAGE/FOLDER -t 'text_query'
    • Library: Import Memery from memery.core.
  • Links: GitHub

Highlighted Details

  • Supports searching with both text and image queries simultaneously.
  • Offers a browser-based GUI for interactive searching and a CLI for scripting.
  • Can be integrated as a Python module into other applications and notebooks.
  • Includes commands for building (encoding/indexing) and purging the image database.

Maintenance & Community

The project was initially developed by Max Anton Brewer (@deepfates), with significant contributions from @wkrettek. The primary contact for support is via GitHub Issues or direct message on Twitter.

Licensing & Compatibility

The repository does not explicitly state a license in the README. This requires clarification for commercial use or integration into closed-source projects.

Limitations & Caveats

The project is noted as not yet optimized for performance, with search times scaling linearly with dataset size (O(n)). The GUI's directory selection is basic, relying on path strings rather than a file picker. The default installation prioritizes GPU usage, requiring manual steps for CPU-only operation.

Health Check
Last commit

9 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Chenlin Meng Chenlin Meng(Cofounder of Pika), and
4 more.

clip-retrieval by rom1504

0.3%
3k
CLIP retrieval system for semantic search
created 4 years ago
updated 1 year ago
Feedback? Help us improve.