Skip to content

Bulk image tagging using OpenAI GPT-4 Vision

Notifications You must be signed in to change notification settings

9Somboon/bulktag

 
 

Repository files navigation

Bulk image tagging using OpenAI GPT-4 Vision

This script helps you prepare your photos and raster illustration artworks for uploading to image stocks.

The script reads every image in the directory provided and generates descriptions and keywords for each picture using GPT-4 Vision.

Demo

Click to watch! Watch the video

Installation

This project uses poetry for the dependency management. Install Poetry before you proceed to the next steps.

  1. Clone this repository
  2. Run poetry install

Usage

Generate descriptions and keywords for each image in the directory and then save the output as output.csv:

poetry run python keywords.py /path/to/directory/containing/images --openai YOUR_API_KEY

More information:

poetry run python keywords.py

Features

  • Bulk generate descriptions and keywords (tags) that best describe the picture's style, atmosphere, colors and objects
  • Shutterstock CSV support
  • Beautiful progress bar and colorful logging using Rich
  • Uses the cutting-edge GPT-4 Vision model gpt-4-vision-preview
  • Supported file formats are the same as those GPT-4 Vision supports: JPEG, WEBP, PNG
  • Budget per image: ~65 tokens
  • Provide the OpenAI API Key either as an environment variable or an argument
  • Bulk add categories
  • Bulk mark the content as mature (default: No)
  • Bulk mark the content as editorial (default: No)

Contributing

Add an issue or open a pull request on GitHub. This software is maintained by Vladimir Ignatev.

About

Bulk image tagging using OpenAI GPT-4 Vision

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%