File size: 1,197 Bytes
0212735
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
language:
  - zh
tags:
  - image-forgery-detection
  - convnext
  - pytorch
---

# face-forgery-detection

Image forgery detection models.

## Models

| Model | Backbone | Task |
|-------|----------|------|
| convnext_base | ConvNeXt-Base | Image Forgery Detection |
| inceptionnext_base | InceptionNeXt-Base | Image Forgery Detection |
| maxvit_base | MaxViT-Base | Image Forgery Detection |
| fastervit_2 | FasterViT-2 | Image Forgery Detection |
| internvit_300m | InternViT-300M | Image Forgery Detection |
| mambavision_t | MambaVision-T | Image Forgery Detection |
| dinov2_base | DINOv2-Base | Image Forgery Detection |

## Usage

```python
import json
import torch
from huggingface_hub import hf_hub_download

# Download model files
config_path = hf_hub_download("OhMyYuwan/face-forgery-detection", "convnext_base/config.json")
model_path  = hf_hub_download("OhMyYuwan/face-forgery-detection", "convnext_base/pytorch_model.bin")

# Load model
with open(config_path) as f:
    config = json.load(f)

from convnext_base.model import OurNet
model = OurNet(config)
state = torch.load(model_path, map_location="cpu")
model.load_state_dict(state, strict=False)
model.eval()
```