Coder Social home page Coder Social logo

bsc-attack's Introduction

Bullet-Screen Comment (BSC) Attack

Paper code: โ€œAttacking Video Recognition Models with Bullet-Screen Commentsโ€.

Dataset

UCF-101 and HMDB-51 datasets are preprocessing by the methods in 3D-ResNets-PyTorch.
"dataset.py" file loads specified datasets.

Dataset-C3D

Parameters "root_path", "video_path", "annotation_path" need to be customized in "opts/c3d_opt.py".

Model

C3D and LRCN models are from 3D-ResNets-PyTorch and video_adv respectively. I3D-Slow model is from GluonCV

C3D

C3D-UCF101

Parameter "pretrain_path" is the path of the pretrain model in "opts/c3d_opt.py/".
Download here.

C3D-HMDB51

Download here.

C3D-Kinetics400

Download here.

  • Use the path of the parameters file to specify the line 21 in 'opts/c3d_opt.py'.

Attacks

python main.py --root_path <str> --video_path <str> --annotation_path <str> --dataset <kinetics/ucf101/hmdb51> --model <c3d/lrcn/i3d> --n_classes <400/101/51> --mean_dataset <kinetics/ucf101/hmdb51> --pretrain_path <str>

Our implementation inludes four black-box patch-based attack: BSC Attack based on Reinforcement Learning (RL), BSC Attack based on Basin Hopping (BH), BSC Attack based on random selection and Patch Attack with white square patch in our paper. Patch Attack was originally proposed in paper; BH is the baseline in paper, which used to generate the adversarial watermark. Their implementation are in PatchAttack and Adv-watermark respectively. Besides, we use an image captioning model proposed in paper to generate different BSCs for each video, the code is in Image Captioning.

Citation

If you use the code or find this project helpful, please consider citing our paper.

@article{chen2021attacking,
  title={Attacking Video Recognition Models with Bullet-Screen Comments},
  author={Chen, Kai and Wei, Zhipeng and Chen, Jingjing and Wu, Zuxuan and Jiang, Yu-Gang},
  journal={arXiv preprint arXiv:2110.15629},
  year={2021}
}

bsc-attack's People

Contributors

kay-ck 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.