-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5f9424
commit 4df4487
Showing
15 changed files
with
545 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# script id: 1 | ||
"model": | ||
"type": "DFNet" | ||
"params": | ||
"in_channels": 4 | ||
"hidden_channels": 64 | ||
"L": 5 | ||
"k": 12 | ||
|
||
"optimizer": | ||
"type": "AdamW" | ||
"params": | ||
"lr": 0.001 | ||
|
||
"lr_scheduler": | ||
"type": "MultiStepLR" | ||
"params": | ||
"milestones": [5, 15, 25, 35] | ||
"gamma": 0.2 | ||
|
||
"dataset": | ||
"train": | ||
"type": "transcg" | ||
"data_dir": "data" | ||
"image_size": !!python/tuple [320, 240] | ||
"use_augmentation": True | ||
"rgb_augmentation_probability": 0.8 | ||
"depth_min": 0.0 | ||
"depth_max": 10.0 | ||
"depth_norm": 10.0 | ||
"test": | ||
"type": "transcg" | ||
"data_dir": "data" | ||
"image_size": !!python/tuple [320, 240] | ||
"use_augmentation": False | ||
"depth_min": 0.0 | ||
"depth_max": 10.0 | ||
"depth_norm": 10.0 | ||
|
||
"dataloader": | ||
"num_workers": 48 | ||
"shuffle": True | ||
"drop_last": True | ||
|
||
"trainer": | ||
"batch_size": 32 | ||
"test_batch_size": 1 | ||
"multigpu": True | ||
"max_epoch": 40 | ||
"criterion": | ||
"type": "custom_masked_mse_loss" | ||
"epsilon": 0.00000001 | ||
|
||
"metrics": | ||
"types": ["MSE", "MaskedMSE", "RMSE", "MaskedRMSE", "REL", "MaskedREL", "MAE", "MaskedMAE", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"] | ||
"epsilon": 0.00000001 | ||
"depth_scale": 10.0 | ||
|
||
"stats": | ||
"stats_dir": "stats" | ||
"stats_exper": "train-tg-val-tg-add" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# script id: 1 | ||
"model": | ||
"type": "DFNet" | ||
"params": | ||
"in_channels": 4 | ||
"hidden_channels": 64 | ||
"L": 5 | ||
"k": 12 | ||
|
||
"optimizer": | ||
"type": "AdamW" | ||
"params": | ||
"lr": 0.001 | ||
|
||
"lr_scheduler": | ||
"type": "MultiStepLR" | ||
"params": | ||
"milestones": [5, 15, 25, 35] | ||
"gamma": 0.2 | ||
|
||
"dataset": | ||
"train": | ||
"type": "transcg" | ||
"data_dir": "data" | ||
"image_size": !!python/tuple [320, 240] | ||
"use_augmentation": True | ||
"rgb_augmentation_probability": 0.8 | ||
"depth_min": 0.3 | ||
"depth_max": 1.5 | ||
"depth_norm": 1.0 | ||
"test": | ||
"type": "transcg" | ||
"data_dir": "data" | ||
"image_size": !!python/tuple [320, 240] | ||
"use_augmentation": False | ||
"depth_min": 0.3 | ||
"depth_max": 1.5 | ||
"depth_norm": 1.0 | ||
|
||
"dataloader": | ||
"num_workers": 48 | ||
"shuffle": True | ||
"drop_last": True | ||
|
||
"trainer": | ||
"batch_size": 32 | ||
"test_batch_size": 1 | ||
"multigpu": True | ||
"max_epoch": 40 | ||
"criterion": | ||
"type": "custom_masked_mse_loss" | ||
"epsilon": 0.00000001 | ||
"combined_smooth": True | ||
"combined_beta": 0.005 | ||
|
||
"metrics": | ||
"types": ["MSE", "MaskedMSE", "RMSE", "MaskedRMSE", "REL", "MaskedREL", "MAE", "MaskedMAE", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"] | ||
"epsilon": 0.00000001 | ||
"depth_scale": 1.0 | ||
|
||
"stats": | ||
"stats_dir": "stats" | ||
"stats_exper": "train-tg-val-tg-comb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -392,9 +392,8 @@ def get_metrics(self, metrics_params = None): | |
if metrics_params is None: | ||
metrics_params = self.metrics_params | ||
metrics_list = metrics_params.get('types', ['MSE', 'MaskedMSE', 'RMSE', 'MaskedRMSE', 'REL', 'MaskedREL', 'MAE', 'MaskedMAE', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]']) | ||
metrics_epsilon = metrics_params.get('epsilon', 1e-8) | ||
from utils.metrics import MetricsRecorder | ||
metrics = MetricsRecorder(metrics_list = metrics_list, epsilon = metrics_epsilon) | ||
metrics = MetricsRecorder(metrics_list = metrics_list, **metrics_params) | ||
return metrics | ||
|
||
def get_inference_image_size(self, inference_params = None): | ||
|
@@ -463,10 +462,29 @@ def get_inference_depth_min_max(self, inference_params = None): | |
Returns | ||
------- | ||
Tuple of (int, int) the min and max depth. | ||
Tuple of (float, float) the min and max depth. | ||
""" | ||
if inference_params is None: | ||
inference_params = self.inference_params | ||
depth_min = inference_params.get('depth_min', 0.1) | ||
depth_min = inference_params.get('depth_min', 0.3) | ||
depth_max = inference_params.get('depth_max', 1.5) | ||
return depth_min, depth_max | ||
return depth_min, depth_max | ||
|
||
def get_inference_depth_norm(self, inference_params = None): | ||
""" | ||
Get the depth normalization coefficient from inference configuration. | ||
Parameters | ||
---------- | ||
inference_params: dict, optional, default: None. If inference_params is provided, then use the parameters specified in the inference_params to get the inference depth range. Otherwise, the inference parameters in the self.params will be used to get the inference depth range. | ||
Returns | ||
------- | ||
float, the depth normalization coefficient. | ||
""" | ||
if inference_params is None: | ||
inference_params = self.inference_params | ||
depth_norm = inference_params.get('depth_norm', 1.0) | ||
return depth_norm |
Oops, something went wrong.