Downloads · 30 days
0
LavleshJ/freuid-fraud-detector
freuid-fraud-detector is a image classification model from LavleshJ. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as mit.
A two-stream forensic detector for spotting manipulated identity documents across three attack families: physical tampering, GenAI/digital edits, and print-and-recapture. Built for the IJCAI-ECAI FREUID 2026 challenge…
Downloads · 30 days
0
Access
Public
Updated Jul 15, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py20.7 KB · 80%
From the Hugging Face model README
A two-stream forensic detector for spotting manipulated identity documents across three attack families: physical tampering, GenAI/digital edits, and print-and-recapture. Built for the IJCAI-ECAI FREUID 2026 challenge (unconstrained ID-document fraud detection).
No single view catches every attack, so the model sees the image through two lenses at once:
| Stream | Channels | Catches |
|---|---|---|
| RGB | 3 | semantics, layout errors, GenAI "look" |
| SRM noise residual | 3 | splice/edit seams invisible to the eye |
These are stacked into a 6-channel input to a ConvNeXt-V2 backbone.
convnextv2_base.fcmae_ft_in22k_in1k_384, pretrained, fine-tuned with in_chans=6The challenge metric rewards both global ranking and performance at a strict operating point:
FREUID = 1 − harmonic_mean(AUC, TPR@1%FPR) # lower is better
AUC = overall separation (= 1 − area under the Detection Error Trade-off curve)TPR@1%FPR = fraction of attacks caught while flagging only 1% of genuine documentsOn a held-out validation split, the best fold reached:
| value | |
|---|---|
| FREUID | ~0.0001 |
| AUC | 0.9999 |
| TPR@1%FPR | 0.9998 |
Honest note: the near-perfect separation was learned inconsistently across folds (1 of 3 folds "cracked" the dominant discriminative signal; the others plateaued at AUC ≈ 0.92). This is a known shortcut-learning effect — the dataset contains a strong, suddenly-learnable signal. Reported numbers are internal validation, not an official leaderboard score. Treat them as an upper-bound indication, not a guarantee of generalization to unseen document types.
freuid_fold1.pt — trained weights (best fold)inference.py — standalone loader + predict(image) -> fraud_scoretrain.py — full training pipeline (5-fold, EMA, forensic augs)infer.py — batch inference → submission.csv (--test_dir parameterized)metric.py — FREUID score implementationapp.py — Gradio demo (upload an ID image → fraud score)import torch, cv2, numpy as np
from inference import load_model, predict
model = load_model("freuid_fold1.pt") # CPU or CUDA
img = cv2.cvtColor(cv2.imread("doc.jpg"), cv2.COLOR_BGR2RGB)
score = predict(model, img) # 0..1, higher = more likely fraud
print(f"fraud score: {score:.3f}")
Built as an applied AI × Security project — forensic signal analysis, adversarial (attack-simulating) augmentation, and detection-metric-aware training.