File size: 5,439 Bytes
044f800
 
12584f6
 
 
 
044f800
12584f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
license: openrail
task_categories: [feature-extraction]
language: [en, multilingual]
size_categories: [100K<n<1M]
tags: [vocabulary, tagging, image-annotation, nlp, danbooru, waifu-diffusion]
---

# Tagger Vocabularies Dataset

## Summary

This repository provides a comprehensive collection of **vocabulary datasets** specifically designed for image tagging and annotation systems. The dataset contains structured tag vocabularies from multiple popular tagging models including **DeepDanbooru**, **MLDanbooru**, and various **Waifu Diffusion** tagger variants. Each vocabulary file contains detailed metadata for thousands of tags, organized with aliases, categories, usage counts, and word breakdowns to support robust **natural language processing** and **computer vision** applications.

The dataset features meticulously structured JSON files that include essential tag information such as name, aliases, category classification, occurrence counts, and semantic word groupings. This enables researchers and developers to build sophisticated tagging systems, improve model interpretability, and enhance cross-model compatibility. The **vocabulary standardization** across different tagger models facilitates comparative analysis and transfer learning between various annotation frameworks.

Performance-wise, these vocabularies represent the culmination of extensive training on large-scale image datasets, with tag counts ranging from hundreds to millions of occurrences. The categorization system (0-9) provides logical grouping of tags by semantic domains, while the word breakdowns offer insights into tag composition and relationships. This makes the dataset particularly valuable for **multi-modal learning** applications that bridge visual content understanding with textual annotation.

The dataset covers diverse domains including character attributes, clothing, accessories, settings, and content ratings, making it suitable for various applications in content moderation, image search, automated annotation, and AI-assisted creative tools. The inclusion of multiple model variants ensures comprehensive coverage of different tagging philosophies and annotation granularities.

## Usage

For direct file access:

```python
import json
from huggingface_hub import hf_hub_download

# Download and load specific vocabulary file
file_path = hf_hub_download(
    repo_id="deepghs/tagger_vocabs",
    filename="deepdanbooru/tags.json",
    repo_type="dataset"
)

with open(file_path, 'r', encoding='utf-8') as f:
    tags_data = json.load(f)

# Process tags
for tag in tags_data[:10]:
    print(f"Tag: {tag['name']} (Category: {tag['category']})")
    print(f"Aliases: {', '.join(tag['aliases'])}")
    print(f"Occurrences: {tag['count']}")
```

## Available Vocabularies

The dataset includes vocabulary files for the following tagger models:

- **deepdanbooru/tags.json** (3.12 MB) - Original DeepDanbooru vocabulary
- **mldanbooru/tags.json** (4.00 MB) - MLDanbooru vocabulary with enhanced coverage
- **wd-v1-4-convnext-tagger/tags.json** (2.18 MB) - Waifu Diffusion ConvNeXT tagger
- **wd-v1-4-convnext-tagger-v2/tags.json** - Updated ConvNeXT tagger vocabulary
- **wd-v1-4-convnextv2-tagger-v2/tags.json** (3.08 MB) - ConvNeXTV2-based tagger
- **wd-v1-4-moat-tagger-v2/tags.json** (3.08 MB) - MOAT architecture tagger
- **wd-v1-4-swinv2-tagger-v2/tags.json** - SwinV2 transformer tagger
- **wd-v1-4-vit-tagger/tags.json** - Vision Transformer tagger
- **wd-v1-4-vit-tagger-v2/tags.json** - Updated ViT tagger vocabulary

## Data Structure

Each vocabulary file follows the same JSON structure:

```json
[
  {
    "aliases": ["alternative_names"],
    "category": 0,
    "count": 12345,
    "id": 123456,
    "name": "primary_tag_name",
    "words": [
      ["word", "breakdown"],
      ["alternative", "phrasing"]
    ]
  }
]
```

**Field Descriptions:**
- `aliases`: Alternative names/synonyms for the tag
- `category`: Numerical category (0-9) for semantic grouping
- `count`: Number of occurrences in training data
- `id`: Unique identifier for the tag
- `name`: Primary tag name
- `words`: Semantic word breakdowns for NLP processing

## Original Content

vocabs data for tagger models, maybe useful for some basic NLP calculation.

## Citation

```bibtex
@misc{tagger_vocabs,
  title        = {Tagger Vocabularies Dataset},
  author       = {deepghs},
  howpublished = {\url{https://huggingface.co/datasets/deepghs/tagger_vocabs}},
  year         = {2023},
  note         = {Comprehensive vocabulary datasets for image tagging models including DeepDanbooru, MLDanbooru, and Waifu Diffusion taggers},
  abstract     = {This repository provides a comprehensive collection of vocabulary datasets specifically designed for image tagging and annotation systems. The dataset contains structured tag vocabularies from multiple popular tagging models including DeepDanbooru, MLDanbooru, and various Waifu Diffusion tagger variants. Each vocabulary file contains detailed metadata for thousands of tags, organized with aliases, categories, usage counts, and word breakdowns to support robust natural language processing and computer vision applications. The dataset features meticulously structured JSON files that include essential tag information such as name, aliases, category classification, occurrence counts, and semantic word groupings.},
  keywords     = {vocabulary, tagging, image-annotation, nlp, danbooru}
}
```