#classification #anime #image #deep #danbooru #multi-labels

deep-danbooru

Multi-labels anime image classification in rust

1 unstable release

0.0.0 Mar 10, 2023

#7 in #danbooru

MPL-2.0 license

385KB
18K SLoC

Deep Danbooru in rust

Multi-labels anime image classification without python.

Fast usage

# let model_path = projects.join("deep-danbooru-models/models/deepdanbooru-2021.onnx");
# let image_path = projects.join("deep-danbooru-models/tests/pixel-105715609.jpg");
predict_by_danbooru2021(&model_path, &image_path)

Full usage

let runtime = Arc::new(Environment::builder().build()?);
let mut model = DeepDanbooru::new(&runtime, model.as_ref())?;
model.set_tags(TAGS2021);
let image = Reader::open(image.as_ref()).unwrap().decode().unwrap();
let result = model.predict(&image).unwrap();

Dependencies

~6.5–9MB
~152K SLoC