Beyond-ImageNet-Attack
Beyond-ImageNet-Attack copied to clipboard
images are not resized lossless
Here: https://github.com/Alibaba-AAIG/Beyond-ImageNet-Attack/blob/863b758ee4f4a6d3d4e7777c5f94f457fa449f73/imagenet/convert.py#L22
This resizing is a bilinear interpolation, which can produce some loss. Nearest neighbor is said to be lossless:
resized_image = cv2.resize(image, (new_width, new_height), interpolation=cv2.INTER_NEAREST)