Before training/testing, we hope that you have read data and finish preparing dataset.
For training/testing depth completion :
python3 -m depth_completion.main
Note : modify main.py
for different agent and configuration if needed.
For different agent, you can see agent_list and then modify main.py
.
For different configuration corresponding to the agent, you can see configs for example configurations. Here we will take one for example :
train_config = {
"dataset_name": "matterport",
"model_name": ("GatedConvSkipConnectionModel", "UNet"),
"in_channel": (9, 1),
"device_ids": [3],
"seed": 7122,
"num_workers": 8,
"mode": "train",
"train_path": "/tmp2/tsunghan/new_matterport/v1",
"lr": (1e-4, 1e-4),
"batch_size": 2,
"loss_func": {('depth(L1)', 'depth_L1_loss', 1.), ('bc(L1)', 'bc_L1_loss', 1)},
"load_model_path": (None, None),
"param_only": (False, False),
"validation": True,
"valid_path": "/tmp2/tsunghan/new_matterport/v1",
"epoches": 100,
"save_prefix": "official_ver",
}
- model_name : Models in models you use for backbone model. (Second input for boundary consistency network)
- in_channel : input channel for the model
- device_ids : GPU-ids (support multi-gpu training)
- training_path, valid_path : training and validation dataset root path. (Training list and Testing list are here)
- loss_func : dictionary for loss functions, each element is a tuple : (description, function_name, weight). You can see loss_funcs for all loss functions.
- param_only : Set False as default. If set as True, you need to pass load_model_path for re-training.
- Training log and model will be saved in experiments directory.
- test_path : testing dataset path.
- batch_size : set as 1 for testing
- param_only : Set as True and pass
load\_model\_path
. - output : output directory saving
.npy
files.
- You can download pre-trained model from Google Drive if needed.
- Testing scripts only give you
.npy
files. If you want to evaluate the result or visualize them, please refer visualize