https://github.com/bchao1/3d-multiview
Utility scripts to generate 3D multi-representations datasets.
https://github.com/bchao1/3d-multiview
Last synced: 7 months ago
JSON representation
Utility scripts to generate 3D multi-representations datasets.
- Host: GitHub
- URL: https://github.com/bchao1/3d-multiview
- Owner: bchao1
- Created: 2020-09-19T14:23:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-19T17:16:19.000Z (about 5 years ago)
- Last Synced: 2025-01-28T03:17:29.683Z (8 months ago)
- Language: Python
- Size: 188 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 3D-multiview
Utility scripts to generate 3D multi-representation datasets. These scripts convert mesh data (`.off` files) in `ModelNet10`, `ModelNet40` into multiview images or voxels. To convert mesh into point clouds, we can simply use functions in packages such as `pytorch_geometry` or `trimesh`.## Download Datasets
Simple run```
./download.sh
```in each scripts folder. The dataset will be downloaded to that folder.
## Mesh to Voxels
![]()
To convert mesh to voxels, I used [`mesh-voxelization`](https://github.com/davidstutz/mesh-voxelization). For building `mesh-voxelization`, checkout the original repo. After building, move the binary in `mesh-voxelization/bin/voxelize` to `/usr/bin`.
To convert dataset from mesh representation to voxels, in each scripts folder run```
scale.sh
voxelize.sh
```
A scaled mesh dataset `[dataset name]_scaled` and a voxel dataset `[dataset_name]_voxelized` will be created in the scripts folder.## Mesh to Point Clouds
![]()
We can use `trimesh.sample.sample_surface` to generate point cloud data from surface meshes. This can be done in the data pipeline during execution.