cg563 / simple-blackbox-attack

Code for ICML 2019 paper "Simple Black-box Adversarial Attacks"
MIT License
191 stars 56 forks source link

why the block_idct function is used in the code? #14

Closed fzgang111 closed 3 years ago

fzgang111 commented 3 years ago

I have read the paper and the code.The dct is used in the paper,but why the block_idct function is used in the code?I am very confused. @cg563

cg563 commented 3 years ago

The block_idct function is a strict generalization of IDCT. If you set block_size = image_size, whereimage_size` is the height and width of your image, then it should be identical to applying IDCT independently across the color channels. Hope this helps.

fzgang111 commented 3 years ago

The block_idct function is a strict generalization of IDCT. If you set block_size = image_size, whereimage_size` is the height and width of your image, then it should be identical to applying IDCT independently across the color channels. Hope this helps.

Thank you. I know why the block_idct is used.