animetimm / convformer_b36.dbv4-full

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: June 11 2026
image-classification

Introduction of convformer_b36.dbv4-full

Model Details of convformer_b36.dbv4-full

Anime Tagger convformer_b36.dbv4-full

Model Details
  • Model Type: Multilabel Image classification / feature backbone
  • Model Stats:
    • Params: 135.1M
    • FLOPs / MACs: 181.5G / 90.5G
    • Image size: train = 448 x 448, test = 448 x 448
  • Dataset: animetimm/danbooru-wdtagger-v4-w640-ws-full
    • Tags Count: 12476
      • General (#0) Tags Count: 9225
      • Character (#4) Tags Count: 3247
      • Rating (#9) Tags Count: 4
Results
# [email protected] (F1/MCC/P/R) [email protected] (F1/MCC/P/R) Macro@Best (F1/P/R)
Validation 0.536 / 0.542 / 0.596 / 0.505 0.683 / 0.683 / 0.687 / 0.680 ---
Test 0.537 / 0.543 / 0.598 / 0.507 0.684 / 0.683 / 0.687 / 0.681 0.574 / 0.583 / 0.589
  • Macro/[email protected] means the metrics on the threshold 0.40.
  • Macro@Best means the mean metrics on the tag-level thresholds on each tags, which should have the best F1 scores.
Thresholds
Category Name Alpha Threshold Micro@Thr (F1/P/R) [email protected] (F1/P/R) Macro@Best (F1/P/R)
0 general 1 0.39 0.671 / 0.670 / 0.673 0.409 / 0.480 / 0.376 0.452 / 0.455 / 0.480
4 character 1 0.46 0.924 / 0.948 / 0.901 0.902 / 0.933 / 0.876 0.919 / 0.945 / 0.899
9 rating 1 0.4 0.827 / 0.791 / 0.866 0.834 / 0.806 / 0.865 0.835 / 0.810 / 0.864
  • Micro@Thr means the metrics on the category-level suggested thresholds, which are listed in the table above.
  • [email protected] means the metrics on the threshold 0.40.
  • Macro@Best means the metrics on the tag-level thresholds on each tags, which should have the best F1 scores.

For tag-level thresholds, you can find them in selected_tags.csv .

How to Use

We provided a sample image for our code samples, you can find it here .

Use TIMM 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 pandas

After that you can load this model with timm library, and use it for train, validation and test, with the following code

import json

import pandas as pd
import torch
from huggingface_hub import hf_hub_download
from imgutils.data import load_image
from imgutils.preprocess import create_torchvision_transforms
from timm import create_model

repo_id = 'animetimm/convformer_b36.dbv4-full'
model = create_model(f'hf-hub:{repo_id}', pretrained=True)
model.eval()

with open(hf_hub_download(repo_id=repo_id, repo_type='model', filename='preprocess.json'), 'r') as f:
    preprocessor = create_torchvision_transforms(json.load(f)['test'])
# Compose(
#     PadToSize(size=(448, 448), interpolation=bilinear, background_color=white)
#     Resize(size=448, interpolation=bicubic, max_size=None, antialias=True)
#     CenterCrop(size=[448, 448])
#     MaybeToTensor()
#     Normalize(mean=tensor([0.4850, 0.4560, 0.4060]), std=tensor([0.2290, 0.2240, 0.2250]))
# )

image = load_image('https://huggingface.co/animetimm/convformer_b36.dbv4-full/resolve/main/sample.webp')
input_ = preprocessor(image).unsqueeze(0)
# input_, shape: torch.Size([1, 3, 448, 448]), dtype: torch.float32
with torch.no_grad():
    output = model(input_)
    prediction = torch.sigmoid(output)[0]
# output, shape: torch.Size([1, 12476]), dtype: torch.float32
# prediction, shape: torch.Size([12476]), dtype: torch.float32

df_tags = pd.read_csv(
    hf_hub_download(repo_id=repo_id, repo_type='model', filename='selected_tags.csv'),
    keep_default_na=False
)
tags = df_tags['name']
mask = prediction.numpy() >= df_tags['best_threshold']
print(dict(zip(tags[mask].tolist(), prediction[mask].tolist())))
# {'sensitive': 0.8706316351890564,
#  '1girl': 0.9962520003318787,
#  'long_hair': 0.7608727812767029,
#  'short_hair': 0.4328535199165344,
#  'shirt': 0.5635230541229248,
#  'simple_background': 0.6619350910186768,
#  'black_hair': 0.7147287726402283,
#  'holding': 0.41011589765548706,
#  'white_background': 0.684877336025238,
#  '1boy': 0.9791741967201233,
#  'dress': 0.9455663561820984,
#  'jewelry': 0.74953693151474,
#  'standing': 0.2938549816608429,
#  'white_shirt': 0.6703763008117676,
#  'ponytail': 0.6135118007659912,
#  'white_hair': 0.5237897038459778,
#  'grey_hair': 0.6939920783042908,
#  'earrings': 0.6856762170791626,
#  'pants': 0.5719770193099976,
#  'collared_shirt': 0.5120799541473389,
#  'sleeveless': 0.7333372235298157,
#  'barefoot': 0.6996540427207947,
#  'black_pants': 0.6772502660751343,
#  'sleeveless_dress': 0.7024292349815369,
#  'facial_hair': 0.5139638781547546,
#  'scar': 0.5248697996139526,
#  'chinese_clothes': 0.9092180132865906,
#  'looking_down': 0.14022670686244965,
#  'eyepatch': 0.980130672454834,
#  'black_necktie': 0.4010271728038788,
#  'scar_on_face': 0.3535485863685608,
#  'china_dress': 0.9715157151222229,
#  'pelvic_curtain': 0.45420172810554504,
#  'smoke': 0.41715672612190247,
#  'side_slit': 0.30503836274147034,
#  'cigarette': 0.9529647827148438,
#  'shirt_tucked_in': 0.21245846152305603,
#  'smoking': 0.8385434150695801,
#  'stitches': 0.7393105030059814,
#  'pillarboxed': 0.47476479411125183,
#  'stitched_face': 0.8138346672058105,
#  'stitched_mouth': 0.5495299100875854,
#  'quanxi_(chainsaw_man)': 0.9989018440246582}
Use ONNX Model For Inference

Install dghs-imgutils with the following command

pip install 'dghs-imgutils>=0.19.0'

Use multilabel_timm_predict function with the following code

from imgutils.generic import multilabel_timm_predict

general, character, rating = multilabel_timm_predict(
    'https://huggingface.co/animetimm/convformer_b36.dbv4-full/resolve/main/sample.webp',
    repo_id='animetimm/convformer_b36.dbv4-full',
    fmt=('general', 'character', 'rating'),
)

print(general)
# {'1girl': 0.9962519407272339,
#  'eyepatch': 0.9801328182220459,
#  '1boy': 0.9791746139526367,
#  'china_dress': 0.9715187549591064,
#  'cigarette': 0.9529712200164795,
#  'dress': 0.9455670118331909,
#  'chinese_clothes': 0.9092251062393188,
#  'smoking': 0.8385633230209351,
#  'stitched_face': 0.813883900642395,
#  'long_hair': 0.760870099067688,
#  'jewelry': 0.7495396137237549,
#  'stitches': 0.7393543124198914,
#  'sleeveless': 0.7333456873893738,
#  'black_hair': 0.7147303223609924,
#  'sleeveless_dress': 0.7024465203285217,
#  'barefoot': 0.6996618509292603,
#  'grey_hair': 0.6939983367919922,
#  'earrings': 0.6856822967529297,
#  'white_background': 0.684880256652832,
#  'black_pants': 0.6772654056549072,
#  'white_shirt': 0.6703809499740601,
#  'simple_background': 0.6619377732276917,
#  'ponytail': 0.613518476486206,
#  'pants': 0.5719848871231079,
#  'shirt': 0.5635231137275696,
#  'stitched_mouth': 0.5496499538421631,
#  'scar': 0.524891197681427,
#  'white_hair': 0.5237964391708374,
#  'facial_hair': 0.5139826536178589,
#  'collared_shirt': 0.5120893120765686,
#  'pillarboxed': 0.4748537838459015,
#  'pelvic_curtain': 0.45423424243927,
#  'short_hair': 0.4328537583351135,
#  'smoke': 0.4171949625015259,
#  'holding': 0.410116583108902,
#  'black_necktie': 0.40105217695236206,
#  'scar_on_face': 0.3535737991333008,
#  'side_slit': 0.30507180094718933,
#  'standing': 0.29386019706726074,
#  'shirt_tucked_in': 0.2124883234500885,
#  'looking_down': 0.1402413547039032}
print(character)
# {'quanxi_(chainsaw_man)': 0.9989023208618164}
print(rating)
# {'sensitive': 0.8706320524215698}

For further information, see documentation of function multilabel_timm_predict .

Citation
@misc{convformer_b36_dbv4_full,
  title        = {Anime Tagger convformer_b36.dbv4-full},
  author       = {narugo1992 and Deep Generative anime Hobbyist Syndicate (DeepGHS)},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/animetimm/convformer_b36.dbv4-full}},
  note         = {A large-scale anime-style image classification model based on convformer_b36 architecture for multi-label tagging with 12476 tags, trained on anime dataset dbv4-full (\url{https://huggingface.co/datasets/animetimm/danbooru-wdtagger-v4-w640-ws-full}). Model parameters: 135.1M, FLOPs: 181.5G, input resolution: 448×448.},
  license      = {mit}
}

Runs of animetimm convformer_b36.dbv4-full on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About convformer_b36.dbv4-full huggingface.co Model

More convformer_b36.dbv4-full license Visit here:

https://choosealicense.com/licenses/mit

convformer_b36.dbv4-full huggingface.co

convformer_b36.dbv4-full huggingface.co is an AI model on huggingface.co that provides convformer_b36.dbv4-full's model effect (), which can be used instantly with this animetimm convformer_b36.dbv4-full model. huggingface.co supports a free trial of the convformer_b36.dbv4-full model, and also provides paid use of the convformer_b36.dbv4-full. Support call convformer_b36.dbv4-full model through api, including Node.js, Python, http.

convformer_b36.dbv4-full huggingface.co Url

https://huggingface.co/animetimm/convformer_b36.dbv4-full

animetimm convformer_b36.dbv4-full online free

convformer_b36.dbv4-full huggingface.co is an online trial and call api platform, which integrates convformer_b36.dbv4-full's modeling effects, including api services, and provides a free online trial of convformer_b36.dbv4-full, you can try convformer_b36.dbv4-full online for free by clicking the link below.

animetimm convformer_b36.dbv4-full online free url in huggingface.co:

https://huggingface.co/animetimm/convformer_b36.dbv4-full

convformer_b36.dbv4-full install

convformer_b36.dbv4-full is an open source model from GitHub that offers a free installation service, and any user can find convformer_b36.dbv4-full on GitHub to install. At the same time, huggingface.co provides the effect of convformer_b36.dbv4-full install, users can directly use convformer_b36.dbv4-full installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

convformer_b36.dbv4-full install url in huggingface.co:

https://huggingface.co/animetimm/convformer_b36.dbv4-full

Url of convformer_b36.dbv4-full

convformer_b36.dbv4-full huggingface.co Url

Provider of convformer_b36.dbv4-full huggingface.co

animetimm
ORGANIZATIONS

Other API from animetimm