Anime Classifier just-a-try/cls-dbv4-full.rotate.mobilenetv4_conv_small_050
Model Details
- Model Type: Image Classification
- Model Stats:
- Params: 963.1K
- FLOPs / MACs: 380.8M / 185.3M
- Image size: train = 384 x 384, test = 384 x 384
- Dataset: animetimm/danbooru-wdtagger-v4-w640-ws-full
- Classes:
r0,r90,r180,r270
- Classes:
Results
Metrics
| # | Acc / Top-2 | Macro (F1/P/R/AUC) | Micro (F1/P/R/AUC) |
|---|---|---|---|
| Validation | 97.86% / 99.54% | 0.979 / 0.979 / 0.979 / 0.999 | 0.979 / 0.979 / 0.979 / 0.999 |
| Test | 97.86% / 99.57% | 0.979 / 0.979 / 0.979 / 0.999 | 0.979 / 0.979 / 0.979 / 0.999 |
Plots
How to Use
We provided a sample image for our code samples, you can find it here.
Use Transformers And Torch
Install dghs-imgutils, timm and other necessary requirements with the following command
pip install 'dghs-imgutils>=0.19.0' torch huggingface_hub timm pillow 'transformers>=4.57.1'
After that you can load this model with timm library, and use it for train, validation and test, with the following code
import torch
from imgutils.data import load_image
from transformers import AutoImageProcessor, AutoModel
processor = AutoImageProcessor.from_pretrained('just-a-try/cls-dbv4-full.rotate.mobilenetv4_conv_small_050', trust_remote_code=True)
model = AutoModel.from_pretrained('just-a-try/cls-dbv4-full.rotate.mobilenetv4_conv_small_050', trust_remote_code=True, use_infer_head=True)
model.eval()
image = load_image('https://huggingface.co/just-a-try/cls-dbv4-full.rotate.mobilenetv4_conv_small_050/resolve/main/sample.webp', mode='RGB', force_background='white')
input_ = processor(image)['pixel_values']
# input_, shape: torch.Size([1, 3, 384, 384]), dtype: torch.float32
classes = model.config.classes
# ['r0', 'r90', 'r180', 'r270']
with torch.no_grad():
output = model(input_)
# output, shape: torch.Size([1, 4]), dtype: torch.float32
print(dict(zip(classes, output[0].tolist())))
# {'r0': 0.0009245745022781193,
# 'r90': 0.001419938518665731,
# 'r180': 0.95500648021698,
# 'r270': 0.04264896735548973}
Citation
@misc{cls_dbv4_full_rotate_mobilenetv4_conv_small_050,
title = {Anime Classifier just-a-try/cls-dbv4-full.rotate.mobilenetv4_conv_small_050},
author = {narugo1992 and Deep Generative anime Hobbyist Syndicate (DeepGHS)},
year = {2025},
howpublished = {\url{https://huggingface.co/just-a-try/cls-dbv4-full.rotate.mobilenetv4_conv_small_050}},
note = {A anime-style image classification model for classification task with 4 classes (r0, r90, r180, r270), trained on anime dataset dbv4-full (\url{https://huggingface.co/datasets/animetimm/danbooru-wdtagger-v4-w640-ws-full}). Model parameters: 963.1K, FLOPs: 380.8M, input resolution: 384×384.},
license = {mit}
}
- Downloads last month
- -





