Skip to content

Zhu-Luyu/MAID

Repository files navigation

MAID

Datasets

Our experiments are based on the open-source datasets DiffusionForensics, Artifact and GenImage.

Installation

  1. Clone this repository and navigate to the MAID folder:

    git clone https://github.com/Zhu-Luyu/MAID.git
    cd MAID
  2. Install the required packages:

    conda env create -f environment.yaml -n maid
    conda activate maid
  3. Download pre-trained diffusion models:

Training & Evaluation

Modify the script parameters as needed to run training and evaluation:

sh train.sh
sh eval.sh

To run DMA extraction before training or evaluation:

cd dma
# DDIM
python compute_dma.py --diffusion_name "ddim" --diffusion_path path/to/your/ddim/checkpoint_file.ckpt --dataroot path/to/img_dataset --postfix "_ddim" --batch_size 100
# IF. The usage of LDM, SD, and DiT is similar
python compute_dma.py --diffusion_name "if" --diffusion_path path/to/your/if/model_folder --dataroot path/to/img_dataset --postfix "_if" --batch_size 100

Model Classes

We selected the following model classes for the experiment:

  1. DiffusionForensics (LSUN bedroom subset)
Framework Classes
GAN StyleGAN
Diffusion Model ADM, IDDPM, PNDM
- Real
  1. Artifact
Framework Classes
GAN BiqGAN, CIPS, CycleGAN, Denoising Diffusion GAN, Diffusion GAN, Gansformer, GauGAN, Lama, ProGAN, ProjectedGAN, StarGAN, StyleGAN, Taming Transformer, Generative Inpainting
Diffusion Model Latent Diffusion, Stable Diffusion, VQ Diffusion, Glide, Palette, Mat
- Real
  1. GenImage
Framework Classes
GAN BigGAN
Diffusion Model ADM, Glide, Midjourney, SDv1.5, VQDM, wukong
- Real

Acknowledgments

Our code is based on the frameworks provided by CNNDetection and DNF. We greatly appreciate their contributions and code.

Citation

If you find this work useful for your research, please cite our paper:

@inproceedings{zhu2025maid,
  title={MAID: Model Attribution via Inverse Diffusion},
  author={Luyu Zhu and Kai Ye and Jiayu Yao and Chenxi Li and Luwen Zhao and Yuxin Cao and Derui Wang and Jie Hao},
  booktitle={ICASSP 2025 - 2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)}, 
  year={2025}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published