Multiple Issues with attack_adversarial_patch_pytorch_yolo.ipynb #2261
-
Describe the bug Issue 1 - While running Detector Predictions on Benign Images code getting bounding boxes on black images without rendering the actual image. Issue 2 - Error in Adversarial Patch Generation To Reproduce System information:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @alexdevassy Do you observe the same ValueError with torch 1.x? |
Beta Was this translation helpful? Give feedback.
-
Hi @alexdevassy thank you for pointing out these issues. I've investigated the and believe have found some answers. Issue 1 - ART will try to reuse as much memory as possible to avoid making copies. PyTorch operations like - dets = detector.predict(coco_images)
+ dets = detector.predict(coco_images.copy()) Issue 2 - Our current implementation of YOLO v3 uses the |
Beta Was this translation helpful? Give feedback.
-
Hello, I found your project and thought you might already have a patch targeting the “dog” class, or a sample image generated in your experiments. Would you be willing to share it or point me to where I might download one? I'm using it solely for personal exploration around privacy. I'll adhere to any licensing requirements or usage terms you specify. Thank you for your work and time. Best regards, |
Beta Was this translation helpful? Give feedback.
Hi @alexdevassy thank you for pointing out these issues. I've investigated the and believe have found some answers.
Issue 1 - ART will try to reuse as much memory as possible to avoid making copies. PyTorch operations like
x_tensor = torch.from_numpy(x)
andx_tensor /= 255
will reuse the same memory as the numpy array. Therefore, when we resize the torch tensor from [0, 255] to [0, 1], it also resizes the original numpy array (since its the same internal memory). This is a bug that we'll fix. For now a temporary workaround create a copy before runningpredict
:Issue 2 - Our current implementation of YOLO …