DeepDanbooru
动漫图片分类模型
安装
pip install deepdanbooru-onnx
使用
from deepdanbooru_onnx import DeepDanbooru, process_image
from PIL import Image
import numpy as np
danbooru = DeepDanbooru()
#usage 1
print(danbooru('test.jpg'))
img = Image.open('test.jpg')
print(danbooru(img))
#usage 2
img = process_image(img) # iamge to ndarray
print(danbooru(img))
#usage 3
print(list(danbooru(['test1.jpg','test2.jpg'])))
TODO
- 提供轻量化模型
- 结果缓存
- 提供WEB接口
- 模型量化
- 精度更高的模型(slow)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file deepdanbooru_onnx-0.0.8.tar.gz.
File metadata
- Download URL: deepdanbooru_onnx-0.0.8.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b167864eed7bd2e72370dcfb8d2b9015c7ad99aab7dfeaa8173414327682f5ef
|
|
| MD5 |
d9b4b9a6b394cd4ab7856c5656a046ab
|
|
| BLAKE2b-256 |
0c461a85fb9d7f2e34fb2d340908bed74ef8da1c6aef7bfbfb221e703264124e
|