Args: mesh: class Mesh containing cleaned and scaled mesh and ray_casting scene. n_target_imgs: number of target images for a pcd sample (think of it as random rays) n_imgs: number of input images to create
(
self,
mesh: structures.Mesh,
n_target_imgs: int = 3,
n_imgs: int = 3,
total: int = 10000,
input_camera_setting: T.Dict[str, T.Any] = None,
input_camera_trajectory_params: T.Dict[str, T.Any] = None,
output_camera_setting: T.Dict[str, T.Any] = None,
output_camera_trajectory_params: T.Dict[str, T.Any] = None,
rng_seed: T.Union[int, None] = 0,
render_method: str = 'ray_cast',
texture_filenames: T.List[str] = None,
texture_crop_method: str = 'full', # 'random', number
min_subsample: int = 1,
max_subsample: int = 1,
)
| 19 | class MeshDataset: |
| 20 | |
| 21 | def __init__( |
| 22 | self, |
| 23 | mesh: structures.Mesh, |
| 24 | n_target_imgs: int = 3, |
| 25 | n_imgs: int = 3, |
| 26 | total: int = 10000, |
| 27 | input_camera_setting: T.Dict[str, T.Any] = None, |
| 28 | input_camera_trajectory_params: T.Dict[str, T.Any] = None, |
| 29 | output_camera_setting: T.Dict[str, T.Any] = None, |
| 30 | output_camera_trajectory_params: T.Dict[str, T.Any] = None, |
| 31 | rng_seed: T.Union[int, None] = 0, |
| 32 | render_method: str = 'ray_cast', |
| 33 | texture_filenames: T.List[str] = None, |
| 34 | texture_crop_method: str = 'full', # 'random', number |
| 35 | min_subsample: int = 1, |
| 36 | max_subsample: int = 1, |
| 37 | ): |
| 38 | """ |
| 39 | Args: |
| 40 | mesh: |
| 41 | class Mesh containing cleaned and scaled mesh and ray_casting scene. |
| 42 | n_target_imgs: |
| 43 | number of target images for a pcd sample (think of it as random rays) |
| 44 | n_imgs: |
| 45 | number of input images to create an input point cloud |
| 46 | total: |
| 47 | number of (pcd_sample, target) pairs (dataset size) |
| 48 | input_camera_settings: |
| 49 | width_px: number of pixel in the x direction |
| 50 | height_px: number of pixel in the x direction |
| 51 | fov: field ov view in degree |
| 52 | ray_offsets: 'center', 'random' |
| 53 | input_camera_trajectory_params: |
| 54 | mode: mode of the camera trajectory |
| 55 | min_r: minimum distance from camera to the mesh origin. None: min_r will be set to the min aabb size |
| 56 | max_r: maximum distance from camera to the mesh origin. |
| 57 | max_angle: spread of the images in viewing direction (in degree) |
| 58 | local_max_angle: small local rotation of each images (in degree) |
| 59 | output_camera_settings: |
| 60 | see `input_camera_settings` |
| 61 | output_camera_trajectory_params: |
| 62 | see `input_camera_trajectory_params` |
| 63 | ray_perturbation_angle: small angle to perturb target ray direction (in degree). If None: use fov / width_px. |
| 64 | rng_seed: |
| 65 | random seed to use |
| 66 | render_method: |
| 67 | 'rasterization' |
| 68 | 'ray_cast' |
| 69 | texture_filenames: |
| 70 | list of texture images to randomly use to replace the original texture |
| 71 | texture_crop_method: |
| 72 | 'full': use the full image |
| 73 | int: random crop |
| 74 | min_subsample: |
| 75 | to randomly generate subsampled input rgbd images. |
| 76 | max_subsample: |
| 77 | to randomly generate subsampled input rgbd images. |
| 78 | """ |
nothing calls this directly
no test coverage detected