Skip to content

Asber777/advfussion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

guided-diffusion

This repository is based on openai/guided-diffusion, with modifications for generate adversarial exampels.

install as package

pip install git+https://github.com/RobustBench/robustbench.git
pip install -e .

Download pre-trained models

pre-trained model of ImageNet

Here are the download links for each model checkpoint:

pre-trained models of CIFAR-10

The link of diffusion weight is "https://drive.google.com/file/d/1B9jC_x72TxvcYWn8nOrUToIp10tPufSU/view?usp=sharing" The link of diffusion condition weight is "https://drive.google.com/file/d/1vtEbQEC_DZftDeuCgX8hg9a0oWCirji1/view?usp=sharing" set "save_dir" in script/free_main to where you put weight.

Imagenet eval at GA-attack

You could download the data/images dataset from google drive (140M) and put them at "/data/images"

We assume that you have downloaded the relevant model checkpoints and Dataset.

RUN ADVDDPM

To sample from conditional DDPM in 256*256 image, you can use the half_cam_attack.py scripts. Then we will generate 1000 samples with batch size 5. Feel free to change the hyper parameter values.

python scripts/half_cam_attack.py --adver_scale 0.4 --range_t2_e 200 --start_t 100

plz make sure that "start_t" is smaller than "timestep_respacing"(250)

  • You can run MainCondition.py to get Unrestricted Adversarial Examples on CIFAR-10.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published