/ Модель

Характеристики

Лицензия
Apache 2.0
Базовая модель
wd-eva02-large-tagger-v3
Опубликована
27 окт 2026

booru-lighting-tagger

Классификация изображенийИзображение → label4 профессии

Модель автоматически добавляет к аниме-иллюстрациям теги освещения для описания, поиска и фильтрации изображений.

0скачиваний за 30 дней3лайкавеса обновлены2 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Booru Lighting Tagger v2.0.0 — модель MarioTheKnight для автоматического определения освещения на иллюстрациях в стиле аниме. Это дообученная версия WD EVA02-Large Tagger v3 от SmilingWolf: 16 из 24 блоков трансформера дообучены, добавлена новая голова классификации освещения. Модель выдаёт оценки по 53 тегам в стиле booru, описывающим направление, контрастность и цвет света, световые эффекты, тени и тональную ключевую характеристику изображения.

Модель предназначена для дополнения подписей к наборам изображений, поиска и фильтрации иллюстраций по освещению, а также предварительной сортировки изображений перед ручной разметкой. Обучение охватывало аниме, мангу, furry и игровые иллюстрации; изображения обрабатываются с разрешением 448 × 448 пикселей. По результатам слепой проверки на 51 метке средняя точность ранжирования составила 0,85 против 0,77 у модели-учителя.

Модель осторожно выдаёт теги: обычно предсказанные теги точны, но многие подходящие метки пропускаются. Направление света и тени — слабые группы; фотографии и комиксные страницы не входили в обучающие данные, а качество на них не оценивалось. Явные изображения не использовались, поведение на них не измерено. Лицензия — Apache 2.0.

Сценарии применения

  • добавление тегов освещения к подписям наборов иллюстраций
  • поиск изображений с контровым светом или световыми лучами
  • фильтрация аниме-иллюстраций по типу и цвету освещения
  • предварительная сортировка изображений перед ручной разметкой

Ограничения

Модель обучалась на иллюстрациях в стиле аниме, манги, furry и игр; качество на фотографиях и комиксных страницах не оценивалось. Она склонна пропускать подходящие теги, а направление света и тени распознаёт слабее других категорий.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Booru Lighting Tagger v2.0.0

Booru Lighting Tagger adds lighting tags to anime-style illustrations: where the light comes from, how contrasted, soft or colored it is, which light effects and shadows show, and what lights the scene. It outputs 53 booru-style tags (backlighting, rim_light, chiaroscuro, bloom, caustics, dappled_sunlight, candlelight…) and a tonal key (dark, dim_lighting, high_key).

Night portrait: tonal key dim_lighting; tags night, cool_lighting, glowing, rim_light, dramatic_lighting, complex_lighting, bloom, hard_lighting, overlighting

Beach at sunset: tonal key normal; tags sunlight, rim_light, hard_lighting, sunset, bloom, diffraction_spikes, golden_hour, backlighting

Mecha under a starry sky: tonal key normal; tags glowing, dramatic_lighting, diffraction_spikes, light_rays, blue_light, night, light_particles

Mountain valley: tonal key normal; tags sunlight, dappled_sunlight, hard_lighting, shade

Outputs of v2.0.0 at the default thresholds, on four AI-generated illustrations that are not part of the training data. Each bar is the score out of 10; the white tick is the label's threshold. Grey bars are labels that are not validated against human answers (see Labels). The last line lists the tags that the recall preset would add.

Booru tags describe what is in an image much better than how it is lit. Most images with a strong backlight or a dramatic chiaroscuro are not tagged as such, so generative models trained on these captions have no reliable handle on lighting. This tagger is meant to complete the captions of image datasets, so that lighting becomes something you can prompt for.

  • Base model: WD EVA02-Large Tagger v3 by SmilingWolf. 16 of its 24 transformer blocks were fine-tuned, under a new lighting head.
  • Teacher: Claude Opus 5.5 rated about 25,400 images from 0 to 10 on each label, following a written guideline; the tagger learned these ratings.
  • Checked against a human: on blind human answers, the tagger ranks images better than its teacher (mean AP 0.85 against 0.77 on the 51 labels measured). 38 of the 53 labels reach 70 % precision and 30 % recall (41 for the teacher).
  • New in 2.0: 14 more labels, among them soft_lighting, hard_lighting, bloom, light_rays, vignetting and the colored lights, a revised guideline, and about 6,000 more training images. Tags of v1.x and v2.x are not consistent with each other: see Versioning.
  • License: Apache 2.0, like the base model.

The project report, with the goal, method, experiments, results and limitations, is in REPORT.md.

Quick start

pip install -U huggingface_hub   # provides the hf command
hf download MarioTheKnight/booru-lighting-tagger --local-dir booru-lighting-tagger
pip install -r booru-lighting-tagger/requirements.txt
python booru-lighting-tagger/inference.py my_image.png
my_image.png: sunlight, rim_light, hard_lighting, sunset, bloom, diffraction_spikes, golden_hour, backlighting

At the first run, the base model (1.2 GB) is downloaded from the Hub and cached. If you need a specific CUDA build of PyTorch, install it first (pytorch.org).

Tag a dataset

# Add the missing lighting tags to each image's .txt caption (the file is created if needed)
python booru-lighting-tagger/inference.py dataset/ --recursive --append-to-captions

# Same, with spaces instead of underscores ("rim light")
python booru-lighting-tagger/inference.py dataset/ -r --append-to-captions --spaces

# Keep every score, to apply your own thresholds
python booru-lighting-tagger/inference.py dataset/ -r --jsonl lighting.jsonl
OptionEffect
-r, --recursiveLook into subfolders.
--append-to-captions [EXT]Add the missing tags at the end of <image name>.txt (or EXT), comma-separated. Existing tags are kept and never duplicated (rim_light and rim light count as the same tag).
--write-captions [EXT]Write the lighting tags alone to <image name>.lighting.txt (or EXT), replacing that file.
--jsonl FILEWrite every result to a JSON Lines file: all scores, tonal key probabilities, tags.
--spacesWrite rim light instead of rim_light.
--preset recallMore tags: about 1.5 times as many, a little less precise (see Threshold presets).
--validated-onlyEmit only the 38 validated labels (see Labels).
--no-tonal-keyDo not emit dark, dim_lighting or high_key.
--seeds NUse only the first N of the 3 seeds: faster, slightly less accurate.
--repo ID, --revision v2.0.0Download the model from the Hub instead of reading it next to the script.
--device, --precision, --batch-size, --workersHardware settings (--help for details).

Formats read: PNG, JPEG, WebP, BMP, GIF (first frame), TIFF. An unreadable file is reported and skipped; the run goes on and exits with code 2.

Python

import sys
from huggingface_hub import snapshot_download

model_dir = snapshot_download("MarioTheKnight/booru-lighting-tagger", revision="v2.0.0")
sys.path.insert(0, model_dir)
from inference import LightingTagger

tagger = LightingTagger(model_dir)              # device="auto", seeds=None (all 3), preset="default"
for result in tagger.tag_files(["a.png", "b.jpg"], batch_size=8):
    print(result["file"], result["tags"])

from PIL import Image
result = tagger.tag_images([Image.open("a.png")])[0]
print(result["scores"]["rim_light"])            # 0 to 10
result = tagger.tag_images([Image.open("a.png")], preset="recall")[0]   # more tags, for this call only

Output

One result per image (abridged; the beach image above):

{
  "file": "beach.png",
  "tags": ["sunlight", "rim_light", "hard_lighting", "sunset", "bloom", "diffraction_spikes", "golden_hour", "backlighting"],
  "scores": {"backlighting": 4.01, "rim_light": 5.36, "sidelighting": 0.15, "...": "..."},
  "tonal_key": "normal",
  "tonal_key_probabilities": {"dark": 0.0, "dim_lighting": 0.0, "normal": 1.0, "high_key": 0.0},
  "error": null
}
  • scores: for each of the 53 labels, the rating the teacher would most likely give, from 0 (absent) to 10 (obvious and dominant). It is not a probability. On the teacher's scale, 3 means "hesitant, rather no", 4 to 6 "real but subtle or secondary", 7 or 8 "clearly present". The full scale is in REPORT.md.
  • tags: the labels whose score reaches their threshold, highest score first, then the tonal key unless it is normal. By default, each threshold makes the tagger emit as many tags as the teacher did on the validation images. Thresholds are listed in tagger_config.json.

Threshold presets

The teacher is cautious: when a tag is emitted it is usually right, but many images that deserve it are missed. The recall preset (--preset recall, or preset="recall" in Python) lowers the thresholds to emit about 1.5 times as many tags as the teacher on the validation images. Four labels keep their default threshold, because their precision on the human tests falls below 60 % otherwise: sidelighting, soft_lighting, overexposure and night. A recall threshold is never higher than the default one: the recall preset only adds tags.

PresetMean precisionMean recall
default89 %55 %
recall81 to 84 %63 %

Means over the labels measured on the human tests. The four exceptions were chosen on these tests, so the recall preset's figures are a little optimistic there: 84 % precision on the tests, 81 % in cross-validation (exceptions chosen on half of the images, measured on the other half). With the recall preset, silhouette, volumetric_lighting, colored_lights and shadow reach 70 % precision and 30 % recall. Per-label figures are in REPORT.md. For finer control, keep every score with --jsonl and apply your own thresholds.

Speed and memory

3 seeds (default)1 seed
GPU, RTX PRO 6000 Blackwell, batches of 1639 images/s; 3.8 GB of VRAM, 4.6 GB at peak85 images/s; 1.3 GB, 2.1 GB at peak
CPU, 16 threadsabout 3 s per image (measured with v1, same architecture)not measured

On a GPU, the tagger runs in bfloat16 as in training (float16 on GPUs without bfloat16). On a CPU it runs in float32. The thresholds were set for the average of the 3 seeds; with fewer seeds they still apply, a little less precisely (a single seed: mean validation AP 0.725 to 0.728, against 0.745 for the average).

Labels

FamilyTagWhat it meansStatusPrecisionRecallHuman positives
DirectionbacklightingMain light behind the subject, facing the viewervalidated86 %59 %32
Directionrim_lightBright edge outlining the subjectlow recall75 %11 %28
DirectionsidelightingLight from one side, the other half in marked shadowlow precision50 %13 %23
DirectionoverlightingLight from above, with marked downward shadowsvalidated94 %34 %50
DirectionunderlightingLight from below (lamp, fire, screen)validated100 %35 %31
DirectionspotlightA targeted beam isolates the subjectvalidated71 %83 %12
Directioncrack_of_lightLight entering a dark space through a gapvalidated100 %58 %12
Contrasthigh_contrastDeep blacks against bright highlights, few midtonesvalidated86 %44 %27
Contrastlow_contrastCompressed tones: soft, hazy, washed-outlow recall100 %14 %14
ContrastchiaroscuroLight and shadow structure the whole compositionvalidated100 %49 %35
ContrastsilhouetteSubject reduced to a dark outline against lightlow recall100 %17 %18
Qualitysoft_lighting (new)Volumes modeled by soft, gradual shadowslow precision63 %74 %25
Qualityhard_lighting (new)Sharp-edged shadows and marked highlightsvalidated90 %65 %16
Qualitydramatic_lightingLight staged for mood, like a film shotvalidated75 %79 %42
Qualityvolumetric_lightingLight visible in the air: mist, dust, beamslow recall91 %21 %48
Qualitycomplex_lighting (new)Two or more distinct sources light the subjectvalidated79 %45 %10
Colorwarm_lightingClearly warm light tinting the subjectvalidated100 %59 %17
Colorcool_lightingClearly cool light tinting the subjectlow recall100 %11 %18
Colorgolden_hourLow golden sun after sunrise or before sunsetvalidated80 %76 %21
Colorcolored_lights (new)Several saturated lights of different colorslow recall88 %28 %17
Colorred_lightSaturated red light tinting the scenevalidated91 %74 %27
Colororange_lightSaturated orange light tinting the scenelow recall100 %19 %21
Coloryellow_light (new)Saturated yellow light tinting the scenevalidated100 %35 %20
Colorgreen_lightSaturated green light tinting the scenelow precision67 %92 %13
Colorblue_light (new)Saturated blue light tinting the scenevalidated91 %62 %16
Colorpurple_lightSaturated purple light tinting the scenevalidated88 %70 %20
Colorpink_light (new)Saturated pink light tinting the scenevalidated91 %56 %18
Effectslight_rays (new)Distinct beams of light crossing the airvalidated100 %54 %14
Effectslight_particlesShining particles floating in the airvalidated82 %49 %37
Effectslens_flareLens artifact: streaks, halos, aligned circlesvalidated100 %43 %14
Effectsbloom (new)Blurry glow spilling over nearby edgesvalidated78 %78 %20
EffectsoverexposureHighlights blown out to pure whitedoes not work–0 %24
Effectsdiffraction_spikesStar-shaped spikes around a bright sourcevalidated91 %77 %13
EffectscausticsRippling light patterns cast by water or glassvalidated94 %74 %23
EffectsrefractionImage bent or shifted through water or glassvalidated100 %54 %13
Effectsdispersion_(optics) (new)Light split into rainbow colors (prism, crystal)validated94 %88 %17
Effectssubsurface_scatteringLight glowing through skin, leaves, waxlow precision50 %10 %10
Effectsvignetting (new)Edges and corners of the image gradually darkenvalidated100 %71 %20
ShadowsshadowStrong or striking cast shadowslow recall100 %18 %11
Shadowsshade (new)Subject in the shade while strong light hits the restnot measured75 %38 %8
Shadowsdappled_sunlightPatches of light through foliagevalidated95 %86 %21
Shadowswindow_shadowLight and shadow pattern from a window or blindsvalidated89 %75 %32
Shadowscolored_shadow (new)Shadows with a clear hue, not just darkernot measured–––
Shadowsshaded_face (new)Upper face or eyes in shadowvalidated91 %60 %24
Shadowspartially_shaded_faceFace split into a lit half and a shaded halfvalidated89 %33 %24
SourcessunlightSunlight emphasizedvalidated100 %38 %26
SourcesmoonlightPale moonlight at nightvalidated81 %100 %17
SourcescandlelightScene lit mostly by candlesvalidated90 %95 %19
Sourcesfire_lightScene lit by the orange glow of a firevalidated100 %73 %26
Sourcesscreen_lightA visible screen lights a charactervalidated88 %91 %23
SourcesglowingAn object or character emits lightvalidated85 %74 %23
SourcesnightNight scenevalidated92 %79 %14
SourcessunsetSun near the horizon, orange or red skyvalidated100 %92 %37

Precision and recall are measured at the tagger's default thresholds against blind answers from one human annotator, on about 1,600 test images never seen in training (near-duplicates included). The test sets are small: the figures of a single label can move by 10 to 20 points.

  • validated (38 labels): at least 70 % precision and 30 % recall, on at least 10 human positives. complex_lighting passes with exactly 10 positives: treat it as fragile.
  • low recall (8): the tag is usually right when emitted, but it misses many cases. The recall preset brings silhouette, volumetric_lighting, colored_lights and shadow over the bar, and rim_light and low_contrast close to it.
  • low precision (4): the tag is emitted too often. soft_lighting was kept as a trial: when the guideline was set, the teacher's own ratings never reached 75 % precision against the human. Use it with care.
  • does not work (1): overexposure is never emitted at its threshold, and its ranking is weak (AP 0.49). It is kept in the outputs for compatibility; do not rely on it. In tagger_config.json its status is low_recall.
  • not measured (2): shade has only 8 human positives in the tests. colored_shadow was not measured against the human on purpose: human answers on colored shadows were not reliable enough to serve as a reference, so the teacher's judgment is the reference for this label.

The tonal key (dark, dim_lighting, normal, high_key) is a single choice per image. It agrees with the teacher on 88 % of the validation images, but has no human reference.

The exact definitions, as given to the teacher, are in tagger_config.json. They share a few rules: the light is judged, not the drawing style (cel-shading, inking or an overall color grading do not count); an artificial source (screen, candles, fire) or its glow must be visible; the sun and the moon may be off frame.

Tag names follow Danbooru where the tag exists there, otherwise e621.

How it was made

  1. Taxonomy. 53 lighting labels in 7 families, plus the tonal key, each with a written definition.
  2. Teacher. Claude Opus 5.5 rated each image from 0 to 10 on every label, following a fixed guideline (v2.4). The guideline was revised several times after discussing its disagreements with a human; versions 2.2 to 2.4 recovered the 13 labels that v1 had to leave out and added dispersion_(optics).
  3. Human calibration. One annotator answered yes or no, blind and one label at a time, on test images. These answers set a threshold per label on the teacher's ratings and serve as the test reference.
  4. Training data. About 25,400 images from Danbooru, Gelbooru, e621, yande.re and Konachan, all rated by the teacher with guideline v2.4 (about 29 M tokens): the v1 images, rated again, and a new batch of 5,932 images aimed at the weakest labels. Half of the v1 images and a third of the new batch were drawn at random, the rest by booru tag to enrich the rare labels. No explicit images, no AI-generated images, no comic pages. 23,426 images were used for training and 1,946 for validation; images too close to a test image were removed.
  5. Student. WD EVA02-Large Tagger v3 with its last 16 blocks unfrozen (202 M trainable parameters). For each label, the head predicts P(rating ≥ t) for t = 1 to 10, and the score is their sum. 8 epochs, AdamW, horizontal flips only, since color or crop augmentations would change the lighting. Three seeds, whose scores are averaged.
  6. Thresholds. For each label, the threshold that gives as many tags as the teacher on the validation images.

