Deepfake Detection Efficientnet Vit

71
3
1 language
license:mit
by
faisalishfaq2005
Image Model
OTHER
New
71 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary

AI model with specialized capabilities.

Code Examples

šŸ“ Repository Structuretext
deepfake-efficientvit/
│
ā”œā”€ā”€ model.py                  # ImprovedEfficientViT class
ā”œā”€ā”€ inference.py              # Functions to run inference on videos
ā”œā”€ā”€ model.pth  # Trained weights
ā”œā”€ā”€ config.json               # Optional model metadata
ā”œā”€ā”€ requirements.txt          # Required packages
ā”œā”€ā”€ README.md
šŸš€ Usagepythonpytorch
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
import torch
from model import ImprovedEfficientViT
from inference import predict_vedio 

# 1ļøāƒ£ Download the checkpoint from Hugging Face
checkpoint_path = hf_hub_download(
    repo_id="faisalishfaq2005/deepfake-detection-efficientnet-vit",  
    filename="model.safetensors"
)

# 2ļøāƒ£ Load the model weights safely
state_dict = load_file(checkpoint_path, device="cpu")
model = ImprovedEfficientViT()
model.load_state_dict(state_dict)
model.eval()

# 4ļøāƒ£ Move to GPU if available
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)

# 3ļøāƒ£ Run inference on a video
video_path = "sample_video.mp4"
result = predict_vedio(video_path, model)
print(result)
# Example Output: {'class': 1}

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.