metadata
license: apache-2.0
pipeline_tag: image-text-to-text
FakeReasoning
FakeReasoning is a forgery detection and reasoning framework designed to accurately detect AI-generated images and provide reliable reasoning over forgery attributes. It formulates detection and explanation as a unified Forgery Detection and Reasoning task (FDR-Task).
- Project Page: https://pris-cv.github.io/FakeReasoning/
- Paper: Toward Generalizable Forgery Detection and Reasoning
- Code: https://github.com/PRIS-CV/FakeReasoning
Model Details
FakeReasoning consists of three key components:
- Dual-branch visual encoder: Integrates CLIP and DINO to capture both high-level semantics and low-level artifacts.
- Forgery-Aware Feature Fusion Module: Leverages DINO's attention maps and cross-attention mechanisms to guide the model toward forgery-related clues.
- Classification Probability Mapper: Couples language modeling and forgery detection, enhancing overall performance.
The model was trained on the MMFR-Dataset, a large-scale dataset containing 120K images across 10 generative models with 378K reasoning annotations.
Sample Usage
To use the model, please follow the installation instructions in the official repository. You can then run inference using the following commands:
cd LLaVA/forgery_eval
export DINO_PATH='path_to_dinov2-main'
export DINO_WEIGHT='path_to_dinov2_vitl14_pretrain.pth'
python inference.py \
--model-path AnnaGao/FakeReasoning \
--img_path path_to_your_image.png
Note: Inference and evaluation require at least 30 GB of GPU memory on a single GPU.
Citation
@article{gao2025fakereasoning,
title={FakeReasoning: Towards Generalizable Forgery Detection and Reasoning},
author={Gao, Yueying and Chang, Dongliang and Yu, Bingyao and Qin, Haotian and Chen, Lei and Liang, Kongming and Ma, Zhanyu},
journal={arXiv preprint arXiv:2503.21210},
year={2025},
url={https://arxiv.org/abs/2503.21210}
}