Skip to content

KomoriNoKage/metadata-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Metadata Generator

A Python CLI application to generate and embed metadata in images for Adobe Stock using LMStudio for VLM integration.

Features

  • 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

Installation

Prerequisites

  • Python 3.10+
  • exiftool - Command line tool for reading and writing metadata
  • LMStudio - For local VLM integration

Setup

# 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/

Usage

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> --quiet

Alternatively, you can use the Python module syntax:

python -m src.main <image_path> -v 2

Project Structure

├── README.md
├── config.py
├── requirements.txt
└── src/
    ├── core/
    │   ├── image_embedder.py
    │   └── metadata_extractor.py
    ├── main.py
    ├── models/
    │   └── image_metadata.py
    └── utils/
        └── file_operations.py

About

A Python CLI tool for generating and embedding image metadata with VLM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages