/ Модель

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

Лицензия
MIT
Базовая модель
tf_efficientnet_b5.ns_jft_in1k
Библиотека
transformers
Опубликована
23 июн 2026

ms-eff-gcvit-deepfake-b5-kodf

Классификация видеоВидео → label3 профессии
73 147скачиваний за 30 дней2лайкавеса обновлены13 ноя 2026

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

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

Гибридная модель EfficientNet и Vision Transformer для обнаружения дипфейков на изображениях и видеокадрах с классификацией лица как настоящего или поддельного.

MS-EffGCViT-B5 — модель обнаружения дипфейков от проекта DeepGuard, разработанная как гибрид сверточной сети и Vision Transformer. Она использует EfficientNet-B5 для извлечения признаков и многоуровневое внимание с глобальным контекстом, чтобы находить локальные артефакты монтажа и несоответствия в освещении или структуре лица. Вариант B5 обрабатывает кадры размером 384×384; поддерживается классификация изображений и видео на уровне кадров с последующим объединением результатов. Для видео и изображений лица следует предварительно обрезать.

Модель предназначена для бинарного определения подлинности лица: настоящее или сгенерированное/изменённое. Она обучена на корейском наборе KoDF; автор также приводит результаты проверки на Celeb-DF-v2 и FaceForensics++, где качество переноса на западные наборы заметно ниже, чем на KoDF. Архитектура рассчитана на анализ визуальных признаков, не аудио. Репозиторий распространяется в формате safetensors, библиотека — Transformers; лицензия MIT.

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

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

Ограничения

Качество на KoDF существенно выше приведённых результатов на Celeb-DF-v2 и FaceForensics++, поэтому перенос на другие домены ограничен. Для анализа требуются кадры с обрезанными лицами; оценка видео выполняется на уровне кадров.

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

🚀 Multi Scale Efficient Global Context Vision Transformer

GitHub PyPI

Multi-Scale Efficient Global Context Vision Transformer (MS-EffGCViT) is a hybrid CNN-ViT architecture for deepfake detection. It fuses CNN-driven spatial inductive bias with hierarchical global-context attention to catch both local artifacts (textures, blending seams) and global artifacts (lighting, structural inconsistency).

A single architecture ships in two sizes and three domain-tuned checkpoints, working on both static images and video at the frame level.

🤗 Live Demo

🎬 Video Detection🖼️ Image Detection🔍 Explainability (XAI)
Frame-level verdict with per-frame scoresFace crop → real / fake probabilityGrad-CAM maps for low / high branches
Open in SpacesOpen in SpacesOpen in Spaces

⚙️ Model Specifications

SpecDetail
TaskBinary deepfake detection (real / fake)
DomainFrame-level, spatial-domain
InputImage or video (face-cropped)
OutputSigmoid probability in [0, 1] — higher = more likely fake
BackboneEfficientNet (ImageNet-1K pretrained)
FrameworkPyTorch / timm

🧬 Model Zoo

Config⚡ ms_eff_gcvit_b0 (fast)🔥 ms_eff_gcvit_b5 (pro)
Model namems_eff_gcvit_b0ms_eff_gcvit_b5
Backbonetf_efficientnet_b0.ns_jft_in1ktf_efficientnet_b5.ns_jft_in1k
Resolution224×224384×384
Params (M)8.7050.34
FLOPs (G)0.8513.43

🕐 Model Inference Latency

Latency is measured with batch size 1 on a single Tesla T4 and video (num_frames=20).

ModelModeTarget DeploymentLatency (s)Ratio
⚡ ms_eff_gcvit_b0Fast ModeEdge / on-device deployment0.0511.00×
🔥 ms_eff_gcvit_b5Pro ModeEnterprise deployment0.4799.41×

📚 Dataset: KoDF (Korean Deepfake Dataset)

Large-scale Korean deepfake dataset provided by AI-Hub in 2020

featuring 400 Korean participants across 6 deepfake synthesis methods

  • Number of Subjects: 400 participants
  • Videos per Subject: 150+ videos
  • Total Data Duration: 88.5 days
  • Deepfake Model Variants: 6 types(DeepFaceLab, FaceSwap, FSGAN, FOMM, 3DMM, Wav2Lip)
MetricOriginal DataFake Data
Total Videos62,166175,776
Average Video Length90+ second15+ second
Total Duration1,500+ hours625+ hours
Resolution1920 X 10801920 X 1080
FPS30 FPS30 FPS
Total Frames162,000,000+--

📈 Test Evaluation

Trained and tested on the same dataset.

DatasetVariantAccuracyAUCLog Loss
KoDF⚡ Fast0.96550.97920.1237
KoDF🔥 Pro0.97920.98310.0692

📊 Comparison with SOTA Models

ModelTest@AccTest@Auc#Params(M)Params Ratio#FLOPS(G)FLOPS Ratio
ms_eff_gcvit_b096.6%97.9%8.71x0.851x
sia (ECCV,2022)97.0%98.8%17.572x2.052.4x
core (CVPR,2022)96.3%99.2%20.812.4x8.409.9x
ms_eff_gcvit_b597.9%98.3%50.345.8x13.4315.8x
iid (CVPR,2023)96.5%97.6%65.57.5x12.714.9x
effort (ICML, 2025)99.0%99.5%303.434.9x155.9183.4x

📈 Cross-Dataset Evaluation (Trained on KoDF)

Generalization to unseen domains — trained on KoDF, evaluated on western-face datasets.

