File size: 2,262 Bytes
26a8319
bd71570
 
 
 
26a8319
 
 
 
bd71570
d7ad105
26a8319
 
bd71570
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cae38df
 
bd71570
 
 
 
 
 
 
 
 
 
 
 
 
cae38df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: DEEPFYND Intelligence Plane
emoji: πŸ”
colorFrom: green
colorTo: gray
sdk: gradio
app_file: app.py
pinned: false
license: mit
short_description: Explainable deepfake detection API for the DEEPFYND platform
sdk_version: 6.20.0
---

# DEEPFYND β€” Intelligence Plane

The analytical core of the DEEPFYND platform (MSc Digital Forensics & Cybersecurity).
Serves both a demo UI and the REST API consumed by the platform's web, Android and
Telegram channels.

## API contract

`POST /analyze`

```json
{ "file_url": "https://...", "media_type": "image|audio|video", "scan_id": "rec..." }
```

Response:

```json
{
  "verdict": "authentic|suspicious|likely_deepfake",
  "confidence": 87.4,
  "insights": "β€’ ...",
  "heatmap_url": "https://.../heatmaps/rec....jpg",
  "file_hash": "sha256:...",
  "raw_scores": {}
}
```

`GET /health` β€” liveness check.
`GET /heatmaps/{name}` β€” serves generated explanation heatmaps.

## Layered architecture

- **Layer 1 β€” Media forensics:** EXIF/metadata inspection, generator-typical dimension checks.
- **Layer 2 β€” AI detection:** ViT image detector; wav2vec2 audio detector; frame-sampled video.
- **Layer 3 β€” Risk scoring:** three-band verdict (authentic / suspicious / likely deepfake) with confidence.
- **Layer 4 β€” Explainability:** gradient-based saliency heatmaps and plain-language reasons.

## Fail-honestly design

If media cannot be fetched, decoded, or analysed, the service returns an HTTP error.
It never fabricates a verdict. The upstream orchestration then records `Status=failed`
with a plain-language message, and users are told nothing was assessed.

## Configuration

Set in **Settings β†’ Variables and secrets**:

- `SPACE_URL` = the public URL of this Space
  (e.g. `https://lericsg-deepfynd-intelligence.hf.space`).
  Required so that generated heatmap URLs are publicly addressable.

## Baseline models

This deployment uses publicly available pretrained detectors as a **baseline**:

- Image/video: `prithivMLmods/Deep-Fake-Detector-v2-Model`
- Audio: `Heem2/wav2vec2-based-Deepfake-Audio-Detection-V3`

Fine-tuning on Ghana-relevant data is scoped as future work.

## Disclaimer

Results are decision support, not proof. Verify important content with a professional fact-checker.