torch_geometric.datasets.ShapeNet
- class ShapeNet(root: str, categories: Optional[Union[str, List[str]]] = None, include_normals: bool = True, split: str = 'trainval', transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, pre_filter: Optional[Callable] = None, force_reload: bool = False)[source]
Bases:
InMemoryDataset
The ShapeNet part level segmentation dataset from the “A Scalable Active Framework for Region Annotation in 3D Shape Collections” paper, containing about 17,000 3D shape point clouds from 16 shape categories. Each category is annotated with 2 to 6 parts.
- Parameters:
root (str) – Root directory where the dataset should be saved.
categories (str or [str], optional) – The category of the CAD models (one or a combination of
"Airplane"
,"Bag"
,"Cap"
,"Car"
,"Chair"
,"Earphone"
,"Guitar"
,"Knife"
,"Lamp"
,"Laptop"
,"Motorbike"
,"Mug"
,"Pistol"
,"Rocket"
,"Skateboard"
,"Table"
). Can be explicitly set toNone
to load all categories. (default:None
)include_normals (bool, optional) – If set to
False
, will not include normal vectors as input features todata.x
. As a result,data.x
will beNone
. (default:True
)split (str, optional) – If
"train"
, loads the training dataset. If"val"
, loads the validation dataset. If"trainval"
, loads the training and validation dataset. If"test"
, loads the test dataset. (default:"trainval"
)transform (callable, optional) – A function/transform that takes in an
torch_geometric.data.Data
object 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.Data
object 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.Data
object and returns a boolean value, indicating whether the data object should be included in the final dataset. (default:None
)force_reload (bool, optional) – Whether to re-process the dataset. (default:
False
)
STATS:
#graphs
#nodes
#edges
#features
#classes
16,881
~2,616.2
0
3
50