Skip to content

ardabck/AdverseCleaner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdverseCleaner

The shortest ever code (16 lines of Python codes) to remove any 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.

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):

p

Output (removing adversarial noise, 2.13 seconds on my laptop CPU):

p

Implementations

Thank the community for making more implementations!

HuggingFace Space

Automatic1111's Webui Plugin

About

Remove adversarial noise from images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%