torch_geometric.datasets.ModelNet
- class ModelNet(root: str, name: str = '10', train: bool = True, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, pre_filter: Optional[Callable] = None)[source]
Bases:
InMemoryDatasetThe ModelNet10/40 datasets from the “3D ShapeNets: A Deep Representation for Volumetric Shapes” paper, containing CAD models of 10 and 40 categories, respectively.
Note
Data objects hold mesh faces instead of edge indices. To convert the mesh to a graph, use the
torch_geometric.transforms.FaceToEdgeaspre_transform. To convert the mesh to a point cloud, use thetorch_geometric.transforms.SamplePointsastransformto sample a fixed number of points on the mesh faces according to their face area.- Parameters
root (str) – Root directory where the dataset should be saved.
name (str, optional) – The name of the dataset (
"10"for ModelNet10,"40"for ModelNet40). (default:"10")train (bool, optional) – If
True, loads the training dataset, otherwise the test dataset. (default:True)transform (callable, optional) – A function/transform that takes in an
torch_geometric.data.Dataobject and returns a transformed version. The data object will be transformed before every access. (default:None)pre_transform (callable, optional) – A function/transform that takes in an
torch_geometric.data.Dataobject and returns a transformed version. The data object will be transformed before being saved to disk. (default:None)pre_filter (callable, optional) – A function that takes in an
torch_geometric.data.Dataobject and returns a boolean value, indicating whether the data object should be included in the final dataset. (default:None)
STATS:
Name
#graphs
#nodes
#edges
#features
#classes
ModelNet10
4,899
~9,508.2
~37,450.5
3
10
ModelNet40
12,311
~17,744.4
~66,060.9
3
40