Details, experiments and ablations: REPORT.md. An example training script, for reference, shows the method: training/README.md.

Results

ModelValidation: mean AP against the teacher (53 labels)Tests: mean AP against the human (51 labels)Validated labels
One seed alone0.725 to 0.728not measured–
This model (3 seeds averaged)0.745 (95 % CI 0.730–0.770)0.85338
Teacher (Claude Opus 5.5)–0.76941

Mean validation AP by family: light direction 0.64, contrast 0.76, light quality 0.81, light color 0.72, light effects 0.74, shadows 0.66, sources and time of day 0.91.

The tagger beats its teacher on the human tests partly because it learns the teacher's average rating, which smooths out the teacher's run-to-run noise, and because its scores are continuous where the teacher's ratings are whole numbers. It still validates three labels fewer than the teacher: its default thresholds copy the teacher's cautious tagging rate, and the teacher's own thresholds were set on these same human answers, which favors it. See the report for the caveats.

These figures are not comparable with v1.x: the labels, the guideline, the teacher's ratings and the human references all changed.

Limitations

  • Domain. Trained on anime, manga, furry and game-style illustrations from image boards, with a few hundred 3D renders. Photos, comic pages and AI-generated images were not in the training data, and the tagger was not measured on them.
  • Ratings. General and sensitive images, plus a few hundred e621 images rated questionable. No explicit image was used; behavior on explicit images was not measured.
  • Recall over precision. The default thresholds copy the teacher's tagging rate, which is cautious: when a tag is emitted it is usually right, but many images that deserve it are missed. Use --preset recall, or --jsonl and your own thresholds, if you need more recall.
  • It imitates a teacher. The tagger reproduces the judgment of Claude Opus 5.5 under one guideline, including its blind spots. The human reference comes from a single annotator.
  • Weak spots. Light direction (validation AP 0.64) and shadows (0.66) are the weakest families. Fifteen labels are not validated: rim_light, low_contrast, silhouette, volumetric_lighting, cool_lighting, colored_lights, orange_light and shadow have a low recall; sidelighting, soft_lighting, green_light and subsurface_scattering have a low precision; overexposure does not work; shade and colored_shadow are not measured against the human.
  • Resolution. Images are padded to a square and seen at 448 × 448 px. Fine effects (small caustics, thin rims) can be lost, especially on very tall or wide images.
  • Cost. Three EVA02-Large copies make it about three times slower than a single tagger; --seeds 1 trades a little accuracy for speed.

Intended use

  • Completing the captions of image datasets before training or fine-tuning generative models.
  • Searching, filtering or describing a collection of illustrations by lighting.
  • Pre-sorting images before a more expensive annotation. This works less well than in v1: on random validation images, recovering 90 % of the teacher's tags on every label means sending it 79 % of the images, because soft_lighting, hard_lighting and bloom are frequent. Without these three labels, 52 % of the images are enough.

It is not meant to judge artistic quality, and it was not designed for photographs.

Versioning

Versions are MAJOR.MINOR.PATCH. MAJOR changes the labels or their meaning, MINOR brings new weights for the same labels, and PATCH only touches thresholds, scripts or documentation. Version 2.0.0 is a major version: 14 labels were added and several definitions changed, so captions made with v1.x and v2.x should not be mixed. Each version is a tag of this repository; pin one with --revision v2.0.0 or revision="v2.0.0" (v1.0.2 for the previous model). History: CHANGELOG.md.

License and attribution

Apache License 2.0 (LICENSE), for the weights, the code and the documentation.

This model is a modified version of WD EVA02-Large Tagger v3 by SmilingWolf, released under the same license. The changes are listed in NOTICE. The weight files contain only the fine-tuned parameters; the rest is loaded from the original repository, at the revision used for training.

The training labels were produced with Claude Opus 5.5 by Anthropic. The training images belong to their artists and are not distributed here.

Citation

@misc{booru_lighting_tagger_2026,
  title        = {Booru Lighting Tagger: lighting tags for anime-style illustrations},
  author       = {MarioTheKnight},
  year         = {2026},
  version      = {2.0.0},
  howpublished = {\url{https://huggingface.co/MarioTheKnight/booru-lighting-tagger}}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
959c0b8

0 моделей