| # 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)) | |
| ``` | |