File size: 5,506 Bytes
8afb234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
seed: 12345
work_dir: ${hydra:runtime.cwd}
debug: false
print_config: true
ignore_warnings: true
datamodule:
  transforms:
    preparations:
      eval:
        TargetTransform:
          _target_: myria3d.pctl.transforms.transforms.TargetTransform
          _args_:
          - ${dataset_description.classification_preprocessing_dict}
          - ${dataset_description.classification_dict}
        DropPointsByClass:
          _target_: myria3d.pctl.transforms.transforms.DropPointsByClass
        CopyFullPos:
          _target_: myria3d.pctl.transforms.transforms.CopyFullPos
        CopyFullPreparedTargets:
          _target_: myria3d.pctl.transforms.transforms.CopyFullPreparedTargets
        GridSampling:
          _target_: torch_geometric.transforms.GridSampling
          _args_:
          - 0.25
        MinimumNumNodes:
          _target_: myria3d.pctl.transforms.transforms.MinimumNumNodes
          _args_:
          - 300
        MaximumNumNodes:
          _target_: myria3d.pctl.transforms.transforms.MaximumNumNodes
          _args_:
          - 40000
        CopySampledPos:
          _target_: myria3d.pctl.transforms.transforms.CopySampledPos
        Center:
          _target_: torch_geometric.transforms.Center
      predict:
        DropPointsByClass:
          _target_: myria3d.pctl.transforms.transforms.DropPointsByClass
        CopyFullPos:
          _target_: myria3d.pctl.transforms.transforms.CopyFullPos
        GridSampling:
          _target_: torch_geometric.transforms.GridSampling
          _args_:
          - 0.25
        MinimumNumNodes:
          _target_: myria3d.pctl.transforms.transforms.MinimumNumNodes
          _args_:
          - 300
        MaximumNumNodes:
          _target_: myria3d.pctl.transforms.transforms.MaximumNumNodes
          _args_:
          - 40000
        CopySampledPos:
          _target_: myria3d.pctl.transforms.transforms.CopySampledPos
        Center:
          _target_: torch_geometric.transforms.Center
    normalizations:
      NullifyLowestZ:
        _target_: myria3d.pctl.transforms.transforms.NullifyLowestZ
      NormalizePos:
        _target_: myria3d.pctl.transforms.transforms.NormalizePos
        subtile_width: ${datamodule.subtile_width}
      StandardizeRGBAndIntensity:
        _target_: myria3d.pctl.transforms.transforms.StandardizeRGBAndIntensity
    preparations_eval_list: '${oc.dict.values: datamodule.transforms.preparations.eval}'
    preparations_predict_list: '${oc.dict.values: datamodule.transforms.preparations.predict}'
    normalizations_list: '${oc.dict.values: datamodule.transforms.normalizations}'
  _target_: myria3d.pctl.datamodule.hdf5.HDF5LidarDataModule
  epsg: 2154
  data_dir: null
  split_csv_path: null
  hdf5_file_path: null
  points_pre_transform:
    _target_: functools.partial
    _args_:
    - ${get_method:myria3d.pctl.points_pre_transform.lidar_hd.lidar_hd_pre_transform}
  pre_filter:
    _target_: functools.partial
    _args_:
    - ${get_method:myria3d.pctl.dataset.utils.pre_filter_below_n_points}
    min_num_nodes: 1
  tile_width: 1000
  subtile_width: 50
  subtile_overlap_predict: ${predict.subtile_overlap}
  batch_size: 10
  num_workers: 3
  prefetch_factor: 3
dataset_description:
  _convert_: all
  classification_preprocessing_dict:
    3: 5
    4: 5
    66: 65
  classification_dict:
    1: unclassified
    2: ground
    5: vegetation
    6: building
    9: water
    17: bridge
    64: lasting_above
  d_in: 9
  num_classes: 7
callbacks:
  log_code:
    _target_: myria3d.callbacks.comet_callbacks.LogCode
    code_dir: ${work_dir}/myria3d
  log_logs_dir:
    _target_: myria3d.callbacks.comet_callbacks.LogLogsPath
  lr_monitor:
    _target_: pytorch_lightning.callbacks.LearningRateMonitor
    logging_interval: step
    log_momentum: true
  model_checkpoint:
    _target_: pytorch_lightning.callbacks.ModelCheckpoint
    monitor: val/loss_epoch
    mode: min
    save_top_k: 1
    save_last: true
    verbose: true
    dirpath: checkpoints/
    filename: epoch_{epoch:03d}
    auto_insert_metric_name: false
  early_stopping:
    _target_: pytorch_lightning.callbacks.EarlyStopping
    monitor: val/loss_epoch
    mode: min
    patience: 6
    min_delta: 0
model:
  _target_: myria3d.models.model.Model
  d_in: ${dataset_description.d_in}
  num_classes: ${dataset_description.num_classes}
  classification_dict: ${dataset_description.classification_dict}
  ckpt_path: FRACTAL-LidarHD_7cl_randlanet.ckpt
  neural_net_class_name: PyGRandLANet
  neural_net_hparams:
    num_features: ${model.d_in}
    num_classes: ${model.num_classes}
    num_neighbors: 16
    decimation: 4
    return_logits: true
  interpolation_k: ${predict.interpolator.interpolation_k}
  num_workers: 4
logger:
  comet:
    _target_: pytorch_lightning.loggers.comet.CometLogger
    api_key: ${oc.env:COMET_API_TOKEN}
    workspace: ${oc.env:COMET_WORKSPACE}
    project_name: ${oc.env:COMET_PROJECT_NAME}
    experiment_name: DATAPAPER-LidarHD-20240416_100k_fractal-6GPUs
    auto_log_co2: false
    disabled: false
task:
  task_name: predict
predict:
  src_las: /path/to/input.las
  output_dir: /path/to/output_dir/
  ckpt_path: FRACTAL-LidarHD_7cl_randlanet.ckpt
  gpus: 0
  subtile_overlap: 0
  interpolator:
    _target_: myria3d.models.interpolation.Interpolator
    interpolation_k: 10
    classification_dict: ${dataset_description.classification_dict}
    probas_to_save: [building,ground]
    predicted_classification_channel: PredictedClassification
    entropy_channel: entropy