This repository contains the majority of the code for Generating Adversarial Surfaces via Band-Limited Perturbations .
This project uses PyTorch in order to compute gradients and use accelerated hardware, hence a version of pytorch equal to 1.4 should be used.
All other packages can be installed by running
pip install -r requirements.txt
In order to compute the nearest neighbors and chamfer distance, a CUDA implementation of KNN is used. It can be installed using
git clone https://github.com/unlimblue/KNN_CUDA.git
cd KNN_CUDA
make && make install
This dependency is necessary with some types of adversarial losses, otherwise it can be skipped.
The data for the dataset can be downloaded at the following pages:
- FAUST
- CoMA (only the registered scan are required).
- SMAL (this was generated by us using the parameters available at http://smal.is.tue.mpg.de)
- SHREC14 (we used the real dataset in our experiments)
Once downloaded put the data inside a subfolder named raw
inside a root folder choosen by you; e.g. if /home/faust
is the root directory for the dataset, then the downloaded data should be put in /home/faust/raw
).
The pre-trained parametes for the classifiers can be found here. Pass this data in input when instantiating a classifier. For a more in detail explanation, look at this two tutorials:
NOTE:
Unfortunately due to compatibility reasons, most of the code done on CoMA is not currently available. I will try to integrate it in the repository as soon as I have more time.