Skip to content

Releases: thourihan/DeepfakeDetection

v0.3.0 - Stability & Orchestration Update

11 Dec 02:25
9dc0e30

Choose a tag to compare

This release marks a major step toward making the DeepfakeDetection project reliable, reproducible, and more maintainable.
v0.3.0 completes the Stability & Orchestration milestone by unifying how models are trained and evaluated, replacing legacy notebooks with clean script-based training, and introducing a robust orchestration layer that keeps all models, configs, and hyperparameters in sync.


Key Improvements

Unified Training & Inference Orchestration

A new orchestration layer now drives all training and evaluation workflows.
It provides:

  • Consistent config-driven hyperparameters across models
  • One-command multi-model training
  • Automated directory layout for logs, checkpoints, and plots
  • Environment-based overrides so trainers remain lightweight and model-focused

This should simplify the training loop and eliminates duplicated boilerplate across the codebase!

Notebook -> Script Conversion

All legacy Jupyter notebooks for EfficientNet, FasterViT, and EfficientFormerV2 have been converted into clean, reproducible Python scripts, making CI, automation, and long-term maintainability easier.

Per-model Improvements & Accuracy Gains

v0.3.0 includes several enhancements that improve fine-tuning stability and model quality:

  • Early stopping + best-checkpoint saving
  • Cleaner initialization and warmup logic
  • Consistent transform toggles across backbones
  • Improved validation behaviors and correct class-count enforcement

These changes produced measurable accuracy improvements across the board on the reference dataset.

Headless Inference CLI

A new inference.py entrypoint provides:

  • Headless batch inference
  • Automatic confusion matrix & ROC curve generation
  • Per-model threshold optimization (binary case)
  • Logging of accuracy and ROC-AUC to metrics.jsonl

The CLI makes evaluation reproducible and scriptable so no UI required if the user doesn't want it.

Gradio UI Integration with Orchestrator

The web UI is now also fully orchestrator-aware:

  • It uses the same config and transforms as training
  • Loads weights automatically when provided
  • Supports Grad-CAM visualization across all models

This ensures the browser interface always reflects the true current model behavior.


Automatic Weight Downloads

Inference now detects missing weights and offers automatic download from GitHub Releases.

Users can run python inference.py --config config/inference.yaml and everything will work, even on a fresh clone.

Config Schema Validation

Configs are now validated at startup using a structured schema.
Misconfigurations, missing fields, or type mismatches surface early and clearly.

Minimal CI for Reliability

A lightweight CI workflow now runs:

  • Ruff linting
  • A small smoke test to ensure imports, configs, and entrypoints behave correctly

This helps prevent regressions and will help to keep the repo in a healthy state.

Pretrained Weights (v0.3.0 Reference Set)

This release includes pretrained weights for all configured backbones, trained using the standardized v0.3.0 training orchestrator and the unified configuration schema. These weights serve as known-good artifacts for reproducible inference and debugging, and will allow contributors to run experiments without repeating training.


Closed Issues / Milestone Completion

v0.3.0 resolves 24 issues associated with the Stability & Orchestration Update milestone, including:

  • The full training orchestrator (#20, #21, #7)
  • Script conversion and training unification (#19, #46)
  • Config schema validation (#39, #40)
  • Gradio UI integration (#23, #39)
  • Inference CLI and threshold tuning (#14, #18, #27)
  • Automated weight handling (#8, #29)
  • CI and linting (#13, #22)
  • Improved dataset validation (#28)
  • Publishing v0.3.0-compatible pretrained weights (#48)

This release represents the most stable and coherent version of the project to date.


Summary

v0.3.0 moves DeepfakeDetection from a collection of experiments into a reproducible, orchestrated, CI-backed ML pipeline.
It standardizes how models are trained and evaluated and lays the foundation for future extensions (new backbones, datasets, and training methods).

What's Changed

  • Add badges to the README by @thourihan in #12
  • Convert EfficientNet and FasterViT training notebooks into Python scripts by @thourihan in #22
  • Add linting and smoke tests by @thourihan in #23
  • Add a model orchestrator + registry and configs for training and inference by @thourihan in #25
  • Fix formatting in installation instructions by @thourihan in #26
  • Fix typo in README for training scripts section by @thourihan in #31
  • Update issue templates by @thourihan in #32
  • Check for weights during inference and add option for automatic weight download by @thourihan in #33
  • Update CI workflow names for clarity by @thourihan in #34
  • Add automatic threshold selection for models using validation set by @thourihan in #35
  • Integrate Gradio UI with Orchestrator by @thourihan in #38
  • Keep root for entrypoints and move shared orchestration code into its own package by @thourihan in #43
  • Add Pydantic-based validation for orchestrator configs by @thourihan in #44
  • Refine inference orchestration: env overrides and dataset class checks by @thourihan in #45
  • Update requirements.txt by @thourihan in #46
  • Unify trainer hyperparameters through orchestrator driven environment by @thourihan in #47
  • Move images for README to /docs/images/ from /images/ by @thourihan in #49

Full Changelog: v0.2.0...v0.3.0

v0.2.0 - Add EfficientFormerV2-S1 and Enhanced Grad-CAM Visualization

18 Oct 16:23
abea1d4

Choose a tag to compare

What's new

  • EfficientFormerV2-S1 Integration:
    Added training and inference support for the EfficientFormerV2-S1 backbone, extending the existing FasterViT and EfficientNet ensemble.

  • Standardized Weights Handling:
    All models now load weights from a weights/ directory by default. Pre-trained weights for all models are included in this release. A future update will add automatic weight downloading directly from GitHub Releases if the weights are missing locally.

  • Side-by-Side Grad-CAM Visualization:
    The inference pipeline (main.py) now generates side-by-side Grad-CAM heatmaps for each model (EfficientNet, FasterViT, and EfficientFormerV2-S1), improving interpretability and comparison between these model architectures.

v0.1.0 - FasterViT and EfficientCNN baseline

13 Oct 16:18
04baec2

Choose a tag to compare

What's in this release

  • Deepfake image detection baseline
  • Models: FasterViT, EfficientCNN
  • Training notebooks for both models
  • Inference script with Gradio and GradCAM visualization
  • Basic README

Requirements

  • Python 3.11+ and CUDA-capable GPU recommended
  • Packages listed in requirements.txt

Install

pip install -r requirements.txt