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
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.