iaa-od 4.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- iaa_od-4.1.1/.gitignore +48 -0
- iaa_od-4.1.1/.gitlab-ci.yml +33 -0
- iaa_od-4.1.1/CONTRIBUTING.md +38 -0
- iaa_od-4.1.1/LICENSE +21 -0
- iaa_od-4.1.1/PKG-INFO +115 -0
- iaa_od-4.1.1/README.md +90 -0
- iaa_od-4.1.1/data/fatigue_eval/COCO-1-IAA-Merlo_annotations_time.json +1168 -0
- iaa_od-4.1.1/data/fatigue_eval/Concorezzo-IAA-Merlo_annotations_time.json +11227 -0
- iaa_od-4.1.1/data/fatigue_eval/Concorezzo-IAA-Piero_annotations_time.json +7433 -0
- iaa_od-4.1.1/data/fatigue_eval/Concorezzo-IAA-Simona_annotations_time.json +8273 -0
- iaa_od-4.1.1/data/fatigue_eval/UAV-Rilievo-21-IAA-Merlo_annotations_time.json +7041 -0
- iaa_od-4.1.1/data/fatigue_eval/UAV-Rilievo-21-IAA-Piero_annotations_time.json +4920 -0
- iaa_od-4.1.1/data/fatigue_eval/UAV-Rilievo-21-IAA-Simona_annotations_time.json +5354 -0
- iaa_od-4.1.1/data/fatigue_eval/WaRPD-1-IAA-Merlo_annotations_time.json +3905 -0
- iaa_od-4.1.1/data/gts/drone/UAV-Rilievo-21-IAA-Merlo_GT.json +11695 -0
- iaa_od-4.1.1/data/gts/drone/UAV-Rilievo-21-IAA-Piero_GT.json +8362 -0
- iaa_od-4.1.1/data/gts/drone/UAV-Rilievo-21-IAA-Simona_GT.json +9045 -0
- iaa_od-4.1.1/data/gts/satellite/Concorezzo-IAA-Merlo_GT.json +18983 -0
- iaa_od-4.1.1/data/gts/satellite/Concorezzo-IAA-Piero_GT.json +13019 -0
- iaa_od-4.1.1/data/gts/satellite/Concorezzo-IAA-Simona_GT.json +14339 -0
- iaa_od-4.1.1/data/gts/testing/Aicurzio_Enrico.json +4948 -0
- iaa_od-4.1.1/data/gts/testing/Aicurzio_Expert.json +6031 -0
- iaa_od-4.1.1/data/gts/testing/Aicurzio_Mario.json +2979 -0
- iaa_od-4.1.1/data/gts/testing/Albiate_Enrico.json +6475 -0
- iaa_od-4.1.1/data/gts/testing/Albiate_Expert.json +5561 -0
- iaa_od-4.1.1/data/gts/testing/Albiate_Mario.json +3395 -0
- iaa_od-4.1.1/docs/Makefile +20 -0
- iaa_od-4.1.1/docs/make.bat +35 -0
- iaa_od-4.1.1/docs/requirements.txt +4 -0
- iaa_od-4.1.1/docs/source/api.rst +8 -0
- iaa_od-4.1.1/docs/source/conf.py +26 -0
- iaa_od-4.1.1/docs/source/index.rst +12 -0
- iaa_od-4.1.1/experiments/aicurzio_albiate.py +377 -0
- iaa_od-4.1.1/experiments/aicurzio_albiate_excl.py +77 -0
- iaa_od-4.1.1/experiments/concorezzo.py +451 -0
- iaa_od-4.1.1/experiments/concorezzo_plastic.py +41 -0
- iaa_od-4.1.1/experiments/fatigue_evaluation.py +45 -0
- iaa_od-4.1.1/experiments/granularities_per_image.py +14 -0
- iaa_od-4.1.1/experiments/images.py +116 -0
- iaa_od-4.1.1/experiments/uav.py +85 -0
- iaa_od-4.1.1/main.py +90 -0
- iaa_od-4.1.1/notebooks/drone/drone.py +144 -0
- iaa_od-4.1.1/notebooks/satellite/satellite.py +159 -0
- iaa_od-4.1.1/notebooks/satellite/satellite_benchmark_check.py +38 -0
- iaa_od-4.1.1/notebooks/satellite/satellite_cscore_new.py +29 -0
- iaa_od-4.1.1/notebooks/satellite/satellite_exploration.py +105 -0
- iaa_od-4.1.1/notebooks/satellite/satellite_sc.py +79 -0
- iaa_od-4.1.1/notebooks/testing/Demo_v2.1.3.py +101 -0
- iaa_od-4.1.1/notebooks/testing/Demo_v2.2.4.py +130 -0
- iaa_od-4.1.1/notebooks/testing/alpha.py +49 -0
- iaa_od-4.1.1/notebooks/testing/granularities.py +48 -0
- iaa_od-4.1.1/notebooks/testing/kappa.py +59 -0
- iaa_od-4.1.1/notebooks/testing/l_c_score.py +74 -0
- iaa_od-4.1.1/notebooks/testing/liou.py +56 -0
- iaa_od-4.1.1/notebooks/testing/mcculloh.py +117 -0
- iaa_od-4.1.1/notebooks/testing/new_granularities.py +33 -0
- iaa_od-4.1.1/notebooks/testing/new_new_grans.py +36 -0
- iaa_od-4.1.1/notebooks/testing/rgt.py +87 -0
- iaa_od-4.1.1/pyproject.toml +39 -0
- iaa_od-4.1.1/src/iaa_od/__init__.py +26 -0
- iaa_od-4.1.1/src/iaa_od/metrics/__init__.py +10 -0
- iaa_od-4.1.1/src/iaa_od/metrics/alpha.py +378 -0
- iaa_od-4.1.1/src/iaa_od/metrics/c_score.py +99 -0
- iaa_od-4.1.1/src/iaa_od/metrics/granularity.py +297 -0
- iaa_od-4.1.1/src/iaa_od/metrics/iou.py +92 -0
- iaa_od-4.1.1/src/iaa_od/metrics/iou_sweep.py +52 -0
- iaa_od-4.1.1/src/iaa_od/metrics/l_score.py +128 -0
- iaa_od-4.1.1/src/iaa_od/metrics/rater_vitality.py +90 -0
- iaa_od-4.1.1/src/iaa_od/metrics/scale_complexity.py +95 -0
- iaa_od-4.1.1/src/iaa_od/models/__init__.py +23 -0
- iaa_od-4.1.1/src/iaa_od/models/annotation.py +75 -0
- iaa_od-4.1.1/src/iaa_od/models/annotation_protocol.py +28 -0
- iaa_od-4.1.1/src/iaa_od/models/annotation_timestamp.py +61 -0
- iaa_od-4.1.1/src/iaa_od/models/bbox_colors.py +13 -0
- iaa_od-4.1.1/src/iaa_od/models/bounding_box.py +38 -0
- iaa_od-4.1.1/src/iaa_od/models/c_score.py +37 -0
- iaa_od-4.1.1/src/iaa_od/models/constants.py +43 -0
- iaa_od-4.1.1/src/iaa_od/models/coordinates.py +82 -0
- iaa_od-4.1.1/src/iaa_od/models/geometry.py +19 -0
- iaa_od-4.1.1/src/iaa_od/models/granularities.py +79 -0
- iaa_od-4.1.1/src/iaa_od/models/ground_truth.py +136 -0
- iaa_od-4.1.1/src/iaa_od/models/ground_truth_protocol.py +20 -0
- iaa_od-4.1.1/src/iaa_od/models/gt_sample_info.py +13 -0
- iaa_od-4.1.1/src/iaa_od/models/image.py +81 -0
- iaa_od-4.1.1/src/iaa_od/models/k_alpha_observations_matrix.py +36 -0
- iaa_od-4.1.1/src/iaa_od/models/k_alpha_unit.py +30 -0
- iaa_od-4.1.1/src/iaa_od/models/l_score.py +20 -0
- iaa_od-4.1.1/src/iaa_od/models/random_annotation.py +42 -0
- iaa_od-4.1.1/src/iaa_od/models/random_ground_truth.py +132 -0
- iaa_od-4.1.1/src/iaa_od/models/result.py +125 -0
- iaa_od-4.1.1/src/iaa_od/models/scale_complexity.py +78 -0
- iaa_od-4.1.1/src/iaa_od/palette/__init__.py +4 -0
- iaa_od-4.1.1/src/iaa_od/palette/category_to_color.py +42 -0
- iaa_od-4.1.1/src/iaa_od/palette/to_rgba.py +13 -0
- iaa_od-4.1.1/src/iaa_od/utils/__init__.py +8 -0
- iaa_od-4.1.1/src/iaa_od/utils/collapse_categories.py +259 -0
- iaa_od-4.1.1/src/iaa_od/utils/fatigue_evaluation.py +144 -0
- iaa_od-4.1.1/src/iaa_od/utils/find_contained.py +27 -0
- iaa_od-4.1.1/src/iaa_od/utils/json_to_int_list.py +22 -0
- iaa_od-4.1.1/src/iaa_od/utils/load_categories.py +14 -0
- iaa_od-4.1.1/src/iaa_od/utils/sample_gts.py +122 -0
- iaa_od-4.1.1/src/iaa_od/visualisation/__init__.py +8 -0
- iaa_od-4.1.1/src/iaa_od/visualisation/show_annotations.py +427 -0
- iaa_od-4.1.1/src/iaa_od/visualisation/show_disagreements.py +237 -0
- iaa_od-4.1.1/src/iaa_od/visualisation/show_fatigue_evaluation.py +132 -0
- iaa_od-4.1.1/src/iaa_od/visualisation/show_iou_sweep.py +49 -0
- iaa_od-4.1.1/src/iaa_od/visualisation/show_units.py +71 -0
- iaa_od-4.1.1/src/iaa_od/visualisation/show_utils.py +37 -0
iaa_od-4.1.1/.gitignore
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Optimized files
|
|
2
|
+
__pycache__/
|
|
3
|
+
|
|
4
|
+
# macOS File system
|
|
5
|
+
.DS_Store
|
|
6
|
+
|
|
7
|
+
# Image folder
|
|
8
|
+
img/
|
|
9
|
+
|
|
10
|
+
# Python virtual environment
|
|
11
|
+
venv/
|
|
12
|
+
|
|
13
|
+
# Jupyter Notebooks
|
|
14
|
+
*.ipynb
|
|
15
|
+
|
|
16
|
+
# Jupyter Notebook checkpoints
|
|
17
|
+
.ipynb_checkpoints/
|
|
18
|
+
|
|
19
|
+
# LSP files
|
|
20
|
+
.virtual_documents/
|
|
21
|
+
|
|
22
|
+
# Jetbrains IDEs
|
|
23
|
+
.idea/
|
|
24
|
+
|
|
25
|
+
# Package install files
|
|
26
|
+
*.egg-info/
|
|
27
|
+
|
|
28
|
+
# Old Ground Truth files
|
|
29
|
+
data/gts/old/
|
|
30
|
+
data/gts/old/**
|
|
31
|
+
|
|
32
|
+
# Test scripts
|
|
33
|
+
test*.py
|
|
34
|
+
save_imgs.py
|
|
35
|
+
|
|
36
|
+
# Output folder
|
|
37
|
+
out/
|
|
38
|
+
out/**
|
|
39
|
+
|
|
40
|
+
# Distribution files
|
|
41
|
+
dist/**
|
|
42
|
+
|
|
43
|
+
# Other
|
|
44
|
+
img_nums.txt
|
|
45
|
+
|
|
46
|
+
# Sphinx build files
|
|
47
|
+
docs/build/
|
|
48
|
+
docs/source/generated/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
stages:
|
|
2
|
+
- docs
|
|
3
|
+
- publish
|
|
4
|
+
|
|
5
|
+
pages:
|
|
6
|
+
stage: docs
|
|
7
|
+
image: python:3.10-slim
|
|
8
|
+
before_script:
|
|
9
|
+
- pip install --quiet -r docs/requirements.txt
|
|
10
|
+
- pip install --quiet -e .
|
|
11
|
+
script:
|
|
12
|
+
- sphinx-build -b html docs/source public
|
|
13
|
+
artifacts:
|
|
14
|
+
paths:
|
|
15
|
+
- public
|
|
16
|
+
expire_in: 1 week
|
|
17
|
+
rules:
|
|
18
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
19
|
+
changes:
|
|
20
|
+
- "docs/**/*"
|
|
21
|
+
- "src/iaa_od/**/*"
|
|
22
|
+
- "pyproject.toml"
|
|
23
|
+
|
|
24
|
+
publish-pypi:
|
|
25
|
+
stage: publish
|
|
26
|
+
image: python:3.10-slim
|
|
27
|
+
rules:
|
|
28
|
+
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/
|
|
29
|
+
before_script:
|
|
30
|
+
- pip install --upgrade build twine
|
|
31
|
+
script:
|
|
32
|
+
- python -m build
|
|
33
|
+
- twine upload dist/* -u __token__ -p "$PYPI_TOKEN"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Contributing to iaa-od
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in `iaa-od`. Contributions are welcome, whether they come from researchers applying the package, developers improving its implementation, or anyone who finds a bug.
|
|
4
|
+
|
|
5
|
+
## Reporting a bug
|
|
6
|
+
|
|
7
|
+
Please open a [GitLab issue](../../issues) and include:
|
|
8
|
+
|
|
9
|
+
- your Python version and `iaa-od` version (`pip show iaa-od`)
|
|
10
|
+
- a **minimal reproducible example** — the smallest snippet of code that triggers the problem
|
|
11
|
+
- the full traceback, if applicable
|
|
12
|
+
|
|
13
|
+
Before opening a new issue, check whether the problem has already been reported.
|
|
14
|
+
|
|
15
|
+
## Suggesting a feature or change
|
|
16
|
+
|
|
17
|
+
Open an issue describing what you have in mind before writing any code. This is especially important for changes that touch the core metrics or the disagreement decomposition — since this package accompanies a published methodology, modifications to the core algorithms need to be discussed first to ensure consistency with the paper.
|
|
18
|
+
|
|
19
|
+
For smaller improvements (documentation, performance, new utilities that do not alter existing behaviour), a direct merge request is fine.
|
|
20
|
+
|
|
21
|
+
## Submitting a merge request
|
|
22
|
+
|
|
23
|
+
1. Fork the repository and create a branch from `master` with a descriptive name (e.g. `fix/clustering-edge-case` or `feat/new-visualisation`).
|
|
24
|
+
2. Make your changes. If you are fixing a bug, a short comment explaining the root cause is appreciated.
|
|
25
|
+
3. Ensure the package still builds cleanly (`python -m build`) and imports correctly.
|
|
26
|
+
4. Open a merge request against `master` with a clear description of what was changed and why.
|
|
27
|
+
|
|
28
|
+
## Scope
|
|
29
|
+
|
|
30
|
+
`iaa-od` implements the metrics described in the accompanying paper. Contributions that extend the package — new metrics, new dataset formats, additional error types — are welcome, but proposals that would change the definition or behaviour of existing metrics should be raised as an issue first. This keeps the package consistent with the published work and avoids silent incompatibilities between versions.
|
|
31
|
+
|
|
32
|
+
## Code style
|
|
33
|
+
|
|
34
|
+
The codebase uses standard Python conventions. There is no enforced formatter at this time; just try to match the style of the surrounding code.
|
|
35
|
+
|
|
36
|
+
## Questions
|
|
37
|
+
|
|
38
|
+
If you are unsure whether something is a bug or a feature, or want to discuss the methodology, feel free to open an issue with the `question` label.
|
iaa_od-4.1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mario Merlo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
iaa_od-4.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iaa-od
|
|
3
|
+
Version: 4.1.1
|
|
4
|
+
Summary: A Python package for analysing object detection datasets through Inter-Annotatator Agreement (IAA) metrics.
|
|
5
|
+
Project-URL: Homepage, https://gitlab.com/MrVideo/iaa.py
|
|
6
|
+
Author-email: Mario Merlo <mario.merlo@polimi.it>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Keywords: annotation quality,dataset analysis,inter-annotator agreement,object detection
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Requires-Dist: matplotlib>=3.10.6
|
|
14
|
+
Requires-Dist: mplcursors>=0.7
|
|
15
|
+
Requires-Dist: numpy>=2.2.6
|
|
16
|
+
Requires-Dist: scikit-learn>=1.7.2
|
|
17
|
+
Requires-Dist: scipy>=1.15.3
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: basedpyright>=1.32.1; extra == 'dev'
|
|
20
|
+
Requires-Dist: jupyter-lsp>=2.3.0; extra == 'dev'
|
|
21
|
+
Requires-Dist: jupyterlab-lsp>=5.2.0; extra == 'dev'
|
|
22
|
+
Requires-Dist: jupyterlab>=4.4.10; extra == 'dev'
|
|
23
|
+
Requires-Dist: jupytext>=1.18.1; extra == 'dev'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# `iaa-od`: a comprehensive IAA analysis suite
|
|
27
|
+
|
|
28
|
+
This package provides a comprehensive Inter-Annotator Agreement analysis suite for Object Detection tasks.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
You can install the `iaa-od` package by cloning this repository and then running the following command on its top level:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
pip install .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Development installation
|
|
39
|
+
|
|
40
|
+
If you want to make modifications to the package, you may install it like so:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
pip install -e .
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If you wish to do some testing through Jupyter Notebooks, install the optional dependencies as well:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
pip install -e ".[dev]"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Computed metrics
|
|
53
|
+
|
|
54
|
+
Below is a list of currently implemented metrics.
|
|
55
|
+
|
|
56
|
+
### Krippendorff's $\alpha$
|
|
57
|
+
|
|
58
|
+
Krippendorff's $\alpha$ coefficient is defined as:
|
|
59
|
+
|
|
60
|
+
$$\alpha = 1 - \frac{D_o}{D_e}$$
|
|
61
|
+
|
|
62
|
+
and is computed in our package according to [this paper by Klaus Krippendorff](https://repository.upenn.edu/handle/20.500.14332/2089).
|
|
63
|
+
|
|
64
|
+
The *units* in each image are found through agglomerative clustering.
|
|
65
|
+
|
|
66
|
+
### Rater vitality
|
|
67
|
+
|
|
68
|
+
[Rater vitality](10.1109/SocialSens.2018.00018) measures the contribution of each annotator to the global agreement value. It is computed as:
|
|
69
|
+
|
|
70
|
+
$$\nu_a = \alpha - \alpha_a$$
|
|
71
|
+
|
|
72
|
+
where $\alpha_a$ is the value of Krippendorff's $\alpha$ computed excluding annotator $a$ from the dataset.
|
|
73
|
+
|
|
74
|
+
### Scale complexity
|
|
75
|
+
|
|
76
|
+
[Scale complexity](10.1109/SocialSens.2018.00018) measures the ambiguity found across categories of the same dataset by grouping them into user-defined macro-categories. It is computed as:
|
|
77
|
+
|
|
78
|
+
$$\text{SC} = \alpha_M - \alpha$$
|
|
79
|
+
|
|
80
|
+
where $\alpha_M$ is the value of Krippendorff's $\alpha$ computed on the macro-categories. If $\text{SC} > 0$, categories grouped in the same macro-categories are ambiguous.
|
|
81
|
+
|
|
82
|
+
### L-Score (Localisation Score)
|
|
83
|
+
|
|
84
|
+
L-Score measures the localisation agreement reached by the annotators by only considering the locations of their bounding boxes. It is computed as:
|
|
85
|
+
|
|
86
|
+
$$L_{\text{score}} = \frac{|A|}{2|A|-1} \left[ \sum_{i=2}^{|A|} \left(\frac{i-1}{|A|}\, p_i\right) - p_1 + 1\right]$$
|
|
87
|
+
|
|
88
|
+
L-Score $\in [0,1]$, where 1 indicates perfect localisation agreement.
|
|
89
|
+
|
|
90
|
+
### C-Score (Categorisation Score)
|
|
91
|
+
|
|
92
|
+
C-Score measures the categorisation agreement reached by annotators by analysing intersecting bounding boxes and comparing their labels.
|
|
93
|
+
|
|
94
|
+
Computation is not reported here for brevity.
|
|
95
|
+
|
|
96
|
+
C-Score $\in [0,1]$, where 1 indicates perfect categorisation agreement.
|
|
97
|
+
|
|
98
|
+
### Count and size granularity
|
|
99
|
+
|
|
100
|
+
Count and size granularity measure the behaviour of annotators when annotating large groups of object:
|
|
101
|
+
|
|
102
|
+
- an annotator who groups many instances into a single bounding box annotates "by group";
|
|
103
|
+
- an annotator who creates several bounding boxes for each instance annotates "by instance".
|
|
104
|
+
|
|
105
|
+
Computation of these metrics is not reported here for brevity.
|
|
106
|
+
|
|
107
|
+
Count and size granularities both rely on a benchmark annotator, found during computation, to whom all other annotators are compared to.
|
|
108
|
+
|
|
109
|
+
## Working example
|
|
110
|
+
|
|
111
|
+
`main.py` provides a working example of the package by performing all available analyses on a dataset with three annotators. More examples are also provided in the `experiments` directory: specifically, `experiments/images.py` shows how to utilise the `visualisation` module.
|
|
112
|
+
|
|
113
|
+
## Jupyter notebooks
|
|
114
|
+
|
|
115
|
+
The `notebooks` directory contains a number of Jupyter notebooks to play around with data.
|
iaa_od-4.1.1/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# `iaa-od`: a comprehensive IAA analysis suite
|
|
2
|
+
|
|
3
|
+
This package provides a comprehensive Inter-Annotator Agreement analysis suite for Object Detection tasks.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
You can install the `iaa-od` package by cloning this repository and then running the following command on its top level:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
pip install .
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Development installation
|
|
14
|
+
|
|
15
|
+
If you want to make modifications to the package, you may install it like so:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
pip install -e .
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If you wish to do some testing through Jupyter Notebooks, install the optional dependencies as well:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
pip install -e ".[dev]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Computed metrics
|
|
28
|
+
|
|
29
|
+
Below is a list of currently implemented metrics.
|
|
30
|
+
|
|
31
|
+
### Krippendorff's $\alpha$
|
|
32
|
+
|
|
33
|
+
Krippendorff's $\alpha$ coefficient is defined as:
|
|
34
|
+
|
|
35
|
+
$$\alpha = 1 - \frac{D_o}{D_e}$$
|
|
36
|
+
|
|
37
|
+
and is computed in our package according to [this paper by Klaus Krippendorff](https://repository.upenn.edu/handle/20.500.14332/2089).
|
|
38
|
+
|
|
39
|
+
The *units* in each image are found through agglomerative clustering.
|
|
40
|
+
|
|
41
|
+
### Rater vitality
|
|
42
|
+
|
|
43
|
+
[Rater vitality](10.1109/SocialSens.2018.00018) measures the contribution of each annotator to the global agreement value. It is computed as:
|
|
44
|
+
|
|
45
|
+
$$\nu_a = \alpha - \alpha_a$$
|
|
46
|
+
|
|
47
|
+
where $\alpha_a$ is the value of Krippendorff's $\alpha$ computed excluding annotator $a$ from the dataset.
|
|
48
|
+
|
|
49
|
+
### Scale complexity
|
|
50
|
+
|
|
51
|
+
[Scale complexity](10.1109/SocialSens.2018.00018) measures the ambiguity found across categories of the same dataset by grouping them into user-defined macro-categories. It is computed as:
|
|
52
|
+
|
|
53
|
+
$$\text{SC} = \alpha_M - \alpha$$
|
|
54
|
+
|
|
55
|
+
where $\alpha_M$ is the value of Krippendorff's $\alpha$ computed on the macro-categories. If $\text{SC} > 0$, categories grouped in the same macro-categories are ambiguous.
|
|
56
|
+
|
|
57
|
+
### L-Score (Localisation Score)
|
|
58
|
+
|
|
59
|
+
L-Score measures the localisation agreement reached by the annotators by only considering the locations of their bounding boxes. It is computed as:
|
|
60
|
+
|
|
61
|
+
$$L_{\text{score}} = \frac{|A|}{2|A|-1} \left[ \sum_{i=2}^{|A|} \left(\frac{i-1}{|A|}\, p_i\right) - p_1 + 1\right]$$
|
|
62
|
+
|
|
63
|
+
L-Score $\in [0,1]$, where 1 indicates perfect localisation agreement.
|
|
64
|
+
|
|
65
|
+
### C-Score (Categorisation Score)
|
|
66
|
+
|
|
67
|
+
C-Score measures the categorisation agreement reached by annotators by analysing intersecting bounding boxes and comparing their labels.
|
|
68
|
+
|
|
69
|
+
Computation is not reported here for brevity.
|
|
70
|
+
|
|
71
|
+
C-Score $\in [0,1]$, where 1 indicates perfect categorisation agreement.
|
|
72
|
+
|
|
73
|
+
### Count and size granularity
|
|
74
|
+
|
|
75
|
+
Count and size granularity measure the behaviour of annotators when annotating large groups of object:
|
|
76
|
+
|
|
77
|
+
- an annotator who groups many instances into a single bounding box annotates "by group";
|
|
78
|
+
- an annotator who creates several bounding boxes for each instance annotates "by instance".
|
|
79
|
+
|
|
80
|
+
Computation of these metrics is not reported here for brevity.
|
|
81
|
+
|
|
82
|
+
Count and size granularities both rely on a benchmark annotator, found during computation, to whom all other annotators are compared to.
|
|
83
|
+
|
|
84
|
+
## Working example
|
|
85
|
+
|
|
86
|
+
`main.py` provides a working example of the package by performing all available analyses on a dataset with three annotators. More examples are also provided in the `experiments` directory: specifically, `experiments/images.py` shows how to utilise the `visualisation` module.
|
|
87
|
+
|
|
88
|
+
## Jupyter notebooks
|
|
89
|
+
|
|
90
|
+
The `notebooks` directory contains a number of Jupyter notebooks to play around with data.
|