Skip to content

Latest commit

 

History

History
55 lines (48 loc) · 1.69 KB

README-ORIGINAL.md

File metadata and controls

55 lines (48 loc) · 1.69 KB

wd-hydrus-tagger

wd-hydrus-tagger is a tool that uses the Hydrus Network API to tag your archived images with the WD 1.4 Tagger model.

An example of the evaluate command using a familair toy.

Requirements

  • Python 3.9.x or 3.10.x
  • Hydrus Network and an API key for your server

Installing Dependencies

python -m venv venv # life is easier with a venv
source venv/bin/activate
pip install -r requirements.txt

Running

Evaluate a file

python -m wd-hydrus-tagger evaluate /path/to/file

Options:

  --cpu BOOLEAN      Use CPU instead of GPU
  --model TEXT       The tagging model version to use
  --threshold FLOAT  The threshhold to drop tags below

Evaluate a file in Hydrus

python -m wd-hydrus-tagger evaluate-api --token your_hydrus_token 123_your_files_hash_456

Options:

  --token TEXT       The API token for your Hydrus server
  --cpu BOOLEAN      Use CPU instead of GPU
  --model TEXT       The tagging model version to use
  --threshold FLOAT  The threshhold to drop tags below
  --host TEXT        The URL for your Hydrus server

Evaluate a number of files in Hydrus

python -m wd-hydrus-tagger evaluate-api-batch --token your_hydrus_token hashes.txt

Where hashes.txt is a file containing one Hydrus file hash per line.

Options:

  --token TEXT       The API token for your Hydrus server
  --cpu BOOLEAN      Use CPU instead of GPU
  --model TEXT       The tagging model version to use
  --threshold FLOAT  The threshhold to drop tags below
  --host TEXT        The URL for your Hydrus server