AI-Driven Image Metadata Enrichment Tool
Project Overview
This Python-based project leverages AI to automatically generate metadata for images, facilitating easier uploads to stock photo websites and metadata enrichment for Photoshop Lightroom imports. The workflow includes downsizing images, processing them with the ChatGPT-4 model, and embedding the generated metadata (EXIF and IPTC) into the corresponding image files.
Key Features
- Image Downscaling: Reduces image size to save bandwidth and reduce API token usage.
- Metadata Generation: Uses ChatGPT-4 to generate titles, keywords, filenames, and categories.
- EXIF AND IPTC Embedding: Embeds EXIF and IPTC metadata in the image files.
- Bulk Processing: Handles multiple images simultaneously, increasing efficiency.
- Photo Library Integration: Prepares images for seamless import into Photoshop Lightroom Library and potential upload to stock photo platforms.
Workflow
- Image Input: Accepts JPG or PNG image files.
- Image Downscaling: Reduces the resolution of images to optimize for API usage.
- Base64 Encoding: Converts the image to a base64 string.
- AI Processing: Sends the base64 string to ChatGPT-4 to obtain metadata.
- Metadata Storage: Embeds the received metadata (title, keywords, filename, category) into the image’s EXIF and IPTC tags.
- Image Output: Generates new image files ready for Photoshop Lightroom Imports or upload to stock photo websites
Technologies Used
- Language: Python
- 3rd-Party Modules requests, piexif, PillowImage, IPTCInfo