/ Модель

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

Лицензия
CC BY-NC 4.0
Базовая модель
openfake-swinv2-base
Библиотека
pytorch
Опубликована
3 ноя 2026

openfake-swinv2-base-attribution-head

Классификация изображенийИзображение → label3 профессии
140скачиваний за 30 дней0лайковвеса обновлены3 ноя 2026

Описание модели

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

Классификатор на базе SwinV2 определяет вероятное семейство и модель генератора для изображений, созданных ИИ.

OpenFake SwinV2 generator-attribution head — классификатор изображений, разработанный автором репозитория на основе замороженного детектора bendavidsteel/openfake-swinv2-base. Он определяет вероятного генератора изображения, которое уже распознано как созданное ИИ: относит его к одной из 15 известных семейств генераторов и может выдать более подробную метку одного из 47 чекпойнтов. Также модель возвращает сходство с ближайшим семейством и сигнал о возможном неизвестном генераторе; новые генераторы можно добавлять по нескольким примерам без переобучения.

Модель принимает изображение и выдаёт оценки и метки классификации. На отложенных изображениях OpenFake точность определения семейства составила 0,76 без сжатия и 0,73 после имитации повторной загрузки в соцсеть. Сигнал is_novel слабый: при обнаружении около 5% известных изображений он выявляет лишь примерно одну пятую изображений от генераторов, отсутствовавших в обучении. Атрибуция предполагает, что изображение создано ИИ: сначала следует проверить p_fake, поскольку голова присвоит метку генератора и обычной фотографии. Модель обучена на цельных текстово-сгенерированных изображениях; частичное редактирование, подмена лиц и липсинк не охвачены. Лицензия CC-BY-NC-4.0 разрешает использование с указанием авторства, но исключает коммерческое применение.

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

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

Ограничения

Атрибуция рассчитана на изображения, созданные ИИ, и может присвоить метку генератора реальной фотографии; сначала проверяйте p_fake. Семейство определяется с точностью 0,73 на сжатых изображениях, а сигнал о неизвестном генераторе выявляет лишь около одной пятой таких случаев; частичные правки изображений моделью не охвачены.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

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

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

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

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

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

Открыть на Hugging Face

OpenFake SwinV2 generator-attribution head

Says which image generator likely made an AI-generated image, on top of the OpenFake SwinV2-base detector. The detector stays frozen; this repo adds a small linear head (1024 → 256) trained on its pooled features. One forward pass returns:

  • p_fake: the detector's own real/fake probability, unchanged
  • family: the nearest of 15 known generator families
  • model: the nearest of 47 known model checkpoints
  • family_similarity and is_novel: how close the image is to any known family, and whether that is below a calibrated threshold (a likely unseen generator)

New generators can be added from a few example images with enroll(), without retraining.

Attribution assumes the image is AI-generated. Check p_fake first: the head will name a generator for a real photo too.

Usage

Download attribution.py from this repo, then:

from huggingface_hub import hf_hub_download
from PIL import Image
import importlib.util, sys

path = hf_hub_download("bendavidsteel/openfake-swinv2-base-attribution-head", "attribution.py")
spec = importlib.util.spec_from_file_location("attribution", path)
attribution = importlib.util.module_from_spec(spec); spec.loader.exec_module(attribution)

model = attribution.OpenFakeAttribution.from_pretrained(
    "bendavidsteel/openfake-swinv2-base-attribution-head")
print(model([Image.open("image.jpg")]))
# one dict per image, with keys:
# p_fake, family, family_similarity, model, is_novel

# add a generator the head has never seen, from a few of its images
model.enroll("my-new-generator", [Image.open(p) for p in example_paths])
print(model.attribute_enrolled([Image.open("image.jpg")]))

Requires torch, transformers, huggingface_hub and safetensors.

Known families

FamilyModel checkpoints in training
Chromachroma
DALLE3dalle-3
FLUX1flux.1-dev, flux.1-schnell, flux-1.1-pro, flux-realism, flux-mvc5000, flux-amateursnapshotphotos
GPT-Imagegpt-image-1
Grokgrok-2-image-1212
HiDreamhidream-i1-full
Ideogramideogram-3.0
Imagenimagen-3.0-002, imagen-4.0
Midjourneymidjourney-6
Mysticmystic
SD1sd-1.5, stable-diffusion-v1-4, stable-diffusion-v1-5, sd-turbo, sd-1.5-dreamshaper
SD2sd-2.1
SD3sd-3.5
SDXLsdxl, sdxl-1.0, stable-diffusion-xl-base-1.0, sd-xl-v1.0-vae-fix, sdxl-turbo, and community fine-tunes (Juggernaut, RealVis, Animagine, CyberRealistic Pony, Playground v2.5, Kolors, …); also sd-1.5-epicdream and realistic_vision_v5.1_novae (see below)
Sanatiny-random-sana

Families are the unit the head is built to separate: a fine-tune or LoRA usually inherits its base model's decoder fingerprint. The model output is finer but less reliable, especially between fine-tunes of the same base.

Two SD 1.5 fine-tunes, sd-1.5-epicdream and realistic_vision_v5.1_novae, were labelled SDXL in training by a name-matching rule, so the head reports their family as SDXL. Their model labels are correct. OpenFake's only Sana images come from tiny-random-sana, a small test checkpoint, so the Sana family does not represent the released Sana models.

Evaluation

All numbers are on OpenFake. Known-family numbers come from held-out images whose prompts never appear in training. "Compressed" means each image went through a random downscale (0.5–1×) and JPEG re-encode (quality 35–95), which roughly imitates social-media re-upload.

CleanCompressed
Family accuracy, 15 known families0.760.73
Known-family images flagged is_novel4.5%5.6%
Unseen-generator images flagged is_novel21%23%
Novelty AUROC (known vs unseen)0.810.79
Unseen generators, 5-shot enroll() accuracy (7-way)0.540.47
Unseen generators, 100-shot enroll() accuracy (7-way)0.660.61

Unseen generators are the seven families in OpenFake's test split that never appear in training: ERNIE, FLUX.2, Lumina, Nano Banana, Recraft, Seedream and Z-Image. Chance is 1/15 for known families and 1/7 for enrollment.

is_novel is a weak signal. The threshold is set so about 5% of images from known families are flagged; at that setting it catches only about one in five images from unseen generators. A flagged image is worth a closer look; an unflagged one may still come from a generator the head has never seen. Use family_similarity directly if you need a different trade-off.

Compared on the same protocol under compression, nearest-prototype attribution on the frozen detector features alone reaches 0.52 family accuracy and 0.60 novelty AUROC; the head raises both. For enrolling new generators, the frozen features and the head embedding do about equally well under compression, so enroll() uses the frozen features.

Limitations

  • File properties are a strong shortcut on OpenFake. A classifier given only width, height, file format and file size reaches 0.59 accuracy on the known families. The compressed numbers above are the better guide to performance on re-uploaded images, and real platforms change images in ways the augmentation does not cover.
  • Whole-image generation only. The training data is text-to-image output. Partial edits (inpainting, face swaps, lip-sync on real video) are outside what the head has seen, and the base detector is weak on them too.
  • Closed vocabulary. A generator outside the 15 families gets the nearest known label. Check is_novel and family_similarity, and enroll new generators when you have examples.

Training

  • Features: the base detector's pooled SwinV2 output, L2-normalised, from up to 1,500 images per family (9,684 in total). Each image contributes a clean and a compressed view.
  • Head: Linear(1024, 256) + BatchNorm1d, trained with sub-center ArcFace (3 sub-centres, margin 0.3, scale 30) on the 47 model-string labels for 40 epochs (AdamW, one-cycle LR, peak 1e-3).
  • Family prototypes: mean head embedding of each family's training images (both views). family is the nearest prototype by cosine similarity.
  • Novelty threshold: the 5th percentile of family_similarity over held-out known-family images, clean and compressed pooled (0.243).

Four head variants were compared: linear or MLP, with family or model-string labels. This one gave the best balance across known-family accuracy, novelty detection and enrollment of unseen generators.

Licence and citation

CC-BY-NC-4.0, inherited from the OpenFake dataset and the base detector. Non-commercial use only.

@misc{livernoche2025openfakeopendatasetplatform,
      title={OpenFake: An Open Dataset and Platform Toward Real-World Deepfake Detection},
      author={Victor Livernoche and Akshatha Arodi and Andreea Musulan and Zachary Yang and Adam Salvail and Gaétan Marceau Caron and Jean-François Godbout and Reihaneh Rabbany},
      year={2025},
      eprint={2509.09495},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2509.09495},
}

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

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

GPU в ailist

Универсальный рантайм · pytorch · image-classification

Можно запустить

Подбираем GPU…

Ревизия весов
0009441

0 моделей