Tested onVariantAccuracyAUCLog Loss
Celeb-DF-v2⚡ Fast0.55790.47191.2605
Celeb-DF-v2🔥 Pro0.59460.54001.0078
FaceForensics++⚡ Fast0.48750.53411.6178
FaceForensics++🔥 Pro0.45250.59021.5321

🚀 Model Usage

pip install "deepguard>=2.0.0"
from transformers import pipeline

🖼️ Image Classification

clf = pipeline(
    "image-classification",
    model="KoreaPeter/ms-eff-gcvit-deepfake-b5-kodf", 
    trust_remote_code=True,
)

# ── Basic Inference ───────────────────────────────────────────────
result = clf("face.jpg")
# [{'label': 'fake', 'score': 0.9712}, {'label': 'real', 'score': 0.0288}]

# ── Custom Parameters ─────────────────────────────────────────────
result = clf(
    "face.jpg",
    margin_ratio=0.2,      # Margin ratio around the detected face bbox (default: 0.2)
    conf_thres=0.5,        # Confidence threshold for YOLO face detection (default: 0.5)
    min_face_ratio=0.01,   # Minimum face-to-frame area ratio to process (default: 0.01)
    tta_hflip=0.0,         # Probability of horizontal flip for TTA (default: 0.0)
    top_k=1,               # Number of top labels to return (default: all)
)
# [{'label': 'fake', 'score': 0.9712}]

🎬 Video Classification

clf = pipeline(
    "video-classification",
    model="KoreaPeter/ms-eff-gcvit-deepfake-b5-kodf",
    trust_remote_code=True,
)

# ── Basic Inference ───────────────────────────────────────────────
result = clf("video.mp4")
# [{'label': 'fake', 'score': 0.9634}, {'label': 'real', 'score': 0.0366}]

# ── Custom Parameters ─────────────────────────────────────────────
result = clf(
    "video.mp4",
    num_frames=20,              # Number of frames to sample (default: 20)
    margin_ratio=0.2,           # Margin ratio around the detected face bbox (default: 0.2)
    conf_thres=0.5,             # Confidence threshold for YOLO face detection (default: 0.5)
    min_face_ratio=0.01,        # Minimum face-to-frame area ratio to process (default: 0.01)
    tta_hflip=0.0,              # Probability of horizontal flip for TTA (default: 0.0)
    agg_mode="conf",            # Aggregation mode: 'conf' | 'mean' | 'vote' (default: 'conf')
    return_frame_scores=True,   # Return per-frame scores (default: False)
)
# [{'label': 'fake', 'score': 0.9634},
#  {'label': 'real', 'score': 0.0366},
#  {'frame_scores': [0.97, 0.95, 0.98, ...], 'agg_mode': 'conf'}]

Deep Dive into Model

Part 1: CNN-based Patch Embedding for Spatial Inductive Bias

While traditional Vision Transformers (ViTs) utilize a Linear Projection for patch embedding, our proposed model adopts a CNN-based Patch Embedding module incorporating MBConvBlocks.

  • Injecting Inductive Bias : Standard ViTs often suffer from a lack of inherent spatial inductive bias, typically necessitating massive datasets to learn fundamental visual structures from scratch. In contrast, our CNN-based module leverages overlapping receptive fields to facilitate information sharing between neighboring patches. By explicitly injecting this spatial bias into the architecture, the model achieves more stable and accelerated convergence during the training process.

Part 2: Long-Short Range Spatial Interaction

We utilizes two distinct types of self-attention to capture both long-range and short-range information across feature maps.

  • Local Window Attention: this model efficiently captures local textures and precise spatial details while maintaining linear computational complexity relative to the image size.

  • Global Window Attention: Unlike Swin Transformer, this module utilizes global-queries that interact with local window keys and values. This allows each local region to incorporate global context, effectively capturing long-range dependencies and providing a comprehensive understanding of the entire spatial structure

Part 3: Computational Efficiency

  • Efficient Backbone While both Xception and EfficientNet show great results on DeepFake benchmarks, EfficientNet is chosen for its superior computational efficiency. By utilizing MBconv (Inverted Residual Blocks) and depthwise convolutions, it achieves significantly lower FLOPS compared to Xception.

  • Window-based Attention: Instead of applying self-attention on raw images, this model operates on feature maps extracted from backbone blocks. By partitioning these maps into windows, the $O(N^2)$ complexity is restricted to the window size, siginificantly lowering the computational footprint.

Part 4: Multi-Scale Feature Map Fusion

Modern DeepFakes can leave very localized forgery region. To Capture this, we adopts a multi-scale strategy by extracting features from different levels of the backbone.

  • (Subtle Artifacts): High-Resolution feature maps are extracted from early backbone blocks(l_block_idx) to capture like skin texture or boundary artifacts

  • (Global Features): Low-Resolution feature maps are extracted from deeper blocks(h_block_idx) to analyze overall lighting, shadows, and structural consistency.

  • Feature Fusion: The Outputs from both branches (L-GCViT and H-GCViT) are fused to make a comprehensive decision based on both local and global context.

🤝 Citation

@misc{deepguard2026,
  title  = {DeepGuard: Multi-Scale Efficient Global Context Vision Transformer for Deepfake Detection},
  author = {seoyunje},
  year   = {2026},
  url    = {https://github.com/HanMoonSub/DeepGuard}
}

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Ревизия весов
4c6bdeb

0 моделей