Skip to content

YuCheng21/pixel2point

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Pytorch implementation of the paper: Pixel2point: 3D Object Reconstruction From a Single Image Using CNN and Initial Sphere

Input 2D Image Ground Truth Point Cloud Output Point Cloud

Environment

conda env create -f ./environment.yml
conda activate pixel2point

The code has been tested on Ubuntu 20.04, Python 3.9.13, Pytorch 1.12.1, Pytorch3D 0.7.0, CUDA 11.7

EMD Loss Function

The Earth Mover's Distance of point clouds is from: Colin97/MSN-Point-Cloud-Completion: Morphing and Sampling Network for Dense Point Cloud Completion (AAAI2020)

Dataset

required to modify the dataset path in the ./lib/settings.py

Training

python main.py

Testing

python test.py

required to modify the model path in ./lib/settings.py

Notes

  • 2022.09.18

    • Dataset: Not tested on Pix3D
    • Model: Incomplete Fully Connected Layer because CUDA out of memory
  • 2022.09.23

    • The "pytorch3d" chamfer distance on the CNN layer is non-deterministic at backward propagation on the GPU.
    • This repo uses the "pytorch" function to calculate the chamfer distance to make the loss function deterministic on the CNN layers (Increase execution time by 50%).