Anime Tagger eva02_large_E621_FULL_V1

Model Details

  • Model Type: Multilabel image classification (WD14-style tagger)
  • Backbone / Architecture: eva02_large_patch14_448.mim_m38m_ft_in22k_in1k
  • Image Size: 448 x 448
  • Dataset: animetimm/e621-wdtagger-v1-w640-ws-full
  • Tags Count: 8783
    • General (#0): 7180
    • Character (#4): 494
    • Species (#5): 1106
    • Rating (#9): 3
  • Export Format: ONNX + Safetensors

Results

# Macro@0.40 (F1/MCC/P/R) Micro@0.40 (F1/MCC/P/R) Macro@Best (F1/P/R)
Validation 0.678 / 0.685 / 0.546 / 0.935 0.472 / 0.531 / 0.322 / 0.884 0.427 / 0.440 / 0.449
Test 0.677 / 0.685 / 0.545 / 0.935 0.472 / 0.531 / 0.322 / 0.884 0.425 / 0.436 / 0.450

Full-split evaluation completed on validation/test (185k+ samples each).

Thresholds

Category Name Alpha Threshold Micro@Thr (F1/P/R) Macro@0.40 (F1/P/R) Macro@Best (F1/P/R)
0 general 1 0.60 0.631 / 0.684 / 0.585 0.263 / 0.177 / 0.568 0.352 / 0.358 / 0.386
4 character 1 0.65 0.895 / 0.941 / 0.853 0.715 / 0.598 / 0.922 0.872 / 0.906 / 0.847
5 species 1 0.60 0.836 / 0.848 / 0.824 0.544 / 0.421 / 0.825 0.712 / 0.761 / 0.682
9 rating 1 0.65 0.912 / 0.918 / 0.906 0.813 / 0.700 / 0.989 0.884 / 0.869 / 0.903
  • Micro@Thr uses category-level thresholds from thresholds.json.
  • Macro/Micro@0.40 uses fixed threshold 0.40.
  • Macro@Best uses tag-level best-threshold search on evaluation splits.
  • For broader tag coverage (more tags recalled), you can lower the general threshold to 0.48.
  • selected_tags.csv currently stores category-level thresholds as initial best_threshold; it will be replaced by real tag-level thresholds after full evaluation.

Files

Release folder: eva02_large_E621_FULL_V1

  • eva02_large_E621_FULL_V1/model.onnx
  • eva02_large_E621_FULL_V1/model.onnx.data
  • eva02_large_E621_FULL_V1/model.safetensors
  • eva02_large_E621_FULL_V1/preprocess.json
  • eva02_large_E621_FULL_V1/selected_tags.csv
  • eva02_large_E621_FULL_V1/tags.json
  • eva02_large_E621_FULL_V1/thresholds.json
  • eva02_large_E621_FULL_V1/config.json

How to Use

1) WD14 Tagger-Compatible Download (Recommended)

This repo provides WD14-compatible files at the root. Put these files in the same folder:

  • model.onnx
  • model.onnx.data
  • selected_tags.csv
  • tags.json (optional helper metadata)
  • thresholds.json (optional helper thresholds)

Download with CLI:

hf download nzs234/eva02_large_E621_FULL_V1 model.onnx model.onnx.data selected_tags.csv tags.json thresholds.json --repo-type model --local-dir ./eva02_large_E621_FULL_V1

2) ONNX Runtime (Python)

import json
import numpy as np
import onnxruntime as ort
from PIL import Image
from huggingface_hub import hf_hub_download

repo = "nzs234/eva02_large_E621_FULL_V1"

onnx_path = hf_hub_download(repo_id=repo, filename="model.onnx")
_ = hf_hub_download(repo_id=repo, filename="model.onnx.data")
tags_path = hf_hub_download(repo_id=repo, filename="tags.json")
thr_path = hf_hub_download(repo_id=repo, filename="thresholds.json")

sess = ort.InferenceSession(onnx_path, providers=["CUDAExecutionProvider", "CPUExecutionProvider"])
input_name = sess.get_inputs()[0].name

with open(tags_path, "r", encoding="utf-8") as f:
    tags = json.load(f)

# You can preprocess with the same logic described in preprocess.json
img = Image.open("your_image.jpg").convert("RGB").resize((448, 448))
x = np.asarray(img).astype(np.float32) / 255.0
x = np.transpose(x, (2, 0, 1))[None, ...]

pred = sess.run(None, {input_name: x})[0][0]
print("num_tags:", pred.shape[0])

3) Safetensors Export

model.safetensors is also provided for PyTorch-side workflows and conversion pipelines.

4) A1111 / WD14 Tagger Extension Layout Example

If you use stable-diffusion-webui-wd14-tagger, put files under a model folder, for example:

stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/models/eva02_large_E621_FULL_V1/
  model.onnx
  model.onnx.data
  selected_tags.csv
  tags.json
  thresholds.json

Then select eva02_large_E621_FULL_V1 in the extension model dropdown.

Notes:

  • selected_tags.csv is required by most WD14-style UIs.
  • tags.json and thresholds.json are optional for plain WD14 UI, but useful for custom tools.
  • Keep model.onnx and model.onnx.data in the same folder.

Notes

  • Model card style references: animetimm/swinv2_base_window8_256.e621v1-full
  • Evaluation metrics/threshold tables are updated with full-split results.

License

Please follow upstream dataset and base-model licenses. Repo license is currently set to MIT.

Downloads last month
1
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for xdcx/eva02_large_E621_FULL_V1

Quantized
(4)
this model

Dataset used to train xdcx/eva02_large_E621_FULL_V1