Questions tagged [adversarial-attack]

17 questions
1
vote
0 answers

Download pretrained ASVspoof model of SE-ResNet34

I want to use SE-ResNet34 or SE-ResNet18, SE-ResNet50,... pretrained model's file to serve to generate adversarial samples with PGD attack method. However, I can not find any public pretrained file. Please help me and give me a link to download…
Mai Bùi
  • 21
  • 1
  • 3
1
vote
0 answers

Generate adversarial patch on GPU

When trying to generate adversarial patch on a GPU server I get this error: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument tensors in method…
William
  • 11
  • 2
1
vote
0 answers

TypeError: transpose() received an invalid combination of arguments - got (tuple), but expected one of: (int dim0, int dim1) or (name dim0, name dim1)

I am trying to generate adversarial images using the FastGradientMethod attack in the ART library on a YOLOv5 object detection model. However, I am running into an error when attempting to generate the adversarial image using the fgm.generate()…
Mark Truss
  • 11
  • 1
1
vote
1 answer

why does pytorch's utils.save_image() change the color of my image

I am saving two images with pytorch's utils.save_image() function here. one is the real image and the other, the perturbed image (just a patch). However, the latter image lost its real appearance when saved with save_image(). # save source…
Craving_gold
  • 189
  • 1
  • 14
1
vote
1 answer

FGSM attack in Foolbox

I am using Foolbox 3.3.1 to perform some adversarial attacks on resnet50 network. The code is as follows: import torch from torchvision import models device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model =…
lmsasu
  • 7,459
  • 18
  • 79
  • 113
0
votes
0 answers

On-the-fly data augmentation

I would like to train a dataset for images on the fly adversarial. That means I would have to apply data augmentation on the fly and additionally I could integrate different attacks and sampling methods in the training process. Unfortunately I don't…
0
votes
0 answers

The model loss.grad is not None,but the parameters.grad in model is None when training

I'm traing a adversarial net against DQN, the loss uses the Q value of original obs and attacked obs , when training the net, I find the gard_value of parameter is None.How can I resolve it? for epoch in range(n_epoch): for…
0
votes
0 answers

Negative dimensions error when predicting svm

I have trained an SVM using the NSL-KDD dataset but when I try to make a prediction on it, it comes up with the error "negative dimensions are not allowed". Below is my code: `#Indexing of features and labels features = dataset[:,:-2] labels =…
0
votes
0 answers

DeepFool attack on MLP provide bad results

I'm trying to attack an MLP with DeepFool, but plotting results I have some strange behavior. First of all the MLP structure is as follows: Dense(16, activation='relu', input_shape=(512,)) Dense(16, activation='relu') Dense(2,…
0
votes
0 answers

problems using the ART library with a from scratch trained model

I am a student of artificial intelligence. I am trying to use the ART library to perform attacks on a binary classifier doing speaker recognition. However, due to some technical problems, I had to resort to training from scratch, using a Keras…
0
votes
0 answers

AttributeError: 'int' object has no attribute 'dtype' in tensor flow for IBM adversarial robustness library

I want to build a simple adversarial attack using IBM adversarial Library. my code worked before property but after update I am receiving the following error: AttributeError: 'int' object has no attribute 'dtype' I have used the example that is…
MSN
  • 173
  • 4
  • 12
0
votes
0 answers

Generating noise to create adversarial images

I have to add noise to MNIST images under the following constraints. delta is the noise that I am allowed to add, epsilon and alpha can be a free choice. Can someone tell me how can this be done using numpy? My attempt: def…
0
votes
1 answer

Why is tape.gradient returning None?

I am trying to create an adversarial example using this function: def create_adversarial_pattern(input_image, input_label): input_image = tf.cast(input_image, tf.float32) with tf.GradientTape() as tape: tape.watch(input_image) …
0
votes
1 answer

ModuleNotFoundError: No module named 'cleverhans.future'

I'm trying to install cleverhans package on Google Colab and currently getting an error for ModuleNotFoundError: No module named 'cleverhans.future' Code Attempted: !pip install -qq -e…
maximus
  • 335
  • 2
  • 16
0
votes
1 answer

How to access the origin label of an image through python script

I am trying to practice adversarial attacks in orange data mining, but am having some trouble loading the image in a python script widget. I have it set up where the import images widget is connected to the python script. 'image' has two labels that…
1
2