emmi_inference.datasets.shapenet ================================ .. py:module:: emmi_inference.datasets.shapenet .. autoapi-nested-parse:: WARNING This file is a 1:1 duplicate from the ``tutorial`` folder, except ``getitem_grid_pos`` was removed to enable direct indexing over the dataset. It is here to avoid installation of a tutorial as a package and keep it isolated. Classes ------- .. autoapisummary:: emmi_inference.datasets.shapenet.ShapeNetCarStats emmi_inference.datasets.shapenet.ShapeNetCarDataset Module Contents --------------- .. py:class:: ShapeNetCarStats Normalization statistics for the ShapeNet Car dataset. These statistics are used to normalize the data during training and evaluation. .. py:attribute:: raw_pos_min :type: tuple[float] .. py:attribute:: raw_pos_max :type: tuple[float] :value: (6.0,) .. py:attribute:: raw_pos_surface_min :type: tuple[float] .. py:attribute:: raw_pos_surface_max :type: tuple[float] :value: (3,) .. py:attribute:: volume_pos_mean :type: tuple[float, float, float] .. py:attribute:: volume_pos_std :type: tuple[float, float, float] :value: (1.03378, 0.682603, 2.27282) .. py:attribute:: surface_pos_mean :type: tuple[float, float, float] :value: (9.00692e-05, 0.60236, 0.0252252) .. py:attribute:: surface_pos_std :type: tuple[float, float, float] :value: (0.649866, 0.378063, 1.35368) .. py:attribute:: surface_pressure_mean :type: tuple[float] .. py:attribute:: surface_pressure_std :type: tuple[float] :value: (48.6757,) .. py:attribute:: volume_velocity_mean :type: tuple[float, float, float] .. py:attribute:: volume_velocity_std :type: tuple[float, float, float] :value: (1.361689, 1.267649, 5.850353) .. py:attribute:: volume_sdf_mean :type: tuple[float] :value: (0.374222,) .. py:attribute:: volume_sdf_std :type: tuple[float] :value: (0.178948,) .. py:class:: ShapeNetCarDataset(root, split, position_scale = None, grid_resolution = None, num_repeats = 1, **kwargs) Bases: :py:obj:`ksuit.data.Dataset` Dataset implementeation for ShapeNet Car. Currently, supports the following properties: - position of car surface points - pressure at the surface points - normals at the surface points - positions of surrounding volume of the car - velocity at the volume points - normals at the volume points, pointing towards the car body - SDF at the volume points, w.r.t. the car body - grid positions for GINO encoder :param root: root path of the dataset. Expects a "processed" subfolder with "run_1" folders in it which contain the data files (e.g., "point_cloud.pt"). :param split: Which split to use. :param root: root of the preprocessed dataset on disk. Expects a "preprocessed" subfolder with "param0", "param1", ..., "param8" folders in it which contain the data files (e.g., "surface_points.pt"). :param split: Which split to use. Can be "train" or "test". :param position_scale: _description_. Defaults to None. :param grid_resolution: For GINO, a pre-defined grid is needed; grid_resolution specifies the resolution of the grid. Defaults to None. :param num_repeats: Number of times to repeat the same dataset within a single epoch. This is mainly used during validation, to loop of the same datapoints to reduce variances. Defaults to 1. :raises NotImplementedError: When an unknown split is provided. :raises AssertionError: If the root path does not exist or is not a preprocessed folder. :raises AssertionError: If the number of uris does not match the expected number for the split .. py:attribute:: split .. py:attribute:: position_scale :value: None .. py:attribute:: grid_resolution :value: None .. py:attribute:: source_root .. py:attribute:: num_repeats :value: 1 .. py:attribute:: grid_positions :value: None .. py:method:: get_normalization_stats() :staticmethod: Returns the normalization stats for the dataset. This is used in the collator to normalize the data. .. py:method:: getitem_surface_position(idx) Retrieves surface position (num_surface_points, 3) .. py:method:: getitem_surface_pressure(idx) Retrieves surface pressure (num_surface_points, 1) .. py:method:: getitem_surface_normals(idx) Retrieves surface normals (num_surface_points, 3) .. py:method:: getitem_volume_velocity(idx) Retrieves volume velocity (num_volume_points, 3) .. py:method:: getitem_volume_position(idx) Retrieves volume points (num_volume_points, 3) .. py:method:: getitem_volume_sdf(idx) Retrieves volume sdf w.r.t. the car body (num_volume_points, 1) .. py:method:: getitem_volume_normals(idx) Retrieves volume normals (num_volume_points, 3)