Git Product home page Git Product logo

prs-net's Introduction

PRS-Net: Planar Reflective Symmetry Detection Net for 3D Models

Introduction

This repository is code release for PRS-Net: Planar Reflective Symmetry Detection Net for 3D Models (arXiv pdf here).

In geometry processing, symmetry is a universal type of high-level structural information of 3D models and benefits many geometry processing tasks including shape segmentation, alignment, matching, and completion. Thus it is an important problem to analyze various symmetry forms of 3D shapes. Planar reflective symmetry is the most fundamental one. Traditional methods based on spatial sampling can be time-consuming and may not be able to identify all the symmetry planes. In this paper, we present a novel learning framework to automatically discover global planar reflective symmetry of a 3D shape. Our framework trains an unsupervised 3D convolutional neural network to extract global model features and then outputs possible global symmetry parameters, where input shapes are represented using voxels. We introduce a dedicated symmetry distance loss along with a regularization loss to avoid generating duplicated symmetry planes. Our network can also identify generalized cylinders by predicting their rotation axes. We further provide a method to remove invalid and duplicated planes and axes. We demonstrate that our method is able to produce reliable and accurate results. Our neural network based method is hundreds of times faster than the state-of-the-art methods, which are based on sampling. Our method is also robust even with noisy or incomplete input surfaces.

In this repository, we provide PRS-Net model implementation (with Pytorch) as well as data preparation, training and testing scripts on ShapeNet.

Installation

The code is tested with Ubuntu 18.04, Python 3.8, Pytorch v1.7, TensorFlow v2.4.1, CUDA 10.0 and cuDNN v7.6.

Install the following Python dependencies (with pip install):

tensorflow==2.4.1
tensorboard==2.4.1
torch==1.7.1
torchsummary==1.5.1
scipy==1.6.0

And for running MATLAB code, you need to install gptoolbox.

Data preprocessing

We use MATLAB to preprocess data. First download ShapeNetCore.v2 into preprocess/shapenet and then run preprocess/precomputeShapeData.m.

Training

python train.py --dataroot ./datasets/shapenet --name exp --tf_log --num_quat 3 --num_plane 3 --batchSize 32 --weight 25

Inference

python test.py --dataroot ./datasets/shapenet --name exp --num_quat 3 --num_plane 3

Acknowledgments

The structure of this code is based on pix2pixHD, and some MATLAB code is based on volumetricPrimitives.

Citation

If you find our work useful in your research, please consider citing:

@ARTICLE{9127500,
    author={L. {Gao} and L. -X. {Zhang} and H. -Y. {Meng} and Y. -H. {Ren} and Y. -K. {Lai} and L. {Kobbelt}},
    title={PRS-Net: Planar Reflective Symmetry Detection Net for 3D Models},
    journal={IEEE Transactions on Visualization and Computer Graphics},
    year = {2020},
    volume = {},
    pages = {1-1},
    number = {},
    doi={10.1109/TVCG.2020.3003823}
}

prs-net's People

Contributors

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