--- 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/](https://pris-cv.github.io/FakeReasoning/) - **Paper:** [Toward Generalizable Forgery Detection and Reasoning](https://huggingface.co/papers/2503.21210) - **Code:** [https://github.com/PRIS-CV/FakeReasoning](https://github.com/PRIS-CV/FakeReasoning) ## Model Details FakeReasoning consists of three key components: 1. **Dual-branch visual encoder:** Integrates CLIP and DINO to capture both high-level semantics and low-level artifacts. 2. **Forgery-Aware Feature Fusion Module:** Leverages DINO's attention maps and cross-attention mechanisms to guide the model toward forgery-related clues. 3. **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](https://github.com/PRIS-CV/FakeReasoning). You can then run inference using the following commands: ```bash 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 ```bibtex @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} } ```