Skip to content

Flow-based GAN for 3D Point Cloud Generation from a Single Image

License

Notifications You must be signed in to change notification settings

weiyao1996/FlowGAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlowGAN

The official implementation of Flow-based GAN for 3D Point Cloud Generation from a Single Image (BMVC 2022)

Usage

Data Preparation

First of all, download ShapeNet dataset from ShapeNetCore.v1 and 3D-R2N2. Please refer to DPF-Nets for pre-processing scripts, because the data should be stored in hdf5 format. Here, we provide an example of Airplane category via GoogleDrive | 百度网盘 (提取码2uk2). Let me know if you need other categories and pre-trained models.

Train

All configurations can be found in configs/. By default, the trained models are saved under logs/models/. Note that you should modify lib/metrics/pytorch_structural_losses/Makefile to adapt the packages to your own environment.

python train.py ./configs/airplane.yaml svr_model_02691156 20 0.000256
python train.py ./configs/airplane.yaml svr_model_02691156 30 0.000064 --resume

Evaluation

The generated point clouds will be stored under logs/ in .h5 format, e.g., svr_model_02691156_test_2500_2500_clouds_reconstruction.h5.

python evaluate.py ./logs/ svr_model_02691156 test 2500 2500 reconstruction --weights_type learned_weights --reps 1 --f1_threshold_lst 0.0001 --cd --f1 --emd --unit_scale_evaluation

Visualization

We adopt Mitsuba renderer for the visualization of 3D point clouds. $path_mitsuba is supposed to be .../mitsuba2/build/dist/.

python render_mitsuba.py --path_h5 $path_h5 --path_png $path_png --path_mitsuba $path_mitsuba --name_png $name_png --indices 1 2 3

Citation

Please cite our work if you find this code is useful in your research.

@inproceedings{Wei_2022_BMVC,
author    = {Yao Wei and George Vosselman and Michael Ying Yang},
title     = {Flow-based GAN for 3D Point Cloud Generation from a Single Image},
booktitle = {33rd British Machine Vision Conference 2022, {BMVC} 2022, London, UK, November 21-24, 2022},
publisher = {{BMVA} Press},
year      = {2022},
url       = {https://bmvc2022.mpi-inf.mpg.de/0569.pdf}
}

Acknowledgements

We build our code based on the following codebases, many thanks to the contributors.

PointFlow [Yang et al., ICCV'19] DPF-Nets [Klokov et al., ECCV'20] MixNFs [Postels et al., 3DV'21]

About

Flow-based GAN for 3D Point Cloud Generation from a Single Image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published