Giter VIP home page Giter VIP logo

cdma's Introduction

About

This repository contains the official PyTorch implementation of our paper: "CDMA: Query-Efficient Black-box Attack to Deep Neural Networks with Conditional Diffusion Models".

Citation

If you think this work or our codes are useful for your research, please cite our paper via:

@article{liu2024boosting,
  title={Boosting Black-box Attack to Deep Neural Networks with Conditional Diffusion Models},
  author={Liu, Renyang and Zhou, Wei and Zhang, Tianwei and Chen, Kangjie and Zhao, Jun and Lam, Kwok-Yan},
  journal={IEEE Transactions on Information Forensics and Security},
  year={2024},
  volume={19},
  pages={5207--5219},
  publisher={IEEE}
}

Usage

Prerequisites

To run this code, ensure you have the following packages installed:

  • torch>=1.7.0
  • torchvision>=0.8.1
  • tqdm>=4.31.1
  • pillow>=7.0.0
  • matplotlib>=3.2.2
  • numpy>=1.18.1

Installation of these packages can be achieved through pip: bash pip install torch torchvision tqdm pillow matplotlib numpy

Model Weights

Download the pre-trained weights for the victim models and CDMA from GoogleDrive. After downloading, unzip the file into the root directory of this project.

Evaluation

- Untargeted Attack:

bash scripts/attack.sh

- Targeted Attack:

bash scripts/attack_T.sh

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

The implementation extends the functionality of the Palette-Image-to-Image-Diffusion-Models GitHub repository. Thanks for their excellent works!

cdma's People

Contributors

ryliu68 avatar

Stargazers

 avatar  avatar

Watchers

Lucian avatar Kostas Georgiou avatar  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.