The Image Captioning Tool is a desktop application built with Flet that allows users to:
- Load images from a selected folder
- Generate AI-based captions using OpenAI's GPT-4o
- Manually edit and save captions
- Manage and apply tags to images
This tool is useful for creating descriptive captions for images, which can be used for AI training datasets, content generation, or organizing large image collections.
- Folder Selection: Load a directory of images.
- Thumbnail Navigation: Browse images via a sidebar of thumbnails.
- AI-Powered Captioning: Generate captions using OpenAI's GPT-4o.
- Manual Captioning: Edit and save captions.
- Tag Management: Add, edit, and delete tags.
- Settings Panel: Configure OpenAI API key and caption prompt.
- Dark Mode UI: Optimized for visual comfort.
Ensure you have Python installed (>=3.8) and install dependencies:
pip install flet openai python-dotenvCreate a .env file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_hereRun the application with:
python src/main.py- Click Select Folder to load images.
- Click on an image thumbnail to view it.
- Enter a caption manually or click Generate Caption.
- Save captions with the Save Caption button.
- Manage tags to organize images.
- API Key: Enter your OpenAI API key in the settings panel.
- Prompt Customization: Modify the captioning prompt in the settings panel.
- Tagging System: Edit and apply tags for image classification.
- No captions generated? Ensure your OpenAI API key is valid and has sufficient credits.
- Images not loading? Verify the folder contains image files (
.png,.jpg,.jpeg,.gif,.bmp). - Missing
.envfile? Create one and add your API key.
This project is licensed under the MIT License.
Developed by Trapper Leabo.