Skip to content

vBazilevich/ColorFool

 
 

Repository files navigation

ColorFool

This is a fork of official repository of ColorFool: Semantic Adversarial Colorization, a work published in The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, Washington, USA, 14-19 June, 2020.

Alt Text Example of results

Original Image Attack AlexNet Attack ResNet18 Attack ResNet50
Original Image Attack AlexNet Attack ResNet18 Attack ResNet50

This fork is aimed to simplify integration of the model into REST API.

Setup

  1. Download source code from GitHub
     git clone https://github.com/vBazilevich/ColorFool.git
    
  2. Create conda virtual-environment
     conda create --name ColorFool python=3.5.6
    
  3. Activate conda environment
     source activate ColorFool
    
  4. Install requirements
     pip install -r requirements.txt
    

Note: you can get rid of conda but be ready to handle dependencies manually.

Description

Just pass a binary array to colorize function from ColorFool module.

Note: to make it working you must download segmentation model (both encoder and decoder) from here and locate in "Segmentation/models" directory.

Output

Function colorize returns a binary array that encodes produced colorful image.

Authors

References

  @InProceedings{shamsabadi2020colorfool,
    title = {ColorFool: Semantic Adversarial Colorization},
    author = {Shamsabadi, Ali Shahin and Sanchez-Matilla, Ricardo and Cavallaro, Andrea},
    booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    year = {2020},
    address = {Seattle, Washington, USA},
    month = June
  }

License

This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

About

PyTorch implementation of ColorFool: Semantic Adversarial Colorization, CVPR2020

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 65.1%
  • Python 34.7%
  • Shell 0.2%