BluzenTagger
Multi-label tagging for illustration
A tagger over a 12k-tag vocabulary that holds up on the long tail, where general-purpose vision models quietly collapse into the fifty most common labels.
- Category
- Research
- Status
- Active
- Language
- Python
- Licence
- Apache-2.0
- Stars
- 1.4k
- Since
- 2026
Tagging illustrations is a long-tail problem wearing a classification problem's clothes. The head of the distribution is easy and boring: a model that only ever predicts the two hundred most common tags will score well on any average you compute over images, and be useless to anyone searching for something specific.
What we changed
Three things, none of them clever on their own.
- Stratified evaluation first. We split the tag vocabulary into frequency bands and report every metric per band. A number that improves on the head while collapsing the tail now looks like what it is.
- Per-tag thresholds. A single global confidence cutoff is a compromise between thousands of differently-calibrated heads. Calibrating each one against a held-out slice costs nothing at inference.
- Loss reweighting on band, not on frequency. Straight inverse-frequency weighting made rare-tag training unstable. Weighting by band kept the gradients sane.
from bluzen_tagger import Tagger
tagger = Tagger.from_pretrained("bluzen/bluzen-tagger-v1")
tags = tagger("illustration.png", threshold="calibrated")
| Band | Tags | F1 before | F1 after |
|---|---|---|---|
| Head | 200 | 0.81 | 0.83 |
| Body | 2,300 | 0.62 | 0.71 |
| Tail | 9,500 | 0.19 | 0.44 |
Status
Active. v1 is stable and the v2 line is training against a larger Aurora slice.
References
- [1]Asymmetric Loss For Multi-Label Classification. Ridnik et al., ICCV 2021.
Published artefacts
Writing
The tail is the product
Why we throw away aggregate F1 on tagging benchmarks, and what we report instead. A short argument with a long table attached.
Related projects
PrismStream
Flow-matching generation with region control
A text-to-image stack built around region conditioning, so a prompt can say where something belongs rather than only what it is.
- Language
- Python
- Stars
- 2.1k
- Licence
- Apache-2.0
- Category
- Research
SakuraDetect
Small detectors for illustration
Face, head, person and hand detection tuned for drawn images, small enough to run on a laptop CPU in real time.
- Language
- Python
- Stars
- 820
- Licence
- MIT
- Category
- Research
TagFlow
Prompt expansion that respects your tags
A small language model that turns a handful of tags into a full prompt without inventing subject matter you did not ask for.
- Language
- Python
- Stars
- 310
- Licence
- Apache-2.0
- Category
- Research