Crates.io | deep-danbooru |
lib.rs | deep-danbooru |
version | 0.0.0 |
source | src |
created_at | 2023-03-10 09:41:15.432825 |
updated_at | 2023-03-10 09:41:15.432825 |
description | Multi-labels anime image classification in rust |
homepage | |
repository | https://github.com/libwaifu/deep-danbooru |
max_upload_size | |
id | 806315 |
size | 386,626 |
Multi-labels anime image classification without python.
# 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)
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();