---
title: wd-vit-tagger-v3
canonical_url: "https://www.modelscope.cn/models/fireicewolf/wd-vit-tagger-v3"
md_url: "https://www.modelscope.cn/models/fireicewolf/wd-vit-tagger-v3.md"
repository: fireicewolf/wd-vit-tagger-v3
last_updated: 2024-04-18
license: apache-2.0
pipeline_tag: image-classification
tasks:
  - image-classification
parameters: 94.6M
tensor_type:
  - F32
library_name:
  - onnx
  - safetensors
  - other
frameworks:
  - other
downloads: 289
stars: 0
---

# wd-vit-tagger-v3

> wd-vit-tagger-v3 - fireicewolf 在 ModelScope 开源的模型。This is a fork version from https://huggingface.co/SmilingWolf/wd-vit-tagger-v3/

fireicewolf/wd-vit-tagger-v3 是 ModelScope 魔搭社区上的 94.6M 参数image-classification模型，采用 apache-2.0 许可。

- **Repository**: fireicewolf/wd-vit-tagger-v3
- **License**: apache-2.0
- **Tasks**: image-classification
- **Parameters**: 94.6M
- **Downloads**: 289
- **Stars**: 0
- **Last updated**: 2024-04-18

Source: https://www.modelscope.cn/models/fireicewolf/wd-vit-tagger-v3

---

# WD ViT Tagger v3

This is a fork version from https://huggingface.co/SmilingWolf/wd-vit-tagger-v3/

Supports ratings, characters and general tags.

Trained using https://github.com/SmilingWolf/JAX-CV.  
TPUs used for training kindly provided by the [TRC program](https://sites.research.google/trc/about/).

## Dataset
Last image id: 7220105  
Trained on Danbooru images with IDs modulo 0000-0899.  
Validated on images with IDs modulo 0950-0999.  
Images with less than 10 general tags were filtered out.  
Tags with less than 600 images were filtered out.

## Validation results
`v2.0: P=R: threshold = 0.2614, F1 = 0.4402`  
`v1.0: P=R: threshold = 0.2547, F1 = 0.4278`

## What's new
Model v2.0/Dataset v3:  
Trained for a few more epochs.  
Used tag frequency-based loss scaling to combat class imbalance.

Model v1.1/Dataset v3:  
Amended the JAX model config file: add image size.  
No change to the trained weights.

Model v1.0/Dataset v3:  
More training images, more and up-to-date tags (up to 2024-02-28).  
Now `timm` compatible! Load it up and give it a spin using the canonical one-liner!  
ONNX model is compatible with code developed for the v2 series of models.  
The batch dimension of the ONNX model is not fixed to 1 anymore. Now you can go crazy with batch inference.  
Switched to Macro-F1 to measure model performance since it gives me a better gauge of overall training progress.

# Runtime deps
ONNX model requires `onnxruntime >= 1.17.0`

# Inference code examples
For timm: https://github.com/neggles/wdv3-timm  
For ONNX: https://huggingface.co/spaces/SmilingWolf/wd-tagger  
For JAX: https://github.com/SmilingWolf/wdv3-jax

## Final words
Subject to change and updates.
Downstream users are encouraged to use tagged releases rather than relying on the head of the repo.
