|
Download README.md from MVRL/SimLBR: direct link, hf CLI and curl.
- Browser
- Download file 3.01 kB
-
https://huggingface.co/MVRL/SimLBR/resolve/main/README.md
- Command line
-
hf download hf://MVRL/SimLBR/README.md
-
curl -L -o README.md https://huggingface.co/MVRL/SimLBR/resolve/main/README.md
3.01 kB
| 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) | |
| [](https://arxiv.org/abs/2602.20412) | |
| [](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} | |
| } | |
| ``` | |