Skip to content

Commit

Permalink
Deploying to gh-pages from @ fff0149 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
leavauchier committed May 13, 2024
1 parent 0d16c8b commit c60e800
Show file tree
Hide file tree
Showing 30 changed files with 97 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; lidar_prod V1.10.2 documentation</title>
<title>Overview: module code &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=40ba251f"></script>
<script src="../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions _modules/lidar_prod/commons/commons.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.commons.commons &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.commons.commons &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions _modules/lidar_prod/run.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.run &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.run &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions _modules/lidar_prod/tasks/building_completion.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.tasks.building_completion &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.tasks.building_completion &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions _modules/lidar_prod/tasks/building_identification.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.tasks.building_identification &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.tasks.building_identification &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions _modules/lidar_prod/tasks/building_validation.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.tasks.building_validation &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.tasks.building_validation &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
34 changes: 31 additions & 3 deletions _modules/lidar_prod/tasks/building_validation_optimization.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.tasks.building_validation_optimization &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.tasks.building_validation_optimization &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down Expand Up @@ -156,6 +156,8 @@ <h1>Source code for lidar_prod.tasks.building_validation_optimization</h1><div c

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">optuna</span>
<span class="kn">import</span> <span class="nn">yaml</span>
<span class="kn">from</span> <span class="nn">omegaconf</span> <span class="kn">import</span> <span class="n">DictConfig</span><span class="p">,</span> <span class="n">OmegaConf</span>
<span class="kn">from</span> <span class="nn">sklearn.metrics</span> <span class="kn">import</span> <span class="n">confusion_matrix</span>
<span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span>

Expand Down Expand Up @@ -355,6 +357,8 @@ <h1>Source code for lidar_prod.tasks.building_validation_optimization</h1><div c
<span class="n">mts_gt</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">c</span><span class="o">.</span><span class="n">target</span> <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">clusters</span><span class="p">])</span>
<span class="n">metrics_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">evaluate_decisions</span><span class="p">(</span><span class="n">mts_gt</span><span class="p">,</span> <span class="n">decisions</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2"> Results:</span><span class="se">\n</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_get_results_logs_str</span><span class="p">(</span><span class="n">metrics_dict</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_save_results_to_yaml</span><span class="p">(</span><span class="n">metrics_dict</span><span class="p">)</span>

<span class="k">return</span> <span class="n">metrics_dict</span></div>


Expand Down Expand Up @@ -697,7 +701,31 @@ <h1>Source code for lidar_prod.tasks.building_validation_optimization</h1><div c
<span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">Confusion Matrix (normalized)</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">metrics_dict</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">design</span><span class="o">.</span><span class="n">metrics</span><span class="o">.</span><span class="n">confusion_matrix_norm</span><span class="p">]</span><span class="o">.</span><span class="n">round</span><span class="p">(</span><span class="mi">3</span><span class="p">))</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">results_logs</span></div>
<span class="k">return</span> <span class="n">results_logs</span>

<span class="k">def</span> <span class="nf">_save_results_to_yaml</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">metrics_dict</span><span class="p">:</span> <span class="nb">dict</span><span class="p">):</span>
<span class="n">out_dict</span> <span class="o">=</span> <span class="n">metrics_dict</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">out_dict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">):</span>
<span class="n">out_dict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">v</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">):</span>
<span class="n">out_dict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>

<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">paths</span><span class="o">.</span><span class="n">evaluation_results_yaml</span><span class="p">:</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">paths</span><span class="o">.</span><span class="n">evaluation_results_yaml</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">yaml</span><span class="o">.</span><span class="n">safe_dump</span><span class="p">(</span><span class="n">out_dict</span><span class="p">,</span> <span class="n">f</span><span class="p">)</span>

<div class="viewcode-block" id="BuildingValidationOptimizer.save_config_with_optimized_thresolds">
<a class="viewcode-back" href="../../../apidoc/lidar_prod.tasks.html#lidar_prod.tasks.building_validation_optimization.BuildingValidationOptimizer.save_config_with_optimized_thresolds">[docs]</a>
<span class="k">def</span> <span class="nf">save_config_with_optimized_thresolds</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">config</span><span class="p">:</span> <span class="n">DictConfig</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Save config the thresholds in the building_validation.application</span>
<span class="sd"> part replaced by optimized thresholds&quot;&quot;&quot;</span>
<span class="k">if</span> <span class="s2">&quot;optimize&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">todo</span><span class="p">:</span>
<span class="n">optimized_cfg</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="n">optimized_cfg</span><span class="o">.</span><span class="n">building_validation</span><span class="o">.</span><span class="n">application</span><span class="o">.</span><span class="n">thresholds</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">thresholds</span>
<span class="n">out_path</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">building_validation</span><span class="o">.</span><span class="n">optimization</span><span class="o">.</span><span class="n">paths</span><span class="o">.</span><span class="n">output_optimized_config</span>
<span class="n">OmegaConf</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">config</span><span class="o">=</span><span class="n">optimized_cfg</span><span class="p">,</span> <span class="n">f</span><span class="o">=</span><span class="n">out_path</span><span class="p">,</span> <span class="n">resolve</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span></div>
</div>

</pre></div>

Expand Down
4 changes: 2 additions & 2 deletions _modules/lidar_prod/tasks/cleaning.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.tasks.cleaning &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.tasks.cleaning &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions _modules/lidar_prod/tasks/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lidar_prod.tasks.utils &mdash; lidar_prod V1.10.2 documentation</title>
<title>lidar_prod.tasks.utils &mdash; lidar_prod V1.10.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" />
Expand All @@ -15,7 +15,7 @@

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=40ba251f"></script>
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion _sources/guides/thresholds_optimization.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: 'V1.10.2',
VERSION: 'V1.10.3',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Loading

0 comments on commit c60e800

Please sign in to comment.