Skip to content

troph-team/ml-danbooru-tagger

 
 

Repository files navigation

ML-Danbooru: Anime image tags detector

[Modified] Usage:

package usage:

  1. install the package: pip install -e .

  2. get labels by importing function from the package:

from ml_danbooru_tagger import infer_batch_with_defaults
bench_tag_dict = infer_batch_with_defaults("bench_images_small")

package usage:

to build the package:

python setup.py bdist_wheel

CLI usage:

  1. clone repo & install deps:
git clone https://github.com/troph-team/ml-danbooru-tagger && cd ml-danbooru-tagger
pip install -r requirements.txt
  1. start tagging:

    • automatically downloads models

    • optimal settings preconfigured

    • tags will be saved as json file next to the tagged folder

    • for more args available see the python file

python demo_ca.py --data {IMAGE_DIR_PATH}

modifications:

  • better error handling
  • can be used as a pacakge on downsteraam projects
  • downloads model automatically when not given
  • keeps probability of tags along with string repr
  • adds batched inference by default
  • modified json save path

[Original Readme]

see: https://github.com/IrisRainbowNeko/ML-Danbooru

About

Modified ML-Danbooru tagger

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.3%
  • Jupyter Notebook 5.7%