2021-10-19 20:54:46 +00:00
|
|
|
# Shape Generation and Completion Through Point-Voxel Diffusion
|
2021-11-01 07:26:00 +00:00
|
|
|
<p align="center">
|
2021-11-01 07:12:02 +00:00
|
|
|
<img src="assets/pvd_teaser.gif" width="80%"/>
|
2021-11-01 07:26:00 +00:00
|
|
|
</p>
|
2021-10-19 20:54:46 +00:00
|
|
|
|
2021-11-01 07:12:02 +00:00
|
|
|
[Project](https://alexzhou907.github.io/pvd) | [Paper](https://arxiv.org/abs/2104.03670)
|
2021-10-19 20:54:46 +00:00
|
|
|
|
2021-11-01 07:12:02 +00:00
|
|
|
Implementation of Shape Generation and Completion Through Point-Voxel Diffusion
|
2021-10-19 20:54:46 +00:00
|
|
|
|
2021-11-01 07:12:02 +00:00
|
|
|
[Linqi Zhou](https://alexzhou907.github.io), [Yilun Du](https://yilundu.github.io/), [Jiajun Wu](https://jiajunwu.com/)
|
2021-10-19 20:54:46 +00:00
|
|
|
|
|
|
|
## Requirements:
|
|
|
|
|
|
|
|
Make sure the following environments are installed.
|
|
|
|
|
|
|
|
```
|
|
|
|
python==3.6
|
|
|
|
pytorch==1.4.0
|
|
|
|
torchvision==0.5.0
|
|
|
|
cudatoolkit==10.1
|
|
|
|
matplotlib==2.2.5
|
|
|
|
tqdm==4.32.1
|
|
|
|
open3d==0.9.0
|
2021-11-01 07:12:02 +00:00
|
|
|
trimesh=3.7.12
|
|
|
|
scipy==1.5.1
|
|
|
|
```
|
|
|
|
|
|
|
|
Install PyTorchEMD by
|
2021-10-19 20:54:46 +00:00
|
|
|
```
|
2021-11-01 07:12:02 +00:00
|
|
|
cd metrics/PyTorchEMD
|
|
|
|
python setup.py install
|
|
|
|
cp build/**/emd_cuda.cpython-36m-x86_64-linux-gnu.so .
|
|
|
|
```
|
|
|
|
|
2021-10-19 20:54:46 +00:00
|
|
|
The code was tested on Unbuntu with Titan RTX.
|
|
|
|
|
2021-11-01 07:12:02 +00:00
|
|
|
## Data
|
2021-10-19 20:54:46 +00:00
|
|
|
|
2021-11-01 07:12:02 +00:00
|
|
|
For generation, we use ShapeNet point cloud, which can be downloaded [here](https://github.com/stevenygd/PointFlow).
|
2021-10-19 20:54:46 +00:00
|
|
|
|
2021-11-01 07:12:02 +00:00
|
|
|
For completion, we use ShapeNet rendering provided by [GenRe](https://github.com/xiumingzhang/GenRe-ShapeHD).
|
|
|
|
We provide script `convert_cam_params.py` to process the provided data.
|
|
|
|
|
|
|
|
For training the model on shape completion, we need camera parameters for each view
|
|
|
|
which are not directly available. To obtain these, simply run
|
2021-10-19 20:54:46 +00:00
|
|
|
```bash
|
2021-11-01 07:12:02 +00:00
|
|
|
$ python convert_cam_params.py --dataroot DATA_DIR --mitsuba_xml_root XML_DIR
|
|
|
|
```
|
|
|
|
which will create `..._cam_params.npz` in each provided data folder for each view.
|
|
|
|
|
|
|
|
## Pretrained models
|
|
|
|
Pretrained models can be downloaded [here](https://drive.google.com/drive/folders/1Q7aSaTr6lqmo8qx80nIm1j28mOHAHGiM?usp=sharing).
|
|
|
|
|
|
|
|
## Training:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ python train_generation.py --category car|chair|airplane
|
2021-10-19 20:54:46 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Please refer to the python file for optimal training parameters.
|
|
|
|
|
2021-11-01 07:12:02 +00:00
|
|
|
## Testing:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ python train_generation.py --category car|chair|airplane --model MODEL_PATH
|
|
|
|
```
|
|
|
|
|
2021-10-19 20:54:46 +00:00
|
|
|
## Results
|
|
|
|
|
2021-11-01 07:21:12 +00:00
|
|
|
Some generation and completion results are as follows.
|
2021-11-01 07:26:00 +00:00
|
|
|
<p align="center">
|
2021-11-01 07:21:12 +00:00
|
|
|
<img src="assets/gen_comp.gif" width="60%"/>
|
2021-11-01 07:26:00 +00:00
|
|
|
</p>
|
2021-11-01 07:21:12 +00:00
|
|
|
|
2021-11-01 07:26:00 +00:00
|
|
|
Multimodal completion on a ShapeNet chair.
|
|
|
|
<p align="center">
|
2021-11-01 07:21:12 +00:00
|
|
|
<img src="assets/mm_shapenet.gif" width="80%"/>
|
2021-11-01 07:26:00 +00:00
|
|
|
</p>
|
2021-10-19 20:54:46 +00:00
|
|
|
|
|
|
|
|
2021-11-01 07:21:12 +00:00
|
|
|
Multimodal completion on PartNet.
|
2021-11-01 07:26:00 +00:00
|
|
|
<<p align="center">>
|
2021-11-01 07:21:12 +00:00
|
|
|
<img src="assets/mm_partnet.gif" width="80%"/>
|
2021-11-01 07:26:00 +00:00
|
|
|
</p>
|
2021-11-01 07:21:12 +00:00
|
|
|
|
|
|
|
|
2021-11-01 07:26:00 +00:00
|
|
|
Multimodal completion on two Redwood 3DScan chairs.
|
|
|
|
<<p align="center">>
|
2021-11-01 07:21:12 +00:00
|
|
|
<img src="assets/mm_redwood.gif" width="80%"/>
|
2021-11-01 07:26:00 +00:00
|
|
|
</p>
|
2021-10-19 20:54:46 +00:00
|
|
|
|
|
|
|
## Reference
|
|
|
|
|
|
|
|
```
|
2021-11-01 07:21:12 +00:00
|
|
|
@inproceedings{Zhou_2021_ICCV,
|
|
|
|
author = {Zhou, Linqi and Du, Yilun and Wu, Jiajun},
|
|
|
|
title = {3D Shape Generation and Completion Through Point-Voxel Diffusion},
|
|
|
|
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
|
|
|
|
month = {October},
|
|
|
|
year = {2021},
|
|
|
|
pages = {5826-5835}
|
2021-10-19 20:54:46 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Acknowledgement
|
|
|
|
|
2021-11-01 07:21:12 +00:00
|
|
|
For any questions related to codes and experiment setting, please contact [Linqi Zhou](linqizhou@stanford.edu) and [Yilun Du](yilundu@mit.edu).
|