MCPcopy Create free account
hub / github.com/apple/ml-pointersect / TrainPointersectProcess

Class TrainPointersectProcess

pointersect/script/train_v2.py:29–1461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29class TrainPointersectProcess(BaseTrainProcess):
30
31 def __init__(
32 self,
33 ## dataset_info
34 dataset_name: str = 'tex', # name of the dataset to train on, determines which dataset to download
35 dataset_root_dir: str = 'datasets/tex-models', # where the meshes are
36 mesh_filename: T.Union[str, T.List[str]] = 'bunny.obj',
37 test_mesh_filename: str = 'cat.obj',
38 batch_size: int = 2,
39 n_target_imgs: int = 2,
40 n_imgs: int = 3,
41 width_px: int = 200,
42 height_px: int = 200,
43 target_width_px: int = 20,
44 target_height_px: int = 20,
45 fov: int = 60.,
46 max_angle: float = 30.,
47 local_max_angle: float = 3.,
48 max_translate_ratio: float = 2.0, # not used
49 ray_perturbation_angle: float = 3, # not used
50 total: int = 10000,
51 pcd_subsample: int = 1, # not used, replaced by min_subsample
52 dataset_rng_seed: int = 0,
53 k: int = 40,
54 randomize_translate: bool = False,
55 # not used # whether translation amount is randomized, see utils.rectify_points
56 ray_radius: float = 0.1, # radius of the ray, used in pr
57 num_threads: int = 0,
58 train_cam_path_mode: str = 'random', # not used # random/circle # support different camera trajectory
59 generate_point_cloud_input: bool = False, # not used
60 clean_mesh: bool = True, # not used # if true, clean the obj file
61 cleaned_root_dir: str = 'datasets/cleaned_models', # not used # where the cleaned obj meshes are saved
62 skip_existed_cleaned_mesh: bool = False, # if true, will not clean the obj file again if existed
63 render_method: str = 'ray_cast', # 'ray_cast', 'rasterization'
64 min_subsample: int = 1,
65 max_subsample: int = 1, # None: same as min_subsample
66 min_k_ratio: float = 1.,
67 max_k_ratio: float = 1., # None: same as max_k_ratio
68 mesh_scale: float = 1.,
69 min_r: float = 0.5,
70 max_r: float = 3.,
71 rand_r: float = 0.,
72 texture_mode: str = 'ori', # 'files', 'imagenet'
73 texture_crop_method: T.Union[int, str] = 'ori', # or an int p indiciating the min p * p crop
74 texture_filenames: T.List[str] = None,
75 use_bucket_sampler: bool = True,
76 mix_meshes: bool = False,
77 min_num_mesh: int = 1,
78 max_num_mesh: int = 2,
79 radius_scale: float = 2.,
80 total_combined: int = None,
81 ## model_info
82 learn_dist: bool = False,
83 num_layers: int = 4, # 4, # 3,
84 dim_feature: int = 512, # 256,
85 num_heads: int = 4,
86 encoding_type: str = 'pos', # pos/ siren # support different ways of position encoding

Callers 1

train_v2.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected