dataset_utils
Utility functions to handle various datasets.
MultiDataLoader
Wrapper for multiple dataloaders.
Source code in sdfest/initialization/datasets/dataset_utils.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
__init__(data_loaders, probabilities)
Initialize the class.
Source code in sdfest/initialization/datasets/dataset_utils.py
63 64 65 66 67 68 69 70 71 72 |
|
__iter__()
Return infinite iterator which returns samples from sampled data_loader.
Source code in sdfest/initialization/datasets/dataset_utils.py
74 75 76 77 78 79 80 81 82 83 |
|
collate_samples(samples)
Collate sample dictionaries.
Performs standard batching and additionally batches pointsets by taking subset of points. Also supports non-tensor types, which will be returned as standard lists.
Reduces all pointsets to a common size based on the smallest set.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
samples |
List[dict]
|
Dictionary containing various types of data. All keys except "pointset" will use standard batching. All samples are expected to contain the same keys. |
required |
Returns: Dictionary containing same keys as each sample. For "pointset" key: Tensor of size (N, M_min, D) where N is the batch size, M_min the number of points in the smallest pointset and D the number of channels per point.
Source code in sdfest/initialization/datasets/dataset_utils.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|