LG-GAN: Label Guided Adversarial Network for Flexible Targeted Attack of Point Cloud-based Deep Networks Created by Hang Zhou, Dongdong Chen, Jing Liao, Weiming Zhang, Kejiang Chen, Xiaoyi Dong, Kunlin Liu, Gang Hua, Nenghai Yu.
This repository is for our CVPR 2020 paper LG-GAN: Label Guided Adversarial Network for Flexible Targeted Attack of Point Cloud-based Deep Networks.
This repository is based on Python 3.6, TensorFlow 1.8.0, CUDA 9.0 and cuDNN 7 on Ubuntu 18.04.
-
Set up a virtual environments using conda for the Anaconda Python distribution.
conda create -n LGGAN python=3.6 anaconda
-
Install tensorflow-gpu.
pip install tensorflow-gpu==1.8.0
-
While
nvcc
from CUDA needs to compile TF operators, install CUDA from CUDA Source Packages. After downloading, implementbash cuda_9.0.176_384.81_linux.run --tmpdir=/tmp --override
Note that the installation directory is set to
/xxx/cuda-9.0
-
For compiling TF operators, please check
tf_xxx_compile.sh
under each op subfolder intf_ops
folder. Note that you need to updatenvcc
,python
andtensoflow
to include library if necessary. -
Install other packages.
pip install h5py pip install Pillow pip install matplotlib
-
Point clouds of the ModelNet40 data in HDF5 files are downloaded and unzipped to the
data
folder.wget -c https://shapenet.cs.stanford.edu/media/modelnet40_ply_hdf5_2048.zip unzip modelnet40_ply_hdf5_2048.zip
-
Download the pretrained PointNet model from GoogleDrive, extract it and put it in folder
checkpoints/pointnet/
. -
Download neural_toolbox, extract it and put it in folder
LG-GAN
.
-
Activate LG-GAN environment.
source activate LGGAN
-
Set LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/xxx/cuda-9.0/lib64
-
Run:
python -u lggan.py --adv_path LGGAN --checkpoints_path LGGAN --log_path LGGAN --tau 1e2 python -u lggan_single.py --adv_path LGGAN_s --checkpoints_path LGGAN_s --log_path LGGAN_s --tau 1e2 python -u lg.py --adv_path LG --checkpoints_path LG --log_path LG --tau 1e2
If you find our LG-GAN is useful for your research, please consider citing:
@inproceedings{zhou2020lg,
title={LG-GAN: Label Guided Adversarial Network for Flexible Targeted Attack of Point Cloud-based Deep Networks},
author={Zhou, Hang and Chen, Dongdong and Liao, Jing and Zhang, Weiming and Chen, Kejiang and Dong, Xiaoyi and Liu, Kunlin and Hua, Gang and Yu, Nenghai},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={10356--10365},
year={2020}
}