AI-powered keyword tagging assistant for Adobe Lightroom Classic
Project description
Lightroom AI Tagger
An intelligent tagging assistant for Adobe Lightroom Classic that uses OpenAI's CLIP model to automatically generate relevant keywords for your photos.
Features
- Automatically analyze images in your Lightroom catalog using CLIP neural network
- Generate relevant keywords based on image content
- Update XMP sidecar files with AI-generated keywords while preserving existing ones
- Configurable confidence threshold and maximum keywords per image
- Supports common RAW formats (NEF, CR2, ARW) and JPEGs
- Uses the Foundation List 2.0.1 keyword hierarchy for consistent tagging
Requirements
- Python 3.8+
- Adobe Lightroom Classic
- PyTorch
- transformers
- Pillow
- sqlite3
Installation
You can install lr-autotag directly from PyPI:
pip install lr-autotag
Or, for development:
- Clone this repository:
git clone https://github.com/yourusername/lr-autotag.git
cd lr-autotag
- Install with UV in development mode:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
- Download the Foundation List file and place it in the project directory.
Usage
-
Close Lightroom Classic if it's running
-
Modify the catalog path in the script to point to your Lightroom catalog:
catalog_path = "path/to/your/catalog.lrcat"
- Run the script:
python lightroom-tagger.py
The script will:
- Scan your Lightroom catalog for images
- Generate AI keywords for each image
- Create or update XMP sidecar files with the new keywords
- Save a JSON report of all suggestions
Important Notes
- Always ensure you have enough disk space for catalog backups
- Backup files are not automatically cleaned up - you may want to periodically remove old backups
- The backup process might take a few moments for large catalogs
Configuration
You can adjust these parameters in the script:
threshold: Confidence threshold for keyword suggestions (default: 0.5)max_keywords: Maximum number of keywords per image (default: 20)max_size: Maximum image dimension for processing (default: 1024)
How It Works
- The script connects to your Lightroom catalog's SQLite database to get image locations
- Each image is processed through the CLIP neural network
- The image embeddings are compared against pre-computed embeddings of the Foundation List keywords
- Keywords with similarity scores above the threshold are selected
- The keywords are written to XMP sidecar files that Lightroom can read
Safety Features
Catalog Backup
Before any operations that access the Lightroom catalog, the tool automatically creates a timestamped backup of your catalog file. The backup is stored in the same directory as your original catalog with the format: [original_name]_YYYYMMDD_HHMMSS.backup.
If the backup process fails for any reason, the tool will not proceed with catalog operations to ensure your data's safety.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- OpenAI's CLIP model
- The Digital Photography School Foundation List[https://lightroom-keyword-list-project.blogspot.com/]
- Adobe Lightroom Classic SDK documentation
Disclaimer
This tool is not affiliated with or endorsed by Adobe. Use at your own risk and always backup your Lightroom catalog before using any third-party tools.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lr_autotag-0.1.0.tar.gz.
File metadata
- Download URL: lr_autotag-0.1.0.tar.gz
- Upload date:
- Size: 76.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5357937bedc031ed3a54aa84c81004c741c6e540da927ae08f831e657eeb4cc3
|
|
| MD5 |
5e34e73b62143f414958d620ca3724c3
|
|
| BLAKE2b-256 |
dddb9d2447e35ffa5458b6327cba7fd54d36828cbcb47d9493c502de1d942af8
|
Provenance
The following attestation bundles were made for lr_autotag-0.1.0.tar.gz:
Publisher:
python-publish.yml on Jsakkos/lightroom-autotag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lr_autotag-0.1.0.tar.gz -
Subject digest:
5357937bedc031ed3a54aa84c81004c741c6e540da927ae08f831e657eeb4cc3 - Sigstore transparency entry: 157577909
- Sigstore integration time:
-
Permalink:
Jsakkos/lightroom-autotag@77fe26bc3cdd60840bbea5beb4e669a1986a2b3a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Jsakkos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@77fe26bc3cdd60840bbea5beb4e669a1986a2b3a -
Trigger Event:
push
-
Statement type:
File details
Details for the file lr_autotag-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lr_autotag-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01e9893df14d7a023ffc17bee91030aa835113f3665488a3a5dd98e5fcaa7208
|
|
| MD5 |
542792045aa6c469ac2e2859136a83f5
|
|
| BLAKE2b-256 |
083dc64498b6e8782020995c0341883758f173062010bfa83c4797f1086e6a9d
|
Provenance
The following attestation bundles were made for lr_autotag-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on Jsakkos/lightroom-autotag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lr_autotag-0.1.0-py3-none-any.whl -
Subject digest:
01e9893df14d7a023ffc17bee91030aa835113f3665488a3a5dd98e5fcaa7208 - Sigstore transparency entry: 157577910
- Sigstore integration time:
-
Permalink:
Jsakkos/lightroom-autotag@77fe26bc3cdd60840bbea5beb4e669a1986a2b3a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Jsakkos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@77fe26bc3cdd60840bbea5beb4e669a1986a2b3a -
Trigger Event:
push
-
Statement type: