/ Модель

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

Лицензия
MIT
Библиотека
pytorch
Опубликована
25 сен 2026

authentilens-weights

Сегментация изображенийИзображение → mask3 профессии
0скачиваний за 30 дней0лайковвеса обновлены25 сен 2026

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

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

AuthentiLens обнаруживает и локализует пиксели, изменённые заливкой Stable Diffusion 2 и SDXL на фотореалистичных изображениях.

AuthentiLens — набор весов моделей команды Aperture, созданный в рамках курса компьютерного зрения CSE344 в IIIT Delhi. Он предназначен для обнаружения областей, изменённых с помощью заливки (inpainting) в фотореалистичных изображениях Stable Diffusion 2 и SDXL. Конвейер объединяет классификатор EfficientNet-B0, который относит изображение к FAKE или REAL, и сегментатор DeepLabV3+ с энкодером ResNet-50, который оценивает вероятность изменения для каждого пикселя; также опубликован альтернативный сегментатор U-Net с ResNet-50.

Классификатор принимает изображение размером 224×224, сегментатор — 512×512. Если классификатор выдаёт REAL, но сегментатор помечает как изменённые более 30% пикселей, конвейер меняет результат на FAKE. На тесте из 1 029 изображений SD2-FR такая схема показала TPR 96,70%, однако для этого набора не измерялась частота ложных срабатываний. Модель обучена на залитых фрагментах фотореалистичных изображений SD2-FR и SDXL-FR; лицензия — MIT. Это узкоспециализированная исследовательская разработка, непригодная для решений с существенными последствиями.

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

  • поиск областей, изменённых заливкой на изображениях Stable Diffusion
  • пиксельная локализация отредактированных фрагментов фотографии
  • классификация изображения как поддельного или реального
  • анализ фотореалистичных изображений для проверки цифровых изменений

Ограничения

Обучение охватывает фотореалистичные изображения, обработанные заливкой SD2 и SDXL; модель не обучалась для GAN-изображений, полностью синтетических картинок, художественных работ и других инструментов заливки. Частота ложных срабатываний не измерена, а точность сегментации низкая; модель не подходит для решений с существенными последствиями.

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

AuthentiLens weights

Model weights for AuthentiLens, which detects diffusion-inpainted photos and localises the region that was edited.

A classifier decides FAKE vs REAL on the whole image, and a segmentation network predicts a per-pixel probability that the pixel was inpainted. When the classifier says REAL but the segmenter flags more than 30% of the pixels, the pipeline overrides the call to FAKE — that override is what catches partial edits an image-level classifier misses.

Try it in the browser: aperture-lens.streamlit.app.

Files

FileModelSizePurpose
classification/efficientnet_b0_balanced_lr2.5e-5/best_model.pthEfficientNet-B016 MBImage-level FAKE/REAL classifier. The default.
segmentation/deeplabv3plus/best_model.pthDeepLabV3+ (ResNet-50)107 MBPer-pixel inpainting mask. The default.
segmentation/unet/best_model.pthUNet (ResNet-50)130 MBAlternative segmenter.
original/deeplabv3plus_original.pthDeepLabV3+321 MBBackup: the full training checkpoint.
original/unet_original.pthUNet391 MBBackup: the full training checkpoint.

The files under classification/ and segmentation/ are weights-only: a bare state_dict, with the training checkpoint's optimizer_state_dict, epoch, val_iou and config removed. The tensors are untouched, so they produce bit-identical outputs to the originals under original/, at a third of the size. The original/ files are kept only so the training state is not lost.

Checksums

Filesha256
classification/efficientnet_b0_balanced_lr2.5e-5/best_model.pth845be70c7347acce3075fd43f2e74a0e4dd08a4c80c228e464bb7608a5cf8aed
segmentation/deeplabv3plus/best_model.pth574b34efa947905899f024cf5010a674ce45aa15e3fde63f58e56704ef97a13f
segmentation/unet/best_model.pthef9af814c1b85a88e5e3e7b9a6cb97633c650257c81966d2d4de735d1ffe5d5e
original/deeplabv3plus_original.pth5a73fdd06aa7166a7756fbd197320b53fc68a4ccf8bca18b7d8702e1dcecc60e
original/unet_original.ptha399c342e4246480567b662ed1831e7b77cd00b1cee3511954ea9c24f0290cb7

The pipeline

  1. Classify. The image is resized to 224x224 (PIL bilinear), ImageNet-normalised, and EfficientNet-B0 predicts FAKE (class 0) or REAL (class 1).
  2. Segment. The image is resized to 512x512, and DeepLabV3+ predicts a sigmoid probability per pixel. A pixel is flagged when P(inpainted) > 0.7.
  3. Override. If the classifier said REAL but more than 30% of pixels are flagged, the output is FAKE.

