A Python CLI application to generate and embed metadata in images for Adobe Stock using LMStudio for VLM integration.
- Generate image metadata (title, description, keywords) using a local VLM via LMStudio
- Output JSON metadata adhering to Pydantic schema
- Embed metadata into image files (EXIF, XMP) using exiftool
- Python 3.10+
- exiftool - Command line tool for reading and writing metadata
- LMStudio - For local VLM integration
# Install Python dependencies
pip install -r requirements.txt
# Ensure exiftool is installed
# macOS: brew install exiftool
# Linux: apt-get install libimage-exiftool-perl
# Windows: Download from https://exiftool.org/You can run the application using the provided wrapper script:
# Process single image
python run.py <image_path>
# Process all images in a directory
python run.py <directory_path>
# Control verbosity (0=ERROR, 1=WARNING, 2=INFO, 3=DEBUG)
python run.py <path> -v 2
# Minimize output, showing only errors
python run.py <path> --quietAlternatively, you can use the Python module syntax:
python -m src.main <image_path> -v 2├── README.md
├── config.py
├── requirements.txt
└── src/
├── core/
│ ├── image_embedder.py
│ └── metadata_extractor.py
├── main.py
├── models/
│ └── image_metadata.py
└── utils/
└── file_operations.py