File size: 3,005 Bytes
d92b9a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
library_name: pytorch
pipeline_tag: image-classification
tags:
  - ai-generated-image-detection
  - deepfake-detection
  - dinov3
  - cvpr2026
---

# SimLBR: Learning to Detect Fake Images by Learning to Detect Real Images (CVPR 2026)

[![arXiv](https://img.shields.io/badge/arXiv-2602.20412-b31b1b.svg?logo=arxiv&logoColor=white)](https://arxiv.org/abs/2602.20412)
[![GitHub](https://img.shields.io/badge/GitHub-mvrl%2FSimLBR-181717?logo=github)](https://github.com/mvrl/SimLBR)

Pretrained AI-generated image detectors from the CVPR 2026 paper **SimLBR**. A frozen DINOv3 ViT-L/16 backbone (LVD-1689M weights) produces one CLS embedding per image, and a small MLP head, trained with Latent Blending Regularization (LBR), predicts whether the image is real or fake.

Each file in this repo holds **only the MLP head** (~2.6 MB). The DINOv3 backbone is not redistributed here; it is downloaded from Meta under the [DINOv3 license](https://ai.meta.com/resources/models-and-libraries/dinov3-downloads/).

## Models

| Variant | Files | Training data | Benchmark | Avg. Acc | Avg. AP |
|---|---|---|---|---|---|
| `aigc` | `aigc/` | ProGAN | AIGCDetectionBenchMark (16 subsets) | 88.4 | 96.1 |
| `genimage` | `genimage/` | GenImage SD v1.4 | GenImage (8 subsets) | 91.1 | 97.1 |

Note: the GenImage numbers above differ from the paper. The paper's GenImage ADM entry was evaluated on real images only, because a data-loading bug skipped ADM's fake images (`.PNG` extension). The numbers here include all ADM images and are what the released code reproduces.

Head: `Linear(1024→512) → ReLU → Dropout → Linear(512→256) → ReLU → Dropout → Linear(256→1)`, trained with LBR α ~ U(0.5, 0.8). Output is a logit; `sigmoid(logit) > 0.5` means fake.

## Usage

Install the [SimLBR code](https://github.com/mvrl/SimLBR) and set `DINO_V3_KEY` to your DINOv3 ViT-L/16 download URL from Meta:

```bash
git clone https://github.com/mvrl/SimLBR && cd SimLBR
export DINO_V3_KEY=YOUR_DINOV3_VITL16_URL
```

Score images:

```bash
python -m simlbr.predict --pretrained aigc image1.png image2.jpg
```

Load in Python:

```python
from simlbr import SimLBR

model = SimLBR.from_pretrained("aigc")  # or "genimage"
```

Reproduce benchmark numbers:

```bash
python -m simlbr.evaluate --dataset_name aigc --data_dir /path/to/AIGCDetectionBenchMark --pretrained aigc
```

**Preprocessing matters:** images must be resized to 256×256 and normalized with `mean=(0.430, 0.411, 0.296)`, `std=(0.213, 0.156, 0.143)`, as in `simlbr.utils.make_dinov3_transform()`. The heads were trained with these exact statistics.

## Citation

```bibtex
@article{dhakal2026simlbr,
  title={SimLBR: Learning to Detect Fake Images by Learning to Detect Real Images},
  author={Dhakal, Aayush and Khanal, Subash and Sastry, Srikumar and Arndt, Jacob and Ambrozio Dias, Philipe and Lunga, Dalton and Jacobs, Nathan},
  booktitle={Computer Vision and Pattern Recognition},
  year={2026},
  organization={IEEE/CVF}
}
```