Skip to content

LrGenius/LrGeniusAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

103 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟 LrGeniusAI

A smart Lightroom Classic plugin for AI-powered tagging, describing, and semantic image search.

Lua Python Website


📖 About the Project

LrGeniusAI brings the power of modern Large Language Models (LLMs) directly into Adobe Lightroom Classic. It analyzes your photos, automatically generates accurate tags and detailed descriptions, and lets you rediscover your library with a semantic free-text search using natural language.

Whether you prefer running local models to ensure maximum privacy or want to leverage powerful cloud APIs, LrGeniusAI seamlessly adapts to your photography workflow.


✨ Core Features

  • 🤖 AI-Powered Tagging & Describing: Uses advanced LLMs to accurately recognize image content, generate metadata, and provide detailed descriptions of your photos.
  • 🔍 Semantic Free-Text Search (Advanced Search): Find images naturally through descriptive queries (e.g., "Red sports car parked in front of a garage" or "Sunset over the mountains"). LrGeniusAI automatically creates a relevance-sorted Collection in Lightroom based on your prompt.
  • ☁️ Local & Cloud Models: Full support for local AI models via Ollama and LM Studio, as well as integration with cloud providers like Google Gemini and Vertex AI.
  • 🎨 Customizable Prompts & Temperature Control: System prompts for the AI can be added, edited, and deleted directly within the Lightroom Plug-In Manager. Use the temperature slider to control whether the AI should be highly creative or strictly consistent.
  • 📝 Photo Context (Contextual Info): Provide manual hints to the AI before analysis (e.g., names of people or specific background details) that aren't immediately obvious from the image itself. This can be done via a popup dialog or directly in Lightroom's metadata panel.
  • 🗄️ Custom Python Backend & Database: The plugin utilizes a high-performance local server (geniusai-server). Existing metadata from your Lightroom catalog can easily be imported prior to the first AI analysis.

🚀 Installation & Getting Started

  1. Download the latest release from the GitHub Releases page.
  2. Extract the ZIP file and add the plugin via the Plug-in Manager in Lightroom Classic.
  3. Backend Server Setup (First Launch):
    • Windows: Navigate to the lrgenius-server folder and run lrgenius-server.exe. If a SmartScreen warning appears, click More info -> Run anyway.
    • macOS: Open the Terminal, navigate to the extracted folder, and run the following commands to bypass Gatekeeper restrictions:
      chmod +x lrgenius-server/lrgenius-server
      xattr -dr com.apple.quarantine lrgenius-server
  4. Select your photos in the library and choose from the menu: Library -> Plug-in Extras -> Analyze & Index photos.

For comprehensive details, model setup guides, and tips, please visit lrgenius.com/help.


⚠️ Breaking Change: photo_id Migration

Recent versions switched the backend identity key from Lightroom catalog UUIDs to file-based photo_id values. The stable ID algorithm was later adjusted to remain stable when metadata is written to files (for example DNG updates).

If you upgrade from an older version, run a one-time migration to keep existing index/search data usable.

Recommended migration path (from Lightroom)

  1. Open File -> Plug-in Manager
  2. Open LrGeniusAI settings
  3. In Backend Server, click Migrate existing DB IDs to photo_id
  4. Wait until the progress dialog is complete

The migration updates all relevant backend collections:

  • main image embeddings
  • vertex embeddings
  • face/person references

Identity scope note

The current photo_id / hash / derived canonicalId strategy is more stable than Lightroom catalog UUIDs, but it is still not guaranteed to be 100% cross-catalog safe in every workflow.

Treat backend identity as best-effort and primarily catalog-scoped for now, especially when:

  • the same files exist in multiple Lightroom catalogs
  • files were duplicated, re-exported, or rewritten outside Lightroom
  • the plugin had to fall back to partial file hashes because stable metadata IDs were unavailable

If strict cross-catalog identity is important for your workflow, plan for re-indexing or migration checks when moving photos between catalogs or restoring older databases.


☁️ Google Vertex AI Login (gcloud)

If you want to use Vertex AI with LrGeniusAI, run the login on the machine where geniusai-server is running.

macOS

  1. Install Google Cloud CLI (if needed):
    https://cloud.google.com/sdk/docs/install
  2. Open Terminal and run:
gcloud init
gcloud config set project YOUR_PROJECT_ID
gcloud auth application-default login
  1. Optional verification:
gcloud auth application-default print-access-token

Windows (PowerShell)

  1. Install Google Cloud CLI (if needed):
    https://cloud.google.com/sdk/docs/install
  2. Open Google Cloud SDK Shell (or PowerShell with gcloud in PATH) and run:
gcloud init
gcloud config set project YOUR_PROJECT_ID
gcloud auth application-default login
  1. Optional verification:
gcloud auth application-default print-access-token

Remote backend with Docker Compose

If your backend runs as a remote Docker container, authenticate inside the container and persist the Google Cloud CLI state with the bind mount in server/docker-compose.yml.

  1. Open a shell on the server and go to the backend folder:
cd server
mkdir -p gcloud
docker compose up -d --build
  1. Set the Vertex project inside the running container:
docker compose exec geniusai-server gcloud config set project YOUR_PROJECT_ID
  1. Login for Application Default Credentials (ADC):
docker compose exec geniusai-server gcloud auth application-default login
  1. Optional verification:
docker compose exec geniusai-server gcloud auth application-default print-access-token

For headless SSH hosts without a browser, use:

docker compose exec geniusai-server gcloud auth application-default login --no-browser

Then follow the remote bootstrap flow shown by gcloud on a second trusted machine that has a browser and Google Cloud CLI installed.

Notes

  • gcloud auth application-default login creates local Application Default Credentials (ADC).
  • In Docker Compose, the bind mount ./gcloud:/root/.config/gcloud keeps ADC and the active gcloud project across container restarts and rebuilds.
  • Set Vertex AI Project ID and Vertex AI Location in the Lightroom plugin settings.
  • Do not set GOOGLE_APPLICATION_CREDENTIALS when you want the container to use ADC created by gcloud auth application-default login.
  • For headless/server deployments, prefer service-account auth via GOOGLE_APPLICATION_CREDENTIALS.

🛠️ Tech Stack

  • Frontend / Lightroom Plugin: Lua
  • Backend / Server: Python (geniusai-server)
  • AI & Embedding: Open-CLIP
  • Supported Interfaces: Gemini, Vertex AI, Ollama, LM-Studio

🤝 Credits

Developed with a passion for photography and IT by:

  • Bastian Machek (LrGenius / Fokuspunk)Creator & Lead Developer
  • AI agents

A huge thank you to the open-source community and the developers of the underlying AI frameworks that make this integration possible!

About

A Lightroom classic plugin that uses LLMs to tag and describe images. Additionally provides a semantic free-text image search.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages