Anime Classifier just-a-try/cls-dbv4-full.rotate.caformer_s36
Model Details
- Model Type: Image Classification
- Model Stats:
- Params: 37.3M
- FLOPs / MACs: 44.3G / 22.1G
- 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 | 98.93% / 99.80% | 0.989 / 0.989 / 0.989 / 1.000 | 0.989 / 0.989 / 0.989 / 1.000 |
| Test | 98.97% / 99.81% | 0.990 / 0.990 / 0.990 / 1.000 | 0.990 / 0.990 / 0.990 / 1.000 |
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.caformer_s36', trust_remote_code=True)
model = AutoModel.from_pretrained('just-a-try/cls-dbv4-full.rotate.caformer_s36', trust_remote_code=True, use_infer_head=True)
model.eval()
image = load_image('https://huggingface.co/just-a-try/cls-dbv4-full.rotate.caformer_s36/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.012189035303890705,
# 'r90': 0.0006545081851072609,
# 'r180': 0.0038451426662504673,
# 'r270': 0.9833112955093384}
Citation
@misc{cls_dbv4_full_rotate_caformer_s36,
title = {Anime Classifier just-a-try/cls-dbv4-full.rotate.caformer_s36},
author = {narugo1992 and Deep Generative anime Hobbyist Syndicate (DeepGHS)},
year = {2025},
howpublished = {\url{https://huggingface.co/just-a-try/cls-dbv4-full.rotate.caformer_s36}},
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: 37.3M, FLOPs: 44.3G, input resolution: 384×384.},
license = {mit}
}
- Downloads last month
- -
Model tree for just-a-try/cls-dbv4-full.rotate.caformer_s36
Base model
timm/caformer_s36.sail_in22k_ft_in1k_384
Quantized
animetimm/caformer_s36.dbv4-full





