Open C-c-candy opened 1 week ago
Hi, Would it be possible for you to provide a few sets of original and attacked image pairs for both attacks? Thanks.
I've found the reason; it's because I have an issue with the way I'm saving images. My original image saving also has problems. Could you teach me how to save them properly? I'm currently unable to save adversarial samples and adversarial noise. Do you have any code for saving that you could conveniently share with me to take a look?Thank you for your reply!
In dataloader.py,I see
self.transform = transforms.Compose([
transforms.Resize((self.testsize, self.testsize)),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406],
[0.229, 0.224, 0.225])])
self.gt_transform = transforms.ToTensor()
The saved results look a bit strange. How can I modify them?
I use this code to save image:input_adv = input_adv.data.cpu().numpy()
input_adv = input_adv.transpose(1, 2, 0)
input_adv = (input_adv * 255).astype('uint8')
cv2.imwrite("result0905/pic.png", input_adv),The result like this picture ,there must something wrong with my code!If it convenient ,please help me~
Hi author, When I was reproducing the code, I found that after saving the attacked adversarial examples, there was a significant difference between the attacked adversarial samples and the original images, whether it was targeted or untargeted attacks. However, in the images of your paper, I noticed that the difference between the attacked images and the original images after the attack was not very large. How was this issue resolved?