From c60e800c41c70be9db9ca04a1a48feb94eee700b Mon Sep 17 00:00:00 2001 From: leavauchier <120112647+leavauchier@users.noreply.github.com> Date: Mon, 13 May 2024 10:03:55 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20fff01?= =?UTF-8?q?49d75b3c73a6d507d631f6c02f3199bb20c=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .buildinfo | 2 +- _modules/index.html | 4 +-- _modules/lidar_prod/commons/commons.html | 4 +-- _modules/lidar_prod/run.html | 4 +-- .../lidar_prod/tasks/building_completion.html | 4 +-- .../tasks/building_identification.html | 4 +-- .../lidar_prod/tasks/building_validation.html | 4 +-- .../building_validation_optimization.html | 34 ++++++++++++++++-- _modules/lidar_prod/tasks/cleaning.html | 4 +-- _modules/lidar_prod/tasks/utils.html | 4 +-- .../guides/thresholds_optimization.md.txt | 3 +- _static/documentation_options.js | 2 +- apidoc/lidar_prod.commons.html | 4 +-- apidoc/lidar_prod.html | 4 +-- apidoc/lidar_prod.tasks.html | 11 ++++-- background/overview.html | 4 +-- background/production_process.html | 4 +-- .../thresholds_optimization_process.html | 4 +-- configs.html | 6 ++-- genindex.html | 6 ++-- guides/development.html | 4 +-- guides/thresholds_optimization.html | 7 ++-- index.html | 4 +-- introduction.html | 4 +-- objects.inv | Bin 1741 -> 1761 bytes py-modindex.html | 4 +-- search.html | 4 +-- searchindex.js | 2 +- tutorials/install.html | 4 +-- tutorials/use.html | 4 +-- 30 files changed, 97 insertions(+), 56 deletions(-) diff --git a/.buildinfo b/.buildinfo index 20882a9d..9fdb0244 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 7da5eb014733f8246883ccbde337b5e1 +config: 0bf5b48386bd7abd7f3121a47b659865 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_modules/index.html b/_modules/index.html index dd388329..cae5d18c 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -3,7 +3,7 @@ - Overview: module code — lidar_prod V1.10.2 documentation + Overview: module code — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_modules/lidar_prod/commons/commons.html b/_modules/lidar_prod/commons/commons.html index f92f84e4..cc50c1d3 100644 --- a/_modules/lidar_prod/commons/commons.html +++ b/_modules/lidar_prod/commons/commons.html @@ -3,7 +3,7 @@ - lidar_prod.commons.commons — lidar_prod V1.10.2 documentation + lidar_prod.commons.commons — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_modules/lidar_prod/run.html b/_modules/lidar_prod/run.html index 8019837b..db1acac3 100644 --- a/_modules/lidar_prod/run.html +++ b/_modules/lidar_prod/run.html @@ -3,7 +3,7 @@ - lidar_prod.run — lidar_prod V1.10.2 documentation + lidar_prod.run — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_modules/lidar_prod/tasks/building_completion.html b/_modules/lidar_prod/tasks/building_completion.html index e8af8c14..ea55bfa3 100644 --- a/_modules/lidar_prod/tasks/building_completion.html +++ b/_modules/lidar_prod/tasks/building_completion.html @@ -3,7 +3,7 @@ - lidar_prod.tasks.building_completion — lidar_prod V1.10.2 documentation + lidar_prod.tasks.building_completion — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_modules/lidar_prod/tasks/building_identification.html b/_modules/lidar_prod/tasks/building_identification.html index 004212fb..aac4e781 100644 --- a/_modules/lidar_prod/tasks/building_identification.html +++ b/_modules/lidar_prod/tasks/building_identification.html @@ -3,7 +3,7 @@ - lidar_prod.tasks.building_identification — lidar_prod V1.10.2 documentation + lidar_prod.tasks.building_identification — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_modules/lidar_prod/tasks/building_validation.html b/_modules/lidar_prod/tasks/building_validation.html index 02f7ff42..1bbb5e7c 100644 --- a/_modules/lidar_prod/tasks/building_validation.html +++ b/_modules/lidar_prod/tasks/building_validation.html @@ -3,7 +3,7 @@ - lidar_prod.tasks.building_validation — lidar_prod V1.10.2 documentation + lidar_prod.tasks.building_validation — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_modules/lidar_prod/tasks/building_validation_optimization.html b/_modules/lidar_prod/tasks/building_validation_optimization.html index 28a69a83..0697ff30 100644 --- a/_modules/lidar_prod/tasks/building_validation_optimization.html +++ b/_modules/lidar_prod/tasks/building_validation_optimization.html @@ -3,7 +3,7 @@ - lidar_prod.tasks.building_validation_optimization — lidar_prod V1.10.2 documentation + lidar_prod.tasks.building_validation_optimization — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + @@ -156,6 +156,8 @@

Source code for lidar_prod.tasks.building_validation_optimization

import numpy as np import optuna +import yaml +from omegaconf import DictConfig, OmegaConf from sklearn.metrics import confusion_matrix from tqdm import tqdm @@ -355,6 +357,8 @@

Source code for lidar_prod.tasks.building_validation_optimization

mts_gt = np.array([c.target for c in clusters]) metrics_dict = self.evaluate_decisions(mts_gt, decisions) log.info(f"\n Results:\n{self._get_results_logs_str(metrics_dict)}") + self._save_results_to_yaml(metrics_dict) + return metrics_dict
@@ -697,7 +701,31 @@

Source code for lidar_prod.tasks.building_validation_optimization

+ "\nConfusion Matrix (normalized)\n" + str(metrics_dict[self.design.metrics.confusion_matrix_norm].round(3)) ) - return results_logs
+ return results_logs + + def _save_results_to_yaml(self, metrics_dict: dict): + out_dict = metrics_dict.copy() + for k, v in out_dict.items(): + if isinstance(v, np.ndarray): + out_dict[k] = v.tolist() + elif isinstance(v, np.float64): + out_dict[k] = float(v) + + if self.paths.evaluation_results_yaml: + with open(self.paths.evaluation_results_yaml, "w") as f: + yaml.safe_dump(out_dict, f) + +
+[docs] + def save_config_with_optimized_thresolds(self, config: DictConfig): + """Save config the thresholds in the building_validation.application + part replaced by optimized thresholds""" + if "optimize" in self.todo: + optimized_cfg = config.copy() + optimized_cfg.building_validation.application.thresholds = self.thresholds + out_path = config.building_validation.optimization.paths.output_optimized_config + OmegaConf.save(config=optimized_cfg, f=out_path, resolve=False)
+
diff --git a/_modules/lidar_prod/tasks/cleaning.html b/_modules/lidar_prod/tasks/cleaning.html index 40a8f57b..b4a98425 100644 --- a/_modules/lidar_prod/tasks/cleaning.html +++ b/_modules/lidar_prod/tasks/cleaning.html @@ -3,7 +3,7 @@ - lidar_prod.tasks.cleaning — lidar_prod V1.10.2 documentation + lidar_prod.tasks.cleaning — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_modules/lidar_prod/tasks/utils.html b/_modules/lidar_prod/tasks/utils.html index 060898b2..b8022ca9 100644 --- a/_modules/lidar_prod/tasks/utils.html +++ b/_modules/lidar_prod/tasks/utils.html @@ -3,7 +3,7 @@ - lidar_prod.tasks.utils — lidar_prod V1.10.2 documentation + lidar_prod.tasks.utils — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + diff --git a/_sources/guides/thresholds_optimization.md.txt b/_sources/guides/thresholds_optimization.md.txt index acac645c..b4e167f3 100644 --- a/_sources/guides/thresholds_optimization.md.txt +++ b/_sources/guides/thresholds_optimization.md.txt @@ -48,7 +48,8 @@ python lidar_prod/run.py \ building_validation.optimization.todo='prepare+evaluate+update' \ building_validation.optimization.paths.input_las_dir=[path/to/labelled/test/dataset/] \ building_validation.optimization.paths.results_output_dir=[path/to/save/results] \ -building_validation.optimization.paths.building_validation_thresholds=[path/to/optimized_thresholds.yaml] +building_validation.optimization.paths.building_validation_thresholds=[path/to/optimized_thresholds.yaml] \ +building_validation.optimization.paths.evaluation_results_yaml=[path/to/saved/metrics.yaml] ``` ### Utils diff --git a/_static/documentation_options.js b/_static/documentation_options.js index f359f304..288fcf2a 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: 'V1.10.2', + VERSION: 'V1.10.3', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/apidoc/lidar_prod.commons.html b/apidoc/lidar_prod.commons.html index 7c6cefab..d23b4918 100644 --- a/apidoc/lidar_prod.commons.html +++ b/apidoc/lidar_prod.commons.html @@ -4,7 +4,7 @@ - lidar_prod.commons — lidar_prod V1.10.2 documentation + lidar_prod.commons — lidar_prod V1.10.3 documentation @@ -16,7 +16,7 @@ - + diff --git a/apidoc/lidar_prod.html b/apidoc/lidar_prod.html index 7f89378b..cda347a0 100644 --- a/apidoc/lidar_prod.html +++ b/apidoc/lidar_prod.html @@ -4,7 +4,7 @@ - lidar_prod.run — lidar_prod V1.10.2 documentation + lidar_prod.run — lidar_prod V1.10.3 documentation @@ -16,7 +16,7 @@ - + diff --git a/apidoc/lidar_prod.tasks.html b/apidoc/lidar_prod.tasks.html index 9b8829aa..b7f86f87 100644 --- a/apidoc/lidar_prod.tasks.html +++ b/apidoc/lidar_prod.tasks.html @@ -4,7 +4,7 @@ - lidar_prod.tasks — lidar_prod V1.10.2 documentation + lidar_prod.tasks — lidar_prod V1.10.3 documentation @@ -16,7 +16,7 @@ - + @@ -407,6 +407,13 @@

lidar_prod.tasks +
+save_config_with_optimized_thresolds(config: DictConfig)[source]
+

Save config the thresholds in the building_validation.application +part replaced by optimized thresholds

+
+
setup()[source]
diff --git a/background/overview.html b/background/overview.html index 2522811c..3bb5a9df 100644 --- a/background/overview.html +++ b/background/overview.html @@ -4,7 +4,7 @@ - Overview of the process — lidar_prod V1.10.2 documentation + Overview of the process — lidar_prod V1.10.3 documentation @@ -16,7 +16,7 @@ - + diff --git a/background/production_process.html b/background/production_process.html index 4bafaf40..41ad9a12 100644 --- a/background/production_process.html +++ b/background/production_process.html @@ -4,7 +4,7 @@ - Production process used to transform point clouds classification — lidar_prod V1.10.2 documentation + Production process used to transform point clouds classification — lidar_prod V1.10.3 documentation @@ -16,7 +16,7 @@ - + diff --git a/background/thresholds_optimization_process.html b/background/thresholds_optimization_process.html index 1a3804b2..08ec9d68 100644 --- a/background/thresholds_optimization_process.html +++ b/background/thresholds_optimization_process.html @@ -4,7 +4,7 @@ - Strategy to find optimal decision thresholds for Building validation — lidar_prod V1.10.2 documentation + Strategy to find optimal decision thresholds for Building validation — lidar_prod V1.10.3 documentation @@ -16,7 +16,7 @@ - + diff --git a/configs.html b/configs.html index 456af578..fe00b8f9 100644 --- a/configs.html +++ b/configs.html @@ -4,7 +4,7 @@ - Default configuration — lidar_prod V1.10.2 documentation + Default configuration — lidar_prod V1.10.3 documentation @@ -16,7 +16,7 @@ - + @@ -270,7 +270,9 @@

Default configuration group_info_pickle_path: ${.results_output_dir}/group_info.pickle prepared_las_dir: ${.results_output_dir}/prepared/ updated_las_dir: ${.results_output_dir}/updated/ + evaluation_results_yaml: ${.results_output_dir}/evaluation.yaml building_validation_thresholds: ${.results_output_dir}/optimized_thresholds.yaml + output_optimized_config: ${.results_output_dir}/config_with_optimized_thresholds.yaml buildings_correction_labels: codes: true_positives: diff --git a/genindex.html b/genindex.html index 99bd3e82..6777584e 100644 --- a/genindex.html +++ b/genindex.html @@ -3,7 +3,7 @@ - Index — lidar_prod V1.10.2 documentation + Index — lidar_prod V1.10.3 documentation @@ -15,7 +15,7 @@ - + @@ -555,6 +555,8 @@

R

S