A Windows desktop application for automatically tagging and adding metadata to JPEG images using AI-powered local image analysis with Ollama and Gemma3.
- Batch Image Processing: Process multiple JPEG images in a folder structure recursively
- AI-Powered Analysis: Leverages Ollama and Gemma3 language model for intelligent image analysis
- Multi-Language Support: Choose between German and English for image analysis and metadata generation
- Metadata Management: Automatically extracts and writes metadata to image files using XMP tags
- Flexible Processing Modes:
- Process All: Tag all images in the selected directory
- Skip Tagged: Only process images without existing keywords
- Classification Errors Only: Process only images marked with classification errors
- Settings Persistence: All preferences are automatically saved and restored on application start:
- Selected folder path
- Tagging language (German/English)
- Processing mode
- Classification error marking preference
- Possibility to mark images with classification errors for later review. Marking is done by writing
-to the image title tag. - Real-time Progress Tracking: Live updates with current file information, tags, and descriptions
- Image Preview: Visual preview of the currently processed image
- Error Handling: Mark images that fail classification for later review
- Parallel Processing: Process up to 3 images simultaneously for optimal performance
- Cancellation Support: Gracefully abort the processing at any time
This software is making changes to your image files. Make sure you made a backup in case anything goes wrong.
- Windows OS: Windows 7 or later (tested on Windows 10+)
- .NET Runtime: .NET 9.0 or later
- Ollama: A running local Ollama instance (see Installation section below)
- RAM: Minimum 8GB recommended (depending on image size and model)
- VRAM: Runs well with 10GB VRAM on a Nvidia 3080
-
Install .NET 9.0 Runtime
- Download from: https://dotnet.microsoft.com/download/dotnet/9.0
- Choose the Windows x64 Runtime option
-
Install Ollama
- Download from: https://ollama.ai
- Run the installer and follow the setup instructions
- Ollama will start automatically after installation
-
Pull the Gemma3 Model
- Open Command Prompt or PowerShell
- Run the following command:
ollama pull gemma3:12b
- Note: The first pull will download ~7.5GB. This may take 10-30 minutes depending on your internet speed
- Once complete, Ollama will serve the model at
http://localhost:11434/
-
Verify Ollama is Running
- Open your browser and navigate to:
http://localhost:11434/ - You should see a response confirming Ollama is running
- By default, Ollama runs on port 11434
- Open your browser and navigate to:
-
Clone or Download the Project
git clone <repository-url> cd TagTeam-AI-Image-Tagger
-
Build the Application
dotnet build
-
Run the Application
dotnet run
Or build for release:
dotnet publish -c Release -o ./publish
- Launch
TagTeamexecutable - Click "Select Folder" to choose the directory containing your JPEG images
- Select a processing mode:
- Process All: Process every JPEG image
- Skip Tagged Files: Only process images without keywords
- Classification Errors Only: Reprocess images marked as classification errors
- Choose a Tagging Language from the dropdown:
- German: Generates German keywords and descriptions
- English: Generates English keywords and descriptions
- Optionally check "Mark Classification Errors" to flag failed classifications with a "-" marker
- Click "Start" to begin processing
The application automatically saves your preferences when you close it. The following settings are preserved:
- Selected Folder: The last folder you processed will be pre-selected on the next launch
- Tagging Language: Your chosen language preference is remembered
- Processing Mode: The processing mode you selected is restored
- Classification Error Marking: The checkbox state is remembered
Settings are stored in:
%AppData%\TagTeam\TagTeamSettings.json
If you want to reset all settings to defaults, simply delete this file and restart the application.
- The application displays real-time progress
- Current image preview is shown on the left
- Extracted tags and descriptions are displayed in separate panels
- A log of all processed files is maintained at the bottom
- Click "Abort" to stop processing at any time
- A completion dialog shows the total number of processed files
- All images now have:
- Keywords extracted from the AI analysis
- A descriptive comment/title
- XMP metadata tags embedded in the files
The application connects to Ollama at:
- Endpoint:
http://localhost:11434/api/generate - Model:
gemma3:12b
To modify these settings, edit the ImageProcessingService.cs file:
private static readonly string OllamaEndpoint = "http://localhost:11434/api/generate";
private static readonly string ModelName = "gemma3:12b";The system prompts and user prompts for each language can be customized in ImageProcessingService.cs:
private string GetSystemPrompt(LanguageEnum language)
{
return language switch
{
LanguageEnum.German => "Du bist ein automatischer Bild-Metadaten-Generator. ...",
LanguageEnum.English => "You are an automatic image metadata generator. ...",
_ => throw new ArgumentException($"Unsupported language: {language}")
};
}
private string GetUserPrompt(LanguageEnum language)
{
return language switch
{
LanguageEnum.German => "Analysiere dieses Bild gemäß System-Schema. ...",
LanguageEnum.English => "Analyze this image according to the system schema. ...",
_ => throw new ArgumentException($"Unsupported language: {language}")
};
}To add a new language, add an entry to both methods with your desired prompts.
In ImageProcessingService.cs, you can adjust:
// Maximum concurrent image processing (default: 3)
private readonly SemaphoreSlim _parallelProcessingSemaphore = new(3, 3);
// Progress update throttle (default: 100ms for ~10 updates per second)
private const int UpdateThrottleMs = 100;
// AI model temperature (default: 0.5 - lower = more deterministic)
// Retry attempts (default: 6 total attempts with retries)User preferences are stored in JSON format. To manually reset all settings, delete the file at:
%AppData%\TagTeam\TagTeamSettings.json
- Issue: Cannot connect to Ollama
- Solution:
- Ensure Ollama is running (check system tray or run
ollama serve) - Verify Ollama is accessible at
http://localhost:11434/ - Check if firewall is blocking local connections
- Ensure Ollama is running (check system tray or run
- Issue: Gemma3 model not available
- Solution:
- Open Command Prompt as Administrator
- Run:
ollama pull gemma3:12b - Wait for download to complete (~7.5GB)
- Issue: System runs out of memory during processing
- Solution:
- Reduce parallel processing threads (change
SemaphoreSlimvalue) - Process smaller batches of images
- Ensure other applications are closed
- Increase system RAM
- Reduce parallel processing threads (change
- Issue: Keywords/comments not appearing in image files
- Solution:
- Verify the image file is writable (not read-only)
- Ensure the image is in JPEG format (.jpg or .jpeg)
- Check file permissions on the target directory
- Some images may have format restrictions - see error log for details
TagTeam-AI-Image-Tagger/
├── MainForm.cs # Main UI form
├── MainForm.Designer.cs # UI designer generated code
├── MainForm.resx # UI resources
├── ImageProcessingService.cs # Core image processing logic with language support
├── ApplicationSettings.cs # Settings persistence and restoration
├── TagTeam.csproj # Project configuration
├── Assemblies/ # Third-party assemblies
│ └── TagLibSharp.dll # TagLib Sharp for metadata handling
└── README.md # This file
- TagLib# (TagLibSharp): For reading and writing image metadata. Please note the included version in the Assemblies folder is a modified build to support more image files. You may replace it with the official TagLib# if desired.
- .NET 9.0: Windows Forms and core libraries
- Ollama: Used for AI image analysis
The included TagLib# assembly has been modified to improve compatibility with various JPEG files. You may of couse replace it with the official TagLib# if desired, but some images may not be processed correctly.
Modifications include:
in TaglibSharp\IFD\IFDReader.cs, the following modification was made:
uint ReadIFD (long baseOffset, uint offset, uint maxOffset)
{
[...]
if (file.Tell + 12 * entry_count > baseOffset + maxOffset) {
//file.MarkAsCorrupt ("Size of entries exceeds possible data size"); // Original line commented out
return 0; // Modified to prevent marking as corrupt
}- Processing Speed: Depends on image size and Ollama model performance
- Typical Times: 1-2 seconds per image with Gemma3:12b
- Parallel Processing: Default 3 concurrent images balances speed vs. resource usage
- Memory: Each parallel task uses ~500MB-1GB
- Only supports JPEG images (.jpg, .jpeg extensions)
- Requires local Ollama instance (no cloud/API support)
- Currently supports German and English languages (more can be added via code modification)
- XMP tag format for keywords (ensures compatibility with most image viewers)
- Language: C# 13.0
- Framework: .NET 9.0
- UI Framework: Windows Forms
- Image Metadata: TagLib# library.
- AI Service: Ollama with Gemma3:12b model
# Restore dependencies
dotnet restore
# Build debug version
dotnet build
# Build release version
dotnet publish -c Release
# Run tests (if applicable)
dotnet testMIT License
timex-cme
For issues, feature requests, or questions:
- Check the Troubleshooting section above
- Review the error log in the application
- Ensure Ollama is properly configured and running
- Consistently named the application to "TagTeam" throughout the documentation
- Added multi-language support (German and English)
- Added settings persistence and automatic restoration on startup
- Preferences saved include: folder path, language selection, processing mode, and classification error marking preference
- Settings stored in AppData for cross-session persistence
- Initial release
- Core image processing functionality
- Batch processing with recursion
- Real-time progress tracking
- Multiple processing modes
- Parallel processing support
Last Updated: 2026
