LLMImageIndexer is an intelligent image processing and indexing tool that leverages local AI to generate comprehensive metadata for your image collection. This tool uses advanced language models to analyze images and create rich, descriptive metadata without sending any data over the internet, ensuring your privacy and data security.
- Intelligent Image Analysis: Utilizes a local AI model to generate a variable number of keywords and a description for each image.
- Metadata Enhancement: Can automatically edit image metadata with generated tags.
- Local Processing: All processing is done locally on your machine.
- Flexible Configuration: Options include number of keywords, update or write clean, custom prompt, description generation and directory traversal.
- User-Friendly GUI: Includes a GUI and installer. Relies on Koboldcpp, a single executable, for all AI functionality. No Python dependency hell!
- Multi-Format Support: Handles a wide range of image formats, including JPEG, PNG, TIFF, RAW.
- GPU Acceleration: Will use Apple Metal or Nvidia CUDA capable hardware if available to greatly speed inference.
- Cross-Platform: Supports Windows, macOS (including ARM), and Linux.
- Python 3.7 or higher
- ExifTool
- KoboldCPP
-
Clone the repository or download the ZIP file and extract it.
-
Install Python for Windows.
-
Install ExifTool:
- Option 1: Use the installer
- Option 2: Download the executable, extract it, and place it in the LLMImageIndexer folder
-
Download KoboldCPP.exe and place it in the LLMImageIndexer folder. If it is not named KoboldCPP.exe, rename it to KoboldCPP.exe
-
Run
llmii-run.bat
and wait for the model weights to download and KoboldCPP to start. The one of the terminal windows will sayPlease connect to custom endpoint at http://localhost:5001
when it is ready.
-
Clone the repository or download and extract the ZIP file.
-
Install Python 3.7 or higher if not already installed. You can use Homebrew:
brew install python
-
Install ExifTool:
brew install exiftool
-
The KoboldCPP binary for macOS ARM is included in the repository. If you're using an Intel Mac, you will need to compile according to the documentation on the KoboldCPP repo.
-
Open a terminal in the LLMImageIndexer folder and run:
chmod +x koboldcpp-mac-arm64 ./llmii-run.sh
-
Clone the repository or download and extract the ZIP file.
-
Install Python 3.7 or higher if not already installed. Use your distribution's package manager, for example on Ubuntu:
sudo apt-get update sudo apt-get install python3 python3-pip
-
Install ExifTool. On Ubuntu:
sudo apt-get install libimage-exiftool-perl
-
Download the appropriate KoboldCPP binary for your Linux distribution from KoboldCPP releases and place it in the LLMImageIndexer folder.
-
Open a terminal in the LLMImageIndexer folder and run:
chmod +x koboldcpp-linux-x64 ./llmii-run.sh
For all platforms, the script will set up the Python environment, install dependencies, and download necessary model weights (6GB total). This initial setup is performed only once and will take a few minutes depending on your download speed.
-
Ensure KoboldCPP is running. Wait until you see the following message in the KoboldCPP window:
Please connect to custom endpoint at http://localhost:5001
-
Launch the LLMImageIndexer GUI:
- On Windows: Run
python llmii-gui.py
- On macOS/Linux: Run
python3 llmii-gui.py
- On Windows: Run
-
Configure the indexing settings in the GUI:
- Select the target image directory
- Set the API URL (default: http://localhost:5001)
- Choose metadata tags to generate (keywords, descriptions)
- Set additional options (crawl subdirectories, backup files, etc.)
-
Click "Run Image Indexer" to start the process.
-
Monitor the progress in the output area of the GUI.
- Directory: Target image directory (includes subdirectories by default)
- API URL: KoboldCPP API endpoint (change if running on another machine)
- API Password: Set if required by your KoboldCPP setup
- Image Instruction: Customize the prompt for image analysis
- Don't crawl subdirectories: Disable scanning of subdirectories
- Don't make backups before writing: Skip creating backup files
- Pretend mode: Simulate processing without writing to files
- Keywords: Choose to clear and write new keywords or update existing ones
- Number of keywords: Set the number of keywords to generate
- Generate and set description: Enable description generation
- If you encounter issues with ExifTool, ensure it's properly installed and accessible in your system PATH.
- Make sure KoboldCPP is running and the API URL in the GUI matches the KoboldCPP endpoint.
- Check the output area in the GUI for error messages and warnings.
- On macOS or Linux, if you get a "permission denied" error when running KoboldCPP, make sure you've made the binary executable with
chmod +x
.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is designed for personal use and should be used responsibly. Always ensure you have the right to modify and tag the images you process.