This repository provides the official PyTorch implementation of the following conference paper:
Shape-invariant 3D Adversarial Point Clouds (CVPR 2022)
Qidong Huang1, Xiaoyi Dong1, Dongdong Chen2, Hang Zhou3, Weiming Zhang1, Nenghai Yu1
1University of Science and Technology of China, 2Microsoft Cloud AI, 3Simon Fraser University
To setup a conda environment, download the required dataset, and begin the attack process:
conda env create -f environment.yml
conda activate si_adv_pc
bash download.sh
python main.py --transfer_attack_method ifgm_ours
The code is tested with Python3.7, Pytorch >= 1.6 and CUDA >= 10.2, including the following dependencies:
- tqdm >= 4.52.0
- numpy >= 1.19.2
- scipy >= 1.6.3
- open3d >= 0.13.0
- torchvision >= 0.7.0
- scikit-learn >= 1.0
When running the code on CurveNet for the first time, it will take a few minutes to automatically compile the cuda extension. Here we list our dependencies for reference:
- gcc == 9.4.0
- ninja == 1.7.2
Download the aligned ModelNet40 dataset and ShapeNetPart dataset in their point cloud format and unzip them into your own dataset path.
Download the pretrained models we provided for attack evaluation and unzip them at ./checkpoint
. The available models include
PointNet,
PointNet++,
DGCNN,
PointCNN,
PointConv,
RS-CNN,
PCT,
PAConv,
SimpleView and
CurveNet.
To implement white-box shape-invariant attack on PointNet, please run the following command:
python main.py
--dataset ModelNet40
--data_path /your/path/to/dataset/
--transfer_attack_method ifgm_ours
--surrogate_model pointnet_cls
--target_model pointnet_cls
--step_size 0.007
--max_steps 50
--eps 0.16
To implement transfer-based attack from PointNet to black-box target CurveNet, please run the following command:
python main.py
--dataset ModelNet40
--data_path /your/path/to/dataset/
--transfer_attack_method ifgm_ours
--surrogate_model pointnet_cls
--target_model curvenet
--step_size 0.007
--max_steps 50
--eps 0.16
To implement black-box query-based shape-invariant attack, if you choose DGCNN as the surrogate model to attack target black-box PAConv, please run the following command:
python main.py
--dataset ModelNet40
--data_path /your/path/to/dataset/
--query_attack_method ours
--surrogate_model dgcnn
--target_model paconv
--step_size 0.32
If you find this work useful for your research, please cite our paper:
@inproceedings{huang2022siadv,
title={Shape-invariant 3D Adversarial Point Clouds},
author={Qidong Huang and Xiaoyi Dong and Dongdong Chen and Weiming Zhang and Nenghai Yu},
journal={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2022}
}
The code is released under MIT License (see LICENSE file for details).