This application automates the first stage of image dataset curation by loading images from a directory, executing multi-model booru-style autotagging, performing tag reranking, and enabling manual editing before mass-exporting the metadata.
The threshold can be granularly preset for each of the available models, and the configurations can be exported and imported from file. The maximum number of tags per image can be configured. Dynamic thresholding (MCut) is available. (ref.: https://www.researchgate.net/publication/262324551_MCut_A_Thresholding_Strategy_for_Multi-label_Classification)
- Processing Pipeline: Loads local image directories, processes images through multiple concurrent tagging models, cross-references outputs, and applies a reranking algorithm to finalize tag confidence.
- Hardware Execution: Optimized for local execution. It automatically detects system capabilities and can run entirely within a CPU/RAM environment without dedicated GPU acceleration.
- Model Management: Required weights and model configurations are fetched and cached automatically upon the first execution.
- Data Management: Provides an interface to review and edit tags individually prior to executing a batch export of the metadata.
The application executes within a isolated Python virtual environment (venv). The launcher script automatically detects and links nested CUDA binaries (such as NVIDIA site-packages) inside the virtual environment to LD_LIBRARY_PATH to ensure proper hardware execution.
- Python 3.10 or higher
bashshell environment- Internet connection (initial run only, for automated model downloading)
- Clone or copy the repository to your local machine.
- Navigate to the root directory containing
tagger5.pyandrun_generic_tagger5.sh. - Create the virtual environment, upgrade baseline package managers, and install dependencies:
python3 -m venv venv
source venv/bin/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
deactivate
Do not invoke the Python script directly if you require automated hardware library mapping / GPU execution. Execute the provided wrapper script to handle environment variables and launch the application:
chmod +x run_generic_tagger5.sh
./run_generic_tagger5.sh