GithubHelp home page GithubHelp logo

hubin111 / robust-sr-against-adversarial-attacks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lhaof/robust-sr-against-adversarial-attacks

1.0 0.0 0.0 218 KB

Shell 0.07% Python 99.87% Lua 0.06%

robust-sr-against-adversarial-attacks's Introduction

Robust Real-World Image Super-Resolution against Adversarial Attacks-ACM MM 2021

Dr. Haofeng Li is recruiting students that want to pursue PhD/Master degrees in CUHK(SZ). Please check https://haofengli.net

This repository is an official PyTorch implementation of the paper "Robust Real-World Image Super-Resolution against Adversarial Attacks" from ACM MM 2021. If you have any problems about the code, please contact [email protected]

We provide the training and testing codes, pre-trained models. You can train your model from scratch, or use the pre-trained model.

Code

Dependencies

  • Python 3.6
  • PyTorch >= 1.1.0
  • numpy
  • cv2
  • skimage
  • tqdm
  • torch-dct

Quick Start

Clone this github repo.

git clone https://github.com/yuejiutao/Robust-Real-World-Image-Super-Resolution-against-Adversarial-Attacks.git
cd Robust-Real-World-Image-Super-Resolution-against-Adversarial-Attacks

Folder

We recommend that you use the following directory structure:

yourfolder
└─Code
│   └─Robust-Real-World-Image-Super-Resolution-against-Adversarial-Attacks
│   └─Other project...
└─Data
│   └─RealSR
│       └─x4
│         └─test_LR
│         └─test_HR
│         └─train_LR
│         └─train_HR
│         └─adv
└─Other folder...         

Training

  1. Download the RealSR dataset(Version3) and unpack them like above. Then, change the dataroot and test_dataroot argument in ./options/realSR_HGSR_MSHR.py to the place where images are located.
  2. Run the adversarial training with train.py using script file train.sh.
sh train.sh
  1. You can change the exp_name in ./options/realSR_HGSR_MSHR.py and find the results in ./experiments/exp_name.

Testing

  1. Download our pre-trained models to Robust-Real-World-Image-Super-Resolution-against-Adversarial-Attacks/pre/ folder or use your pre-trained models
  2. Change the test_dataroot argument in test.sh to the place where images are located
  3. Run test.sh.
sh test.sh
  1. You can find the enlarged images under different adversarial intensities in /yourfolder/Data/RealSR/x4/adv/CDC_MC/ folder

Pretrained models

RobustRSR_X4

Citation

If you find our work useful in your research or publication, please cite:

@inproceedings{yue2021robust,
  title={Robust Real-World Image Super-Resolution against Adversarial Attacks},
  author={Yue, Jiutao and Li, Haofeng and Wei, Pengxu and Li, Guanbin and Lin, Liang},
  booktitle={Proceedings of the 29th ACM International Conference on Multimedia},
  pages={5148--5157},
  year={2021}
}

robust-sr-against-adversarial-attacks's People

Contributors

lhaof avatar yuejiutao avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.