Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedrazb/vtk-to-pytorch-geometric
PyTorch Geometric point cloud representation for vtk 3D objects
https://github.com/jedrazb/vtk-to-pytorch-geometric
dataset point-cloud pytorch-geometric vtk vtk-library
Last synced: about 1 month ago
JSON representation
PyTorch Geometric point cloud representation for vtk 3D objects
- Host: GitHub
- URL: https://github.com/jedrazb/vtk-to-pytorch-geometric
- Owner: jedrazb
- Created: 2020-06-29T21:19:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-29T22:52:59.000Z (over 4 years ago)
- Last Synced: 2024-10-30T00:05:59.590Z (3 months ago)
- Topics: dataset, point-cloud, pytorch-geometric, vtk, vtk-library
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vtk-to-pytorch-geometric
Generate point cloud representation of the `.vtk` 3d object. This representation is compatible with PyTorch Geometric library.
## How to
### Read your data
First implement `read_data_objects` function in `utils.py`. You need to represent each 3d object as a dict with following attributes:
```python
{
'path': (string): absolute path to this .vtk object
'y': (int): label of the object
... and optional attributes
}
```
Note that you can pass more attributes to the dict. Those will be automatically passed to the PyTorch Geometric abstraction as well.### Generate and save your PyTorch Geometric Dataset
To generate the dataset use `generate.py` script
```bash
python generate.py \
--path /path/to/dataset \
--num_points 1024
```
Args:- `path` arguments means where your dataset will be stored. Dataset generated to `path` just once. All instances of Dataset object (e.g. in your train code) with existing path will just read the data instead of processing it.
- `num_points` Number of points uniformly sampled from the shape surface