Skip to content
Projects

meangrinch/LocalLens has 32 GitHub stars and 5 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-15 04:25 UTC. Last push 2026-10-23.

How these counts are measured

32 stars5 Forks +1 in 24h

What you can do

  • Indexing: Recursive directory indexing and incremental sync (ChromaDB)
  • Search: Natural language text, image, and combined text + image queries
  • Reverse Search: Find visually similar media from an uploaded image
  • Duplicates: Locate duplicate and near-duplicate image and video pairs by similarity threshold

Measured star growth

in 24h
+1
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Local image search engine powered by AI

Developer Tools

README.md

Original

English | 简体中文

LocalLens Logo
LocalLens

An offline visual search engine for local image and video collections. Indexes directories into ChromaDB using vision embedding models to enable natural language queries and reverse image search, with added duplicate detection.

LocalLens UI Screenshot

Quick Setup

1. Download

  • Portable Package (Recommended): Download the portable build from Releases.
    • Windows: No requirements.
    • Linux / macOS: Requires Python 3.11+ and Git.
  • From Source:
    git clone https://github.com/meangrinch/LocalLens.git
    cd LocalLens
    python -m venv venv
    .\venv\Scripts\activate # or source venv/bin/activate (Linux/macOS)
    pip install torch==2.14.1+cu130 torchvision==0.29.1+cu130 --extra-index-url https://download.pytorch.org/whl/cu130 # or pip install torch==2.14.1 torchvision==0.29.1 (macOS)
    pip install -r requirements.txt
    

For additional information, see Installation.

2. Index

  • Web UI: In Database Management, enter a directory path and click Add Folder.
  • CLI:
    python build_db.py --model_path "google/embeddinggemma-2" --db_path "img_db/embeddinggemma_2" --add "path/to/images"
    
  • Sync Changes: Click Update/Sync in the Web UI, or pass --update via CLI to rescan indexed folders for additions or deletions.
  • Image Detail (EmbeddingGemma 2): Pick an Image Detail level from 70 to 1120 soft tokens below Select Model (default 280). Higher values see finer detail but index slower. Each value keeps its own index, so add your folders again after changing it. Via CLI, add --max_soft_tokens 140 with a matching --db_path such as img_db/embeddinggemma_2_140.

3. Search

  • Text Search: Enter a description (e.g., "a monarch butterfly") to retrieve matching media ranked by similarity. Enable Live Search in Advanced Parameters to update results as you type.
  • Reverse Image Search: Upload an image to find visually similar files, or combine text and image inputs to refine results.
  • Find Duplicates: In Find Duplicates, choose a Folder to Scan and set the Similarity Threshold, then review the pairs in the Duplicate Inspector tab.
  • Access Restriction (Optional): By default, the Gradio gallery can display images from any indexed directory. Set LOCALLENS_ALLOWED_PATHS in your environment to restrict accessible directories.

Features

  • Indexing: Recursive directory indexing and incremental sync (ChromaDB)
  • Search: Natural language text, image, and combined text + image queries
  • Reverse Search: Find visually similar media from an uploaded image
  • Duplicates: Locate duplicate and near-duplicate image and video pairs by similarity threshold
  • Models: Vision embedding backbones (EmbeddingGemma 2, SigLIP 2)
  • Formats: Image and video support (jpg, png, webp, mp4, mkv, etc.)
  • Interfaces: Web UI (Gradio) and CLI

Documentation


Support the Project

LocalLens is open-source and free. If it saves you time finding photos or cleaning up duplicate images, consider supporting its development!

Support on Ko-fi


License & Credits

ML Models and Libraries