Giter VIP home page Giter VIP logo

infrared_patch_attack's Introduction

Physically Adversarial Infrared Patches with Learnable Shapes and Locations

Quick Start Examples

Install

Python>=3.6.0 is required with all requirements.txt installed including PyTorch>=1.7:

$ git clone https://github.com/shighghyujie/infrared_patch_attack.git
$ cd infrared_patch_attack
$ pip install -r requirements.txt
Preparation Before Attack You can obtain infrared pedestrian data through the following dataset:

The Opening Database FLIR ADAS to simulate the physical attacks. The Opening Database CVC-14 CVC-14

Here, we provide the our trained weights of YOLOv3 model (based on yolov3.pt) at yolov3\weights\best.pt and some images to conduct attacks in datasets\pedestrian.

Firstly, you should put the folder "weights" in "yolov3".

The weight can be downloaded from: https://pan.baidu.com/s/1cvG_FDyjMedQfixnVvHAkA, code:q1w2 or from https://drive.google.com/file/d/1qvcQGhs20eU6DGgQqtGctVXgfJspKa2V/view?usp=sharing

Attack

Running this command for attacks:

$ cd infrared_patch_attack
$ python shaped_patch_attack.py

If you want to use your own data, you can pass the dataset path to the "victim_imgs" parameter.

For more attack settings, you can change the values of parameters at config/config.py:

width, height: the width and height of optimized object(infrared mask). If the value is too large, it may prevent the mask from aggregating properly.

emp_iterations: the steps of optimization.

cover_rate: the coverage rate of infrared patches on the target.

content: the gray value of infared patch in the thermal image.

infrared_patch_attack's People

Contributors

shighghyujie avatar aries-iai avatar jeixhuang 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.