Training

Both segmenters: ResNet-50 encoder (ImageNet init), 512x512 inputs, batch 32, lr 1e-4, weight decay 5e-3, decoder dropout 0.3, trained on SD2-FR + SDXL-FR. The published checkpoints are from epoch 8 (best validation IoU: 0.7264 for DeepLabV3+, 0.7249 for UNet).

The classifier was fine-tuned from ImageNet on a balanced 224x224 patch dataset built from SD2-FR: for each inpainted image, one FAKE crop centred on the inpainting mask and one REAL crop with zero mask overlap from the same photo. Splits: 11,134 train / 1,596 val / 1,632 test. Learning rate 2.5e-5.

That balanced set exists because fake-only benchmarks hide classifier bias: a CIFAKE-trained ResNet-50 scores 100% on the fake-only SD2-FR test set but 1.72% real-image accuracy on the balanced set — it labels almost everything FAKE.

Results

All figures below are from the JSON files in results/, as of the 11 April 2026 snapshot of the project.

Combined pipeline

Fake-detection TPR on the 1,029-image SD2-FR test set, pixel threshold 0.7.

Classifier + segmenterClassifier aloneOverride > 30%> 50%> 70%
EfficientNet-B0 + DeepLabV3+71.43%96.70%76.77%71.43%
EfficientNet-B0 + UNet71.43%91.74%77.45%72.40%
ResNet-50 + DeepLabV3+58.99%94.85%67.15%59.18%
ResNet-50 + UNet58.99%86.59%67.54%59.67%

Classifier, on its own

Test setMetricEfficientNet-B0 (lr 2.5e-5)
SD2-FR test (1,029, all fake)Accuracy71.43%
Balanced patches (1,632)Overall accuracy61.27%
Balanced patchesFAKE accuracy50.86%
Balanced patchesREAL accuracy71.69%

Segmenters, on their own

On SD2-FR test images with ground-truth masks, pixel threshold 0.7.

SegmentermIoUPixel accuracyImages
DeepLabV3+16.76%61.76%1,029
UNet17.28%63.30%1,029

The low mIoU and the high combined TPR are consistent: the override only needs the flagged area to exceed 30%, which is a much weaker requirement than matching the mask's shape.

Limitations

  • The false-positive rate is not measured. The pipeline was evaluated on a fake-only test set, so the 96.70% is a true-positive rate with no corresponding false-positive rate. A segmenter that flags large areas on real photos would inflate it. Do not read these numbers as accuracy.
  • Narrow domain. Trained on Stable Diffusion 2 and SDXL inpainting of photoreal images. Not trained for GAN images, fully synthetic images, artwork, or other inpainting tools.
  • The task is genuinely hard. The classifier alone is near chance on the balanced set (61.27%), and human majority vote scored 44.22% on the fake-only SD2-FR images and 60.17% on the balanced patches.
  • Not suitable for any consequential decision about whether an image is genuine.

Usage

import torch, segmentation_models_pytorch as smp, torch.nn as nn
from huggingface_hub import hf_hub_download
from torchvision.models import efficientnet_b0

REPO = "iamgarvit/authentilens-weights"

classifier = efficientnet_b0(weights=None)
classifier.classifier[1] = nn.Linear(classifier.classifier[1].in_features, 2)
classifier.load_state_dict(torch.load(hf_hub_download(
    REPO, "classification/efficientnet_b0_balanced_lr2.5e-5/best_model.pth"),
    map_location="cpu"))

segmenter = smp.DeepLabV3Plus(encoder_name="resnet50", encoder_weights=None,
                              in_channels=3, classes=1, activation=None)
# The training notebook added decoder dropout this way; recreating it makes the
# checkpoint's key names line up, so strict=True succeeds.
segmenter.decoder.block = nn.Sequential(nn.Dropout2d(p=0.3), segmenter.decoder.block2)
segmenter.load_state_dict(torch.load(hf_hub_download(
    REPO, "segmentation/deeplabv3plus/best_model.pth"), map_location="cpu"))

authentilens/models.py in the repository does all of this, including the decision rule — prefer importing it over copying the snippet.

Credit

Course project for CSE344 Computer Vision, IIIT Delhi (team Aperture).

  • Divyanshu Yadav — segmentation datasets, segmentation models, pipeline ablations, web interface
  • Garvit — classification datasets, classification models, the balanced dataset, pipeline ablations, web interface
  • Rewant Anand and Tanish Bachhas — literature review, SOTA models, NoisePrint analysis, frontend template

Built on the TGIF / SD2-FR dataset (H. Mareen et al., WIFS 2024, arXiv:2407.11566), with ResNet, EfficientNet, U-Net and DeepLabV3+ architectures.

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

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

GPU в ailist

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

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

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

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

0 моделей