DeepSDFStruct.deep_sdf.data#
DeepSDF Data Loading and Preprocessing#
This module provides PyTorch Dataset classes and utilities for loading and preprocessing SDF training data. It handles:
Loading sampled SDF values from .npz files
Splitting samples into positive and negative regions
Batching and shuffling for training
Data normalization and clamping
Multi-class and multi-dataset support
The module is designed to work with the dataset format produced by the sampling module, where each geometry is stored as a .npz file containing positive and negative SDF samples.
Classes#
- SDFSamples
PyTorch Dataset for loading SDF samples with lazy loading and caching.
- NoMeshFileError
Exception raised when a mesh file cannot be found.
- MultipleMeshFileError
Exception raised when multiple mesh files exist in a directory.
Functions#
- get_instance_filenames
Retrieve file paths for all instances in a dataset split.
- unpack_sdf_samples
Load and preprocess SDF samples from a .npz file.
- read_sdf_samples_into_ram
Load entire dataset into RAM for faster training.
Functions
|
|
|
|
|
|
|
|
|
|
|
Classes
|
Exceptions
"Raised when a there a multiple mesh files in a shape directory |
|
Raised when a mesh file is not found in a shape directory |
- exception DeepSDFStruct.deep_sdf.data.MultipleMeshFileError#
Bases:
RuntimeError“Raised when a there a multiple mesh files in a shape directory
- exception DeepSDFStruct.deep_sdf.data.NoMeshFileError#
Bases:
RuntimeErrorRaised when a mesh file is not found in a shape directory
- class DeepSDFStruct.deep_sdf.data.SDFSamples(data_source, split, subsample, geom_dimension, load_ram=False, print_filename=False, num_files=1000000)#
Bases:
torch.utils.data.dataset.Dataset
- DeepSDFStruct.deep_sdf.data.find_mesh_in_directory(shape_dir)#
- DeepSDFStruct.deep_sdf.data.get_instance_filenames(data_source, split)#
- DeepSDFStruct.deep_sdf.data.read_sdf_samples_into_ram(filename)#
- DeepSDFStruct.deep_sdf.data.remove_nans(tensor, geom_dimension)#
- DeepSDFStruct.deep_sdf.data.unpack_sdf_samples(filename, geom_dimension, subsample=None)#
- DeepSDFStruct.deep_sdf.data.unpack_sdf_samples_from_ram(data, subsample=None)#