Views
No views yet
| File | Size | Description |
|---|---|---|
k400_clip_complete_finetuned_30_epochs.pth | ~1.6 GB | ViFi-CLIP (ViT-B/16) image encoder, fine-tuned on Kinetics-400 for 30 epochs |
best_detector_model.pt | ~3 MB | MLP classification head (dense → dense1 → dense2), trained on the DAViD dataset + CDDB |
real, deepfake, ai_gen. It was trained on a mix
of the DAViD video dataset and CDDB (an image-based deepfake benchmark),
so it supports both video and single-image input.model.py, encoder.py, and the clip/ package) are
not in this weights repo — they live in the training repo
aitf-its-tim3-dfk/david
(branch feat-cddb). Clone it first and run from inside it:1git clone -b feat-cddb https://github.com/aitf-its-tim3-dfk/david
2cd david
3pip install -r requirements.txtfrom model import ... and from encoder import ... below work.1from huggingface_hub import hf_hub_download
2
3REPO = "aitf-its-tim3-dfk/david-encoder"
4encoder_ckpt = hf_hub_download(REPO, "k400_clip_complete_finetuned_30_epochs.pth")
5classifier_ckpt = hf_hub_download(REPO, "best_detector_model.pt")1import torch
2from encoder import load_feature_extractor # from the cloned GitHub repo
3from model import ClassificationHead # from the cloned GitHub repo
4
5feature_extractor = load_feature_extractor(
6 arch="ViT-B/16",
7 class_names=("real", "deepfake", "ai_gen"),
8 checkpoint_path=encoder_ckpt,
9).eval()
10
11classifier = ClassificationHead(input_dim=512, num_classes=3)
12classifier.load_state_dict(torch.load(classifier_ckpt, map_location="cpu", weights_only=False))
13classifier.eval()
14
15# feats = feature_extractor.image_encoder(frames) # (N, 512)
16# logits = classifier(feats.mean(dim=0, keepdim=True)) # (1, 3)feat-cddb).aitf-its-tim3-dfk/Davidaitf-its-tim3-dfk/david (branch feat-cddb)other). The CLIP
backbone, Kinetics-400, and CDDB carry their own upstream licenses/terms.