Downloads · 30 days
0
mhamza-007/cvit_deepfake_detection
cvit_deepfake_detection is a video classification model from mhamza-007. Use it for the video classification task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
The Convolutional Vision Transformer (CViT) is a hybrid architecture combining the powerful spatial feature extraction capabilities of CNNs with the long-range dependency modeling of Vision Transformers (ViT). This mo…
Downloads · 30 days
0
Access
Public
Updated Jun 2, 2025
Repo size
1.1 GB
Likes
1
Public
Click a slice to open those files.
.pth1.1 GB · 100%
From the Hugging Face model README
The Convolutional Vision Transformer (CViT) is a hybrid architecture combining the powerful spatial feature extraction capabilities of CNNs with the long-range dependency modeling of Vision Transformers (ViT). This model is purpose-built for detecting deepfake videos and is trained on DFDC.
The CViT model was tested and evaluated across multiple deepfake datasets:
| Dataset | Accuracy |
|---|---|
| FaceForensics++ FaceSwap | 69% |
| FaceForensics++ DeepFakeDetection | 91% |
| FaceForensics++ Deepfake | 93% |
| FaceForensics++ FaceShifter | 46% |
| FaceForensics++ NeuralTextures | 60% |
Note: Poor performance on the FaceShifter dataset is attributed to the model's difficulty in learning subtle visual artifacts.
| Model | Validation | Test |
|---|---|---|
| CViT | 87.25% | 91.5% |
| Model | Validation | FaceSwap | Face2Face |
|---|---|---|---|
| CViT | 93.75% | 69.69% | 69.39% |
[0.485, 0.456, 0.406][0.229, 0.224, 0.225]y ∈ [0, 1]
0 < y < 0.5: Real0.5 ≤ y ≤ 1: Fakefrom huggingface_hub import hf_hub_download
import torch
# Download model
model_path = hf_hub_download(
repo_id="mhamza-007/cvit_deepfake_detection",
filename="cvit2_deepfake_detection_ep_50.pth"
)
# Load model (example)
model = torch.load(model_path, map_location='cpu')
model.eval()