Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Unsupervised Point Cloud Reconstruction and Completion

Notifications You must be signed in to change notification settings

ozerodb/aml-pointcloud-recon-pletion

Repository files navigation

Unsupervised Point Cloud Reconstruction and Completion

This repository contains the project developed by me (Damiano Bonaccorsi), Alessio Santangelo and Takla Trad, for the exam of Advanced Machine Learning, academic year 2021/22.

The topic of the project, as the name of the repository suggests, is point cloud reconstruction and completion. A paper-like report is available under docs/final_report_v*.pdf.


Using this repo

Installing requirements

You can run sh setup_environment.sh for a full-fledged setup that will also download the ShapeNet dataset.

Alternatively, you can run python3 -m pip install -r requirements.txt to install the Python dependencies only.

Note: we used Python 3.9.7 all throughout the project, if you happen to have problems while installing dependencies for a different Python version, consider creating a virtual environment with the appropriate one.

Using the scripts to train/test

We provide all the scripts necessary to train and test the various architectures. Each script accepts many arguments and the best way for you to check which arguments you should use is to check the code of the script, as arguments are always found at the very top.

Nevertheless, we provide a few example commands to help you getting started

Training a reconstruction auto-encoder

One key-feature of our work is modularity, we wrote each piece of this project such that we could easily combine different kinds of encoders and decoders, rather than having a few fixed models.

As an example, to train a reconstruction framework that uses the PointNet encoder, and a medium-sized fully-connected decoder, one might run:

python3 train_reconstruction.py --encoder=pointnet --decoder=fcm   # leave the other arguments to their default value

Test the reconstruction auto-encoder

python3 test_reconstruction.py --encoder=pointnet --decoder=fcm  --checkpoint_path=...pth # specify the path of the .pth file generated by the previous script

Train DGPP for completion

python3 train_completion.py --model=dgpp   # leave the other arguments to their default value

Test DGPP for completion

python3 test_completion.py --model=dgpp --checkpoint_path=...pth # specify the path of the .pth file generated by the previous script

Using the scripts to visualize pointclouds

Visualizing a single pointcloud

python3 visualize_pointcloud.py --pointcloud_path=...pts # specify the path of the .pts file describing the pointcloud

Visualizing reconstruction (original pointcloud + reconstructed)

python3 visualize_reconstruction.py --encoder=pointnet --decoder=fcm --pointcloud_path=...pts

Visualizing completion (partial pointcloud + completed pointcloud + original pointcloud, using different viewpoints for cropping)

python3 visualize_completion.py --model=dgpp --checkpoint_path=...pth --pointcloud_path=...pts

About

Unsupervised Point Cloud Reconstruction and Completion

Topics

Resources

Stars

Watchers

Forks