Giter Site home page Giter Site logo

point2cad's Introduction

Point2CAD: Reverse Engineering CAD Models from 3D Point Clouds

Website Open In Colab Docker

This repository implements the method from our paper titled "Point2CAD: Reverse Engineering CAD Models from 3D Point Clouds" by Yujia Liu, Anton Obukhov, Jan Dirk Wegner, and Konrad Schindler.

As shown in the figure above, it takes the raw point cloud of a CAD model scan and reconstructs its surfaces, edges, and corners.

Interactive Demo Gallery

Explore select models from the ABC CAD models dataset, showcasing their reconstruction by our method and competition, on the project page:

Quick Start

To reconstruct your own CAD model, use Colab or your local environment as described below.

Local Environment (5 min, recommended)

To process the CAD models from the assets folder, just clone the repository and run the command below in the repository root. The process finishes in less than 5 min on a machine with a GPU. Running without a GPU is also very feasible. Inspect results in the out directory.

docker run -it --rm --gpus "device=$CUDA_VISIBLE_DEVICES" -v .:/work/point2cad toshas/point2cad:v1 python -m point2cad.main

Google Colab (30 min)

Colab eliminates the need to run the application locally and use Docker. However, it may be slower due to the time taken to build the dependencies. Unlike the dockerized environment, the Colab functionality is not guaranteed. Click the badge to start:

Run with Your Data

If you want to run the process on your own point clouds, add the --help option to learn how to specify inputs file path and outputs directory path. Only in the dockerized runtime: both paths must be under the same repository root path.

Development

The code has many native dependencies, including PyMesh. To build from source and prepare a development environment, clone the repository and run the following command:

cd build && sh docker_build.sh

Then simply run from the repository root:

docker run -it --rm --gpus "device=$CUDA_VISIBLE_DEVICES" -v .:/work/point2cad point2cad python -m point2cad.main 

If docker is unavailable, refer to PyMesh installation guide to build the environment from source, or simply follow the steps from the Dockerfile or Colab installation script.

About the Demo

CAD model reconstruction from a point cloud consists of two steps: point cloud annotation with surface clusters (achieved by ParseNet, HPNet, etc.), and reconstructing the surfaces and topology.

Pretrained ParseNet models can be found here: for input points with normals and for input points without normals. To utilize it, please place the script point2cad/generate_segmentation.py in the ParseNet repository, and execute it in there.

This code focuses on the second part (views 3, 4, 5 from the teaser figure above) and requires the input point cloud in the (x, y, z, s) format, where each 3D point with x, y, z coordinates is annotated with the surface id s, such as the example in the assets folder.

The process stores the following artifacts in the output directory (out by default):

  • unclipped: unclipped surfaces ready for pairwise intersection;
  • clipped: reconstructed surfaces after clipping the margins;
  • topo: topology: reconstructed edges and corners.

Licence

This software is released under a CC-BY-NC 4.0 license, which allows personal and research use only. For a commercial license, please contact the authors. You can view a license summary here.

Acknowledgements

  • ParseNet: "ParSeNet: A Parametric Surface Fitting Network for 3D Point Clouds", Sharma G. et. al., 2020
  • geomfitty: A python library for fitting 3D geometric shapes
  • Color map: "Revisiting Perceptually Optimized Color Mapping for High-Dimensional Data Analysis", Mittelstädt. S et. al., 2014

point2cad's People

Contributors

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