steven202 / semantic_adv_via_dm

[BMVC 2023] Semantic Adversarial Attacks via Diffusion Models
17 stars 2 forks source link

Problems where code does not run correctly after preparing the diffusion model #4

Open mac2win opened 9 months ago

mac2win commented 9 months ago

Prepare Diffusion Models For CelebA-HQ identity and gender datasets, we use the diffusion model weights pretrained on CelebA-HQ from DiffusionCLIP: IR-SE50. For AFHQ dataset, we use the diffusion model weights from ILVR+ADM:drive. and finetune it with the following (although the best way is to train a diffusion model for AFHQ dataset from scratch):

python main_afhq_train.py Generate Attacks The commands for CelebA-HQ identity dataset are stored in commands/command_for_celebaHQ_identity_ST_approach and commands/command_for_celebaHQ_identity_LM_approach folders.

The commands for CelebA-HQ gender dataset are stored in commands/command_for_celebaHQ_gender folder.

The commands for AFHQ dataset are stored in commands/command_for_AFHQ folder.

Basically, taking CelebA-HQ identity dataset as an example, for the ST approach, we have:

python main.py --attack \ --config celeba.yml \ --exp experimental_log_path \ --t_0 500 \ --n_inv_step 40 \ --n_test_step 40 \ --n_precomp_img 100 --mask 9 --diff 9 --tune 0 --black 0

  Hello, the first part of the code can run normally, but when running these two pieces of content, I found that it is feeling the lack of something.Then I downloaded the pre-trained model according to what you provided, but I still couldn't match the corresponding part of the code correctly, so that it could correctly run the results mentioned in your paper.May be my code ability is insufficient, please ask for your help and advice, want to repeat your results.Can you provide the weight file of this part of the code you trained? The link you made to the reference is invalid, and the subsequent provided can not be used in the code. I would like to ask you to help to provide relevant pre-trained models and weights.Thank you very much!!
mac2win commented 9 months ago

There are some problems with the lack of a lot of pre-training models, how to correspond to weights, and the provided link perception.Can you provide your cloud training model in the code related to completing this paper?I feel that some of the links given are not usable, or are difficult to correspond to parts of the code.

steven202 commented 9 months ago

Hi,

For all the model weights, I basically use model weights from DiffusionClip: https://github.com/gwang-kim/DiffusionCLIP

Hope this helps.