Skip to content

stevenvanassche/Lumina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lumina - AI Photo Metadata Pipeline

Status: Version 1.1.0 - Production Release

AI-powered photo analysis pipeline that extracts EXIF metadata, detects objects, classifies species, and writes results to XMP sidecar files compatible with Adobe Lightroom Classic, On1 PhotoRAW, Immich and other photo management software.

Docker Hub: https://hub.docker.com/r/stevenvanassche/lumina
GitHub: https://github.com/stevenvanassche/Lumina

Features

  • πŸ” EXIF Extraction - Camera metadata, GPS coordinates, exposure settings
  • 🎯 Object Detection - RT-DETR detection (COCO + Objects365 dataset)
  • 🦜 Species Classification - iNaturalist 21 model (10,000 species)
  • πŸ“ XMP Sidecar Files - Non-destructive metadata storage
  • ⚑ GPU Acceleration - 10x faster processing with NVIDIA GPU
  • πŸ”„ Resumable Processing - Checkpoint-based pipeline for large collections
  • 🐳 Easy Deployment - Single docker-compose command to start
  • πŸ‘οΈ Watch Mode (New in v1.1) - Continuous monitoring for new photos
  • πŸ“· RAW+JPEG Pairing (New in v1.1) - Smart pairing of RAW and JPEG files

Quick Start

πŸ“– Installation Guide - Complete setup instructions with platform-specific details

TL;DR for experienced users:

# Create project directory
mkdir -p lumina-docker/{photos,cache} && cd lumina-docker

# Download docker-compose.yml
curl -o docker-compose.yml https://raw.githubusercontent.com/stevenvanassche/Lumina/master/docker/docker-compose.yml

# Create basic .env file
cat > .env << EOF
PHOTOS_PATH=./photos
CACHE_PATH=./cache
EOF

# Add your photos to the photos/ directory, then run:
docker compose --profile cpu up    # CPU mode (~1 photo/sec)
docker compose --profile gpu up    # GPU mode (~10 photos/sec, requires NVIDIA GPU + WSL2 on Windows)

# NEW in v1.1: Watch mode - continuously monitor for new photos
LUMINA_WATCH_MODE=on docker compose --profile cpu up

First Run: Models download automatically (~2.5GB, 5-15 minutes)

⚠️ Windows GPU Users: WSL2 is required for GPU acceleration. See the Installation Guide for setup instructions.

Example Output

XMP Sidecar File

<dc:subject>
  <rdf:Seq>
    <rdf:li>COCO Detection</rdf:li>
    <rdf:li>bird</rdf:li>
    <rdf:li>Inat21</rdf:li>
    <rdf:li>European Starling</rdf:li>
  </rdf:Seq>
</dc:subject>

<lr:hierarchicalSubject>
  <rdf:Seq>
    <rdf:li>COCO Detection|bird</rdf:li>
    <rdf:li>Inat21|bird|European Starling</rdf:li>
  </rdf:Seq>
</lr:hierarchicalSubject>

Compatible Software

βœ… Validated:

  • On1 PhotoRAW - Full hierarchical keyword support (JPEG files with or without RAW files)
  • Immich - External Libraries with XMP sidecar import (JPEG files)
  • Adobe Lightroom Classic - Full hierarchical keyword support (RAW files required)

βœ… Expected:

  • Capture One
  • Photo Mechanic
  • digiKam
  • ACDSee

πŸ“– Integration Guides: See Installation Guide for detailed setup instructions for each platform.

Requirements

All Platforms

  • Docker & Docker Compose (version 20.10 or newer)
  • Disk Space: ~2.5GB for AI models + storage for photos

CPU Mode

  • RAM: 16GB+ recommended
  • Performance: ~1 photo/second

GPU Mode (Optional - 10x faster)

  • GPU: NVIDIA GPU with 6GB+ VRAM (RTX series recommended)
  • Drivers: NVIDIA drivers version 525.60 or newer
  • Platform-Specific:
    • Linux: NVIDIA Container Toolkit required
    • Windows: WSL2 required (automatic GPU passthrough via Docker Desktop)
    • macOS: Not supported (Apple Silicon/AMD GPUs incompatible with CUDA)
  • Performance: ~10 photos/second (RTX 5090)

πŸ“– Detailed Requirements: See Installation Guide for platform-specific setup instructions

Configuration

Basic configuration via .env file:

Variable Description
PHOTOS_PATH Directory containing your photos (required)
CACHE_PATH Directory for models, checkpoints, and logs (required)
LUMINA_WORKERS Number of parallel workers (default: 2 CPU, 1 GPU)
LUMINA_BATCH_SIZE Photos per batch (default: 5 CPU, 10 GPU)
LUMINA_LOG_LEVEL Logging level: DEBUG, INFO, WARNING, ERROR (default: INFO)
LUMINA_EXECUTION_MODE Processing mode: quick_scan/normal_scan/force_update (default: normal_scan)
LUMINA_WATCH_MODE Watch mode: on/off (default: off) (New in v1.1)
LUMINA_MODEL_IDLE_TIMEOUT Model unload timeout: auto/disabled/ (default: auto) (New in v1.1)
LUMINA_WATCH_IDLE_EXIT Auto-exit after N seconds idle, 0=disabled (default: 0) (New in v1.1)
LUMINA_RAW_SUPPORT RAW file handling: on/off/only (default: on) (New in v1.1)

Example .env for CPU mode:

PHOTOS_PATH=./photos
CACHE_PATH=./cache
LUMINA_WORKERS=2
LUMINA_BATCH_SIZE=5

Example .env for GPU mode:

PHOTOS_PATH=./photos
CACHE_PATH=./cache
LUMINA_WORKERS=1
LUMINA_BATCH_SIZE=10
LUMINA_PARALLEL_BATCHES=3

Example .env for Watch mode (continuous monitoring):

PHOTOS_PATH=./photos
CACHE_PATH=./cache
LUMINA_WATCH_MODE=on
LUMINA_MODEL_IDLE_TIMEOUT=auto   # auto = unload after 300s idle in watch mode

Example .env to disable RAW support (JPEG-only mode):

PHOTOS_PATH=./photos
CACHE_PATH=./cache
LUMINA_RAW_SUPPORT=off   # Disable RAW+JPEG pairing (default is on)

πŸ“– Complete Configuration Reference: See Installation Guide for all environment variables, performance tuning, and advanced options.

Performance Benchmarks

Tested on 1627 photos with EXIF β†’ RT-DETR β†’ iNat21 β†’ XMP Writer pipeline.

CPU Mode

  • Throughput: 1.14 photos/sec
  • Time: ~23.7 minutes for 1627 photos

GPU Mode (RTX 5090)

  • Throughput: 10.74 photos/sec
  • Time: ~2.5 minutes for 1627 photos
  • Speedup: 10x faster than CPU

Supported Image Formats

Standard formats:

  • JPEG (.jpg, .jpeg)
  • PNG (.png)

RAW formats (enabled by default in v1.1):

  • Nikon (.nef)
  • Canon (.cr2, .cr3)
  • Sony (.arw)
  • Adobe (.dng)
  • Fujifilm (.raf)
  • Olympus (.orf)
  • Panasonic (.rw2)

RAW+JPEG Pairing: When enabled, Lumina intelligently pairs RAW and JPEG files with the same base filename (e.g., IMG_001.jpg + IMG_001.nef). The JPEG is used for faster AI analysis, and one XMP sidecar is created for the pair.

⚠️ RAW Format Limitations: Lumina uses LibRaw for RAW processing. Some newer formats like Nikon Z9 High Efficiency (HE/HE*) are not yet supported. For unsupported formats, shoot RAW+JPEG and enable pairing mode.

Note: XMP sidecar files are only created when objects or species are detected in the photo. Photos without any detections will not have an XMP file generated.

⚠️ Existing XMP Files: Lumina will merge AI-generated keywords with existing XMP metadata. This feature is still being tested - backup your XMP files before processing photos with existing metadata.

⚠️ JSON Format: JSON metadata files are provided for advanced integrations, but the structure may change in future versions. Build integrations with schema flexibility in mind.

License

This software is proprietary. The Docker images are provided for evaluation and non-commercial use.

Usage Rights

Use Case Allowed Requirements
Personal use βœ… Yes Free
Educational/Research βœ… Yes Free
Commercial use ❌ No Requires commercial license

Important License Notes

iNaturalist 21 Model Restriction:

  • The iNat21 species classification model is licensed under CC BY-NC 4.0 (Non-Commercial)
  • This restricts the entire pipeline to non-commercial use only
  • Commercial users must disable iNat21 and use alternative classification models

RT-DETR Object Detection:

  • Licensed under Apache 2.0 (commercial-friendly)
  • Can be used commercially when iNat21 is disabled

For Commercial Use

Commercial licensing is available for organizations wanting to use Lumina in production.

Contact: info@lumina.photo

See LICENSE for complete terms.

Support

Changelog

See CHANGELOG.md for version history.

Credits

This project uses the following AI models:

Built with:

  • PyTorch (BSD-3)
  • Ray (Apache 2.0) - Distributed computing
  • Transformers (Apache 2.0) - HuggingFace
  • timm (Apache 2.0) - PyTorch Image Models

Built with ❀️ for wildlife photographers and photo enthusiasts

About

AI-powered local photo tagging: auto-detect 10,000+ species & objects, generate XMP sidecars for Lightroom/On1/Immich. 100% private, GPU accelerated, Docker-based.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors