Git Product home page Git Product logo

fawa's Introduction

FAWA: Fast Adversarial Watermark Attack

Hao Jiang; Jintao Yang; Guang Hua*; Lixia Li; Ying Wang; Shenghui Tu; Song Xia

[*: corresponding author]

This repository contains the implementation of our paper FAWA: Fast Adversarial Watermark Attack


If you find this code or the paper useful, please consider citing:

@ARTICLE{fawa,
  author={Jiang, Hao and Yang, Jintao and Hua, Guang and Li, Lixia and Wang, Ying and Tu, Shenghui and Xia, Song},
  journal={IEEE Transactions on Computers}, 
  title={FAWA: Fast Adversarial Watermark Attack}, 
  year={2021},
  volume={},
  number={},
  pages={1-13},
  doi={10.1109/TC.2021.3065172}}

And if you do anything interesting with this code we'd be happy to hear from you what it was.

Contents

  1. Installation
  2. Usage

Installation

  1. Clone this repository:
git clone https://github.com/JintaoYang18/FAWA
cd FAWA/
  1. Install conda envs and requirements:
conda env create -f fawa_env.yaml
pip install -r fawa_requirements.txt

Note: if you don't have a GPU, install the cpu version of PyTorch. (We have not tested this setting.)

  1. Prepare your dataset and put it into 100_image_class_950_999_300resize directory.

  2. Modify the 3 .txt files in the root directory according to your own data.

Note: We explained the role of each .txt file in detail in the main.py file.

  1. Create pre_trained_models directories and download pre-trained .pth files:
mkdir pre_trained_models
cd pre_trained_models/

Download vgg-16 pre-trained .pth file, and put it in the pre_trained_models directory.

Usage

Generate fawa examples

python main.py

Note: The time it takes to generate the image depends on the performance of the computer, and you may have to wait. The running time can be adjusted by modifying p_size and g_round. You can even reduce the dimension of the problem, such as removing the rotation item.

Evaluate fawa examples

Note: Use your own model or pre-trained model to evaluate fawa adversarial examples.

Visualization (CAM)

Note: You can use open source code, such as:

fawa's People

Contributors

jintaoyang18 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.