/PyPipes

Reconstruction of 3D pipelines from point clouds. A Pytorch implementation of DeepPipes.

Primary LanguagePythonMIT LicenseMIT

PyPipes

Documentation | Paper | Colab Notebooks | Video Tutorials | Master Degree website

[WARNING] Project currently in progress !

This project is a PyTorch implementation of DeepPipes: Learning 3D pipelines reconstruction from point clouds. Lili Cheng, Zhuo Wei, Mingchao Sun, Shiqing Xin, Andrei Sharf, Yangyan Li, Baoquan Chen, Changhe Tu. Graphical Models, Volume 111, 2020,.

It allows to reconstruct a 3d pipe model from a points cloud.

drawing

#### Abstract

Pipes are the basic building block in many industrial sites like electricity and chemical plants. Although
pipes are merely cylindrical primitives which can be defined by axis and radius, they often consist of
additional components like flanges, valves, elbows, tees, etc. 3D pipes are typically dense, consisting of a
wide range of topologies and geometries, with large self-occlusions. Thus, reconstruction of a coherent 3D pipe
models from large-scale point clouds is a challenging problem. In this work we take a prior-based
reconstruction approach which reduces the complexity of the general pipe reconstruction problem into a
combination of part detection and model fitting problems. We utilize convolutional network to learn point cloud
features and classify points into various classes, then apply robust clustering and graph-based aggregation
techniques to compute a coherent pipe model. Our method shows promising results on pipe models with varying
complexity and density both in synthetic and real cases.

Keywords: Point cloud, Pipes reconstruction, Convo-
lution network, Skeleton extraction

Table of Contents


Architecture Overview

The pipeline

**TODO**

drawing

Neural Network

**TODO**

drawing

Download

Warning: We do not recommend installation of the environnement as a root user on your system Python. Please setup a virtual environment or create a Docker image.

cpu cu102 cu113
Linux
Windows
macOS

Requirements

**TODO**

From master

Build the project

$ git clone https://github.com/ZENULI/PyPipes.git
$ cd PyPipes
$ pip install -r requirements.txt
$ make

Test the installation

$ python3 setup.py test

You can find some more tests under the testing/ folder!

$  pytest testing/test_application.py

From Docker

See documentation here.

Getting Started

1. Generate the dataset

You can generate the dataset using our other project CloudPipesGenerator

$ python3 PATH_TO_CLOUDPIPESGENERATOR/generate_dataset.py -n 5000 -m 4 data/pointclouds
Or download our dataset online

If you do not want to generate the dataset, you can download our own.

$ chmod +x scripts/download.sh
$ ./scripts/download.sh

2. Preprocessing

3. Train the model

$ python scripts/train.py    
Or use our pretrained model

If you do not want to train the model from scratch, you can use a pretrained model. You can download the pretrained model here and the vocabulary file here. You should extract pretrained_model.zip to ./models/ and vocab.pkl to ./data/ using unzip command.

4. Test the model

$ python scripts/reconst.py --graph='graph.format'

License

Pypipes is available as open source under the terms of the MIT License.

It was created by ZENULI's team at University Paul Sabatier III :

drawing