| 92 | |
| 93 | @dataclass |
| 94 | class MultiObjectDataModuleConfig: |
| 95 | scene_list: Any = "" |
| 96 | object_list: Any = "" |
| 97 | |
| 98 | # Surface |
| 99 | surface_root_dir: Any = "" |
| 100 | surface_suffix: str = "npy" |
| 101 | num_surface_samples_per_object: int = 20480 |
| 102 | return_scene: bool = False |
| 103 | |
| 104 | max_num_instances: Optional[int] = None |
| 105 | padding: bool = True |
| 106 | num_instances_per_batch: Optional[int] = 10 |
| 107 | |
| 108 | # Image input |
| 109 | image_root_dir: Any = "" |
| 110 | image_prefix: Any = "render" |
| 111 | image_suffix: str = "webp" |
| 112 | idmap_prefix: str = "semantic" |
| 113 | idmap_suffix: str = "png" |
| 114 | background_color: Union[str, float] = "white" |
| 115 | image_names: List[str] = field(default_factory=lambda: []) |
| 116 | height: int = 768 |
| 117 | width: int = 768 |
| 118 | |
| 119 | use_scene_image: bool = True |
| 120 | remove_scene_bg: bool = False |
| 121 | |
| 122 | # Data processing |
| 123 | skip_small_object: bool = False |
| 124 | small_image_proportion: float = 0.005 # (16/224)^2 |
| 125 | |
| 126 | ## Mask perturbation |
| 127 | morph_perturb: bool = False |
| 128 | max_kernel_size: int = 5 |
| 129 | p_dilation: float = 0.5 |
| 130 | |
| 131 | return_crop_padded: bool = False |
| 132 | height_crop_padded: int = 224 |
| 133 | width_crop_padded: int = 224 |
| 134 | |
| 135 | # Mix data |
| 136 | do_mix: bool = False |
| 137 | do_mix_prob: float = 0.5 |
| 138 | |
| 139 | mix_length: int = 80000 |
| 140 | mix_scene_list: str = "" |
| 141 | mix_image_root_dir: str = "" |
| 142 | mix_surface_root_dir: str = "" |
| 143 | mix_surface_suffix: str = "npy" |
| 144 | mix_image_prefix: str = "render_opaque" |
| 145 | mix_image_names: List[str] = field(default_factory=lambda: []) |
| 146 | mix_image_suffix: str = "webp" |
| 147 | |
| 148 | train_indices: Optional[Tuple[Any, Any]] = None |
| 149 | val_indices: Optional[Tuple[Any, Any]] = None |
| 150 | test_indices: Optional[Tuple[Any, Any]] = None |
| 151 | |