package usage:
-
install the package:
pip install -e .
-
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:
- clone repo & install deps:
git clone https://github.com/troph-team/ml-danbooru-tagger && cd ml-danbooru-tagger
pip install -r requirements.txt
-
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