Giter Site home page Giter Site logo

smgaa's Introduction

SMGAA

Code for the paper "Scattering Model Guided Adversarial Examples for SAR Target Recognition: Attack and Defense". It will be available soon.

Preparation

Please download model weights and our test set, and arrange them to './models/' and './dataset/' respectively. Please modify your torchvision.datasets.folder with the following code to automatically load the .pt file:

import torch

IMG_EXTENSIONS = (".jpg", ".jpeg", ".png", ".ppm", ".bmp", ".pgm", ".tif", ".tiff", ".webp", ".pt")

def default_loader(path: str) -> Any:
    from torchvision import get_image_backend
    if get_image_backend() == "accimage":
        return accimage_loader(path)
    else:
        if path[-3:] == '.pt':
            return torch.load(path)
        else:
            return pil_loader(path)

Evaluation

Run the command below to evaluate SMGAA attack, where '--model' assigns the victim model, '--nb_asc' set the number of adversarial scatterers, '--popbatch' is the population in search, '--maxiter' is the number of search iterations, and '--SAVE' will assure the results be saved at './Record/'. Assigning '--restart' leads to a total population of popbatch*restart that along with some models may exceed GPU memory limitation. That is, you can decompose an interested population number to popbatch*restart to satisfy hardware conditions. This may consume more time and lead to slightly different results due to seed setting.

python SMGAA.py --model alex/vgg/res/dense/mobile/aconv/shuffle/squeeze --nb_asc 2 --popbatch 100 --maxiter 90 --restart 1

Citation

If you find our paper and this repository useful, please consider citing our work.

@ARTICLE{pengsmgaa22,
  author={Peng, Bowen and Peng, Bo and Zhou, Jie and Xie, Jianyue and Liu, Li},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={Scattering Model Guided Adversarial Examples for SAR Target Recognition: Attack and Defense}, 
  year={2022},
  volume={60},
  pages={1-17},
  doi={10.1109/TGRS.2022.3213305}}

smgaa's People

Contributors

scenarri avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.