File size: 551 Bytes
911a5bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Deepfake Detector

PyTorch-based deepfake detection model using:

- ResNet18 backbone for spatial feature extraction
- BiLSTM for temporal modeling

## Input

Tensor shape: (B, T, C, H, W)

- B: batch size
- T: number of frames
- C: channels (RGB)
- H, W: image size (e.g., 128x128 or 224x224)

You must extract frames yourself before inference.

## Output

- 0 = Real
- 1 = Fake

## Usage

```python

from inference import run_inference

import torch



x = torch.randn(1, 16, 3, 128, 128)



print(run_inference(x))

```