Skip to content

filippobartolucci/PRISM_Benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRISM: PhotoRealistic Image Synthesis and Manipulation Benchmark for Generated Image Detection (CVIU 2026)

Filippo Bartolucci · Samuele Salti · Giuseppe Lisanti

Computer Vision Lab, University of Bologna, Italy

Paper Dataset BibTeX


Installation

pip install -r requirements.txt

A CUDA-capable GPU is required. Install the appropriate PyTorch build for your CUDA version from pytorch.org before running the above.


Dataset

The PRISM dataset is available on HuggingFace.

The training code expects the following folder layout:

<dataset_root>/
  imgs/                        # real images
  imgs_<GeneratorName>/        # generated images for each generator
  imgs_<GeneratorName2>/
  ...

Update the absolute paths at the top of dataset.py to point to your local copy:

PRISM_SUBTLE_TRAIN = '/path/to/PRISM/Subtle/imgs'
PRISM_FULL_TRAIN   = '/path/to/PRISM/Full/imgs'

Training

Two-phase training: phase 1 trains only the classification head on PRISM_Full with an energy-based loss; phase 2 fine-tunes the full network on PRISM_Subtle adding a triplet contrastive objective.

python train.py \
  --save_dir ./Results \
  --save_name my_run \
  --device cuda:0

Key arguments (defaults match the best model):

Argument Default Description
--resolution 384 Input resolution
--lr1 1e-3 Learning rate, phase 1
--lr2 1e-6 Learning rate, phase 2
--lambda_w 0.3 Triplet loss weight (0 = BCE only)
--margin 0.1 Triplet loss margin
--training_patience 7 Early stopping patience, phase 1
--fine_tuning_patience 7 Early stopping patience, phase 2
--comp_prob 0.2 JPEG augmentation probability
--min_quality 50 Minimum JPEG quality for augmentation
--device cuda:1 Device to train on

Evaluation

python evaluate.py \
  --model_dir /path/to/model_folder \
  --real_dir  /path/to/real/images \
  --generated_dir /path/to/generated/images \
  --device cuda:0

Pretrained detector

You can download the pretrained checkpoints from the link below:


Citation

@article{BARTOLUCCI2026104826,
  title   = {The PRISM benchmark: PhotoRealistic Image Synthesis and Manipulation to detect generated images},
  journal = {Computer Vision and Image Understanding},
  pages   = {104826},
  year    = {2026},
  doi     = {10.1016/j.cviu.2026.104826},
  url     = {https://www.sciencedirect.com/science/article/pii/S1077314226001931},
  author  = {Filippo Bartolucci and Samuele Salti and Giuseppe Lisanti}
}

About

Repository for the paper PRISM: PhotoRealistic Image Synthesis and Manipulation Benchmark for Generated Image Detection (CVIU 2026)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages