Skip to content

Commit e16439b

Browse files
authored
Merge pull request #266 from JdeRobot/265-update-docs
Update docs
2 parents 1b44da3 + f8ed84d commit e16439b

15 files changed

+118
-45
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
>⚠️ ***DetectionMetrics v1*** website referenced in our *Sensors* paper is still available [here](https://jderobot.github.io/DetectionMetrics/v1)
99
10-
*DetectionMetrics* is a family of toolkits designed to unify and streamline the evaluation of perception models across different frameworks and datasets. Looking for our published ***DetectionMetrics v1***? Check out all the [relevant links](#v1) below.
10+
*DetectionMetrics* is a toolkit designed to unify and streamline the evaluation of perception models across different frameworks and datasets. Looking for our published ***DetectionMetrics v1***? Check out all the [relevant links](#v1) below.
1111

1212
Now, we're excited to introduce ***DetectionMetrics v2***! While retaining the flexibility of our previous release, *DetectionMetrics* has been redesigned with an expanded focus on image and LiDAR segmentation. As we move forward, *v2* will be the actively maintained version, featuring continued updates and enhancements to keep pace with evolving AI and computer vision technologies.
1313

14-
<table style='font-size:100%'>
14+
<table style='font-size:100%; margin: auto;'>
1515
<tr>
1616
<th>&#128187; <a href="https://github.com/JdeRobot/DetectionMetrics">Code</a></th>
1717
<th>&#128295; <a href="https://jderobot.github.io/DetectionMetrics/v2/installation">Installation</a></th>

detectionmetrics/utils/metrics.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ def update(
2424
:type pred: np.ndarray
2525
:param gt: Array containing ground truth
2626
:type gt: np.ndarray
27-
:param valid_mask: Binary mask where False elements will be igonred, defaults
28-
to None
27+
:param valid_mask: Binary mask where False elements will be igonred, defaults to None
2928
:type valid_mask: Optional[np.ndarray], optional
3029
"""
3130
raise NotImplementedError
@@ -61,8 +60,7 @@ def update(
6160
:type pred: np.ndarray
6261
:param gt: one-hot encoded ground truth array (batch, class, width, height)
6362
:type gt: np.ndarray
64-
:param valid_mask: Binary mask where False elements will be igonred, defaults
65-
to None
63+
:param valid_mask: Binary mask where False elements will be igonred, defaults to None
6664
:type valid_mask: Optional[np.ndarray], optional
6765
"""
6866
assert pred.shape == gt.shape, "Pred. and GT shapes don't match"
@@ -117,8 +115,7 @@ def update(
117115
:type pred: np.ndarray
118116
:param gt: Array containing ground truth
119117
:type gt: np.ndarray
120-
:param valid_mask: Binary mask where False elements will be ignored, defaults
121-
to None
118+
:param valid_mask: Binary mask where False elements will be ignored, defaults to None
122119
:type valid_mask: Optional[np.ndarray], optional
123120
:return: Updated confusion matrix
124121
:rtype: np.ndarray
@@ -162,7 +159,7 @@ def get_accuracy(self) -> Tuple[np.ndarray, float]:
162159
return acc_per_class, acc
163160

164161
def get_precision(self) -> Tuple[np.ndarray, float]:
165-
"""Compute precision from confusion matrix.
162+
"""Compute precision from confusion matrix.
166163
Precision = true positives/ predicted positives.
167164
168165
:return: per class precision
@@ -208,5 +205,5 @@ def get_f1_score(self) -> Tuple[np.ndarray, float]:
208205
global_f1_score = (
209206
2 * global_precision * global_recall
210207
) / (global_precision + global_recall) if (global_precision + global_recall) > 0 else 0.0
211-
208+
212209
return f1_score_per_class, global_f1_score

docs/_pages/home.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,30 @@ permalink: /
44
header:
55
overlay_color: "#5e616c"
66
overlay_image: /assets/images/cover/test_header_shear_3.png
7-
#actions:
8-
# - label: "<i class='fas fa-download'></i> Install now"
9-
# url: "/installation/"
7+
actions:
8+
- label: "<i class='fas fa-download'></i> Learn more and contribute"
9+
url: "https://github.com/JdeRobot/DetectionMetrics"
1010
excerpt:
1111
Unified evaluation for perception models
1212
---
1313
>&#9888;&#65039; ***DetectionMetrics v1*** website referenced in our *Sensors* paper is still available [here](https://jderobot.github.io/DetectionMetrics/v1)
1414
1515
# What is DetectionMetrics?
16-
*DetectionMetrics* is a family of toolkits designed to unify and streamline the evaluation of perception models across different frameworks and datasets. Looking for our published ***DetectionMetrics v1***? Check out all the [relevant links](#v1) below.
16+
*DetectionMetrics* is a toolkit designed to unify and streamline the evaluation of perception models across different frameworks and datasets. Looking for our published ***DetectionMetrics v1***? Check out all the [relevant links](#v1) below.
1717

1818
Now, we're excited to introduce ***DetectionMetrics v2***! While retaining the flexibility of our previous release, *DetectionMetrics* has been redesigned with an expanded focus expanded focus on image and LiDAR segmentation. As we move forward, *v2* will be the actively maintained version, featuring continued updates and enhancements to keep pace with evolving AI and computer vision technologies.
1919

20-
<table style='font-size:100%'>
21-
<tr>
22-
<th>&#128187; <a href="https://github.com/JdeRobot/DetectionMetrics">Code</a></th>
23-
<th>&#128295; <a href="https://jderobot.github.io/DetectionMetrics/v2/installation">Installation</a></th>
24-
<th>&#129513; <a href="https://jderobot.github.io/DetectionMetrics/v2/compatibility">Compatibility</a></th>
25-
<th>&#128214; <a href="https://jderobot.github.io/DetectionMetrics/py_docs/_build/html/index.html">Docs</a></th>
26-
</tr>
20+
<table class='centered-table'>
21+
<tr>
22+
<th>&#128187; <a href="https://github.com/JdeRobot/DetectionMetrics">Code</a></th>
23+
<th>&#128295; <a href="https://jderobot.github.io/DetectionMetrics/v2/installation">Installation</a></th>
24+
<th>&#129513; <a href="https://jderobot.github.io/DetectionMetrics/v2/compatibility">Compatibility</a></th>
25+
<th>&#128214; <a href="https://jderobot.github.io/DetectionMetrics/py_docs/_build/html/index.html">Docs</a></th>
26+
</tr>
2727
</table>
2828

29+
{% include video id="PYS57dNiDAg" provider="youtube" %}
30+
2931
![diagram](../assets/images/detectionmetricsv2_diagram.png)
3032

3133
# What's supported in DetectionMetrics

docs/assets/css/main.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,15 @@
55
@charset "utf-8";
66

77
@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
8-
@import "minimal-mistakes"; // main partials
8+
@import "minimal-mistakes"; // main partials
9+
10+
.centered-table {
11+
display: flex;
12+
justify-content: center;
13+
font-size: 100%;
14+
}
15+
16+
.centered-table table {
17+
width: auto;
18+
border-collapse: collapse;
19+
}
406 Bytes
Binary file not shown.
21.6 KB
Binary file not shown.
13.6 KB
Binary file not shown.
2.46 KB
Binary file not shown.

docs/py_docs/_build/html/detectionmetrics.cli.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
8181
<span id="detectionmetrics-cli-evaluate-module"></span><h2>detectionmetrics.cli.evaluate module<a class="headerlink" href="#module-detectionmetrics.cli.evaluate" title="Link to this heading"></a></h2>
8282
<dl class="py function">
8383
<dt class="sig sig-object py" id="detectionmetrics.cli.evaluate.get_dataset">
84-
<span class="sig-prename descclassname"><span class="pre">detectionmetrics.cli.evaluate.</span></span><span class="sig-name descname"><span class="pre">get_dataset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">input_type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset_format</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset_fname</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">split_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">train_dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">val_dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_suffix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label_suffix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ontology</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">split</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#detectionmetrics.cli.evaluate.get_dataset" title="Link to this definition"></a></dt>
84+
<span class="sig-prename descclassname"><span class="pre">detectionmetrics.cli.evaluate.</span></span><span class="sig-name descname"><span class="pre">get_dataset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">input_type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset_format</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset_fname</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">split_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">train_dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">val_dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_dataset_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">images_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">labels_dir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_suffix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label_suffix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ontology</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">split</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#detectionmetrics.cli.evaluate.get_dataset" title="Link to this definition"></a></dt>
8585
<dd></dd></dl>
8686

8787
<dl class="py function">

0 commit comments

Comments
 (0)