Trusted-AI / adversarial-robustness-toolbox

Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams
https://adversarial-robustness-toolbox.readthedocs.io/en/latest/
MIT License
4.87k stars 1.17k forks source link

The original image is referenced after transposition #1289

Closed TS-Lee closed 3 years ago

TS-Lee commented 3 years ago

https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/00206ee5678631ac05e430c04b46c2163d06dcf2/art/attacks/poisoning/perturbations/image_perturbations.py#L127-L131

This code snippet transpose the image if it has channels first in the shape. But the shape is taken from the original image seemingly making a false error. It looks like I can simply replace the last x by data to fix this problem, but I wonder if there can be any side effect.

beat-buesser commented 3 years ago

Hi @TS-Lee Thank you for reporting this issue, I think you are right! Could you please open a pull request towards branch dev_1.7.2?