Skip to content

[AAAI2022] Code Release of Attacking Video Recognition Models with Bullet-Screen Comments

Notifications You must be signed in to change notification settings

kay-ck/BSC-Attack

Repository files navigation

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.

@inproceedings{chen2022attacking,
  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},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={36},
  number={1},
  pages={312--320},
  year={2022}
}

About

[AAAI2022] Code Release of Attacking Video Recognition Models with Bullet-Screen Comments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages