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.
- Portable Package (Recommended): Download the portable build from Releases.
- Windows: No requirements.
- Linux / macOS: Requires Python 3.10+ 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.12.0+cu130 torchvision==0.27.0+cu130 --extra-index-url https://download.pytorch.org/whl/cu130 # or pip install torch==2.12.0 torchvision==0.27.0 (macOS) pip install -r requirements.txt
For additional information, see Installation.
- Web UI: In Database Management, enter a directory path and click Add Folder.
- CLI:
python build_db.py --model_path "google/siglip2-so400m-patch16-512" --db_path "img_db/siglip2_so400m" --add "path/to/images"
- Sync Changes: Click Update/Sync in the Web UI, or pass
--updatevia CLI to rescan indexed folders for additions or deletions.
- Text Search: Enter a description (e.g., "an orange and black butterfly") to retrieve matching media ranked by similarity.
- Reverse Image Search: Upload an image to find visually similar files, or combine text and image inputs to refine results.
- Find Duplicates: In the Find Duplicates tab, select an indexed folder and set a similarity threshold to surface duplicate pairs.
- Access Restriction (Optional): By default, the Gradio gallery can display images from any indexed directory. Set
LOCALLENS_ALLOWED_PATHSin your environment to restrict accessible directories.
- 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 pairs by similarity threshold
- Models: Vision embedding backbones (SigLIP 2, MetaCLIP, DFN-CLIP, CLIP)
- Formats: Image and video support (jpg, png, webp, mp4, mkv, etc.)
- Interfaces: Web UI (Gradio) and CLI
LocalLens is open-source and free. If it saves you time finding photos or cleaning up duplicate images, consider supporting its development!
- License: Apache-2.0 (see LICENSE)
- Author: grinnch
- Inspired by: Where's My Pic? by Om-Alve
