GithubHelp home page GithubHelp logo

phymucs / 3d-adv-pc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiangchong1/3d-adv-pc

0.0 2.0 0.0 24.66 MB

Generating 3D Adversarial Point Clouds

License: MIT License

Python 79.46% C++ 13.80% Shell 0.48% Cuda 6.26%

3d-adv-pc's Introduction

Generating 3D Adversarial Point Clouds

By Chong Xiang, Charles R. Qi, Bo Li

Sample code for CVPR 2019 paper "Generating 3D Adversarial Point Clouds" arXiv

attack pipeline

Requirement

This code is tested with Python 2.7 and Tensorflow 1.10.0

Other required packages include numpy, joblib, sklearn, etc.

Usage

There are four Python scripts in the root directorty for different attacks:

  • perturbation.py -- Adversarial Point Pertubations
  • independent.py -- Adversarial Independent Points
  • cluster.py -- Adversarial Clusters
  • object.py -- Adversarial Objects

The code logics of these four scripts are similar; they attack the victim objects into the specified target class. The basic usage is python perturbation.py --target=5.

Other parameters can be founded in the script, or run python perturbation.py -h. The default parameters are the ones used in the paper.

Other files

  • log/model.ckpt -- the victim model used in the paper. Download link.
  • data/attacked_data.z -- the victim data used in the paper. It can be loaded with joblib.load, resulting in a Python list whose element is a numpy array (shape: 25*1024*3; 25 objects of the same class, each object is represented by 1024 points)
  • gen_initial.py -- used to generate initial points for adversarial cluster/object. The script uses DBSCAN to cluster the generated critical points.
  • critical -- the default directory to dump the generated initial points
  • data/airplane.py -- the airplane object used in the paper as a uav for the adversarial object. can be loaded with np.load.
  • utils/tf_nndistance -- a self-defined tensorlfow op used for Chamfer/Hausdorff distance calculation. Use tf_nndistance_compile.sh to compile the op. The bash code may need modification according to the version and installtion path of CUDA. Note that it should be OK to directly calculate Chamfer/Hausdorff distance with available tf ops instead of tf_nndistance.

Misc

  • The sample adversarial point clouds can be downloaded here. The targeted model is log/model.ckpt
  • The aligned version of ModelNet40 data (in point cloud data format) can be downloaded here.
  • The visulization in the paper is rendered with MeshLab
  • Please open an issue or contact Chong Xiang ([email protected]) if there is any question.

3d-adv-pc's People

Contributors

xiangchong1 avatar

Watchers

 avatar  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.