AdverseCleaner
The shortest ever code (16 lines of Python codes) to remove some adversarial noise from images.
It does not even use deep learning.
And I personally think anisotropic filtering methods are more effective than training noise-removal neural networks because convolution operations are essentially non-anisotropic.
In frequency domain, anisotropic methods are usually more โkillingโ.
No GPU is needed. Each 1024px image only need less than 3 seconds on my laptop CPU.
Update
2023/03/28 โ Seems that using guided filter is not safe enough because the guidance already has adversarial noise in it; the guided filter may bring the adversarial noise back. Perhaps a โsaferโ idea is to use some other things to process the initial anisotropic filtered image. I will try some random ideas when I have free time but it seems that I do not have so much free time recently.
Run
conda env create -f environment.yaml
conda activate advc
python clean.py
Feel free to take a look at the code to change input images.
Result
The test image is from here.
Input (with adversarial noise):
Output (removing adversarial noise, 2.13 seconds on my laptop CPU):
Implementations
Thank the community for making more implementations!