This repository contains a Python script that integrates DeepBooru for image tagging and Stash for managing and updating tags for media files. The script allows for extracting keyframes from video files as well as images, predicting tags using the DeepBooru API, and updating those tags in Stash.
Requirements
-
Python 3.8+
-
aiohttp library for asynchronous HTTP requests
-
python-dotenv library for loading environment variables
-
stashapi library for interacting with the Stash application
-
ffmpeg for extracting keyframes from video files
Create a .env file in the root directory of your project with the following content:
- deepbooru_domain=your-deepbooru-domain
- stash_domain=your-stash-domain
- stash_api_key=your-stash-api-key
Replace your-deepbooru-domain, your-stash-domain, and your-stash-api-key with your actual configuration values.
Clone the repo and run
mkdir files && chmod 777 files && docker compose build && docker compose up -d