highlight audited YOLO label relationships
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-08-09 19:12:04 +02:00
parent 72b2cdaae4
commit fc18e72c7f
7 changed files with 171 additions and 5 deletions
@@ -2,6 +2,7 @@ import pytest
from scripts.render_operator_yolo_label_qa_contact_sheets import (
CONTACT_SHEET_NAME_TEMPLATE,
build_relationship_highlights,
filter_tiles_by_samples,
)
@@ -34,3 +35,40 @@ def test_filter_tiles_by_samples_without_filter_preserves_tiles() -> None:
def test_contact_sheet_name_template_is_stable_and_one_indexed() -> None:
assert CONTACT_SHEET_NAME_TEMPLATE.format(index=1) == "contact_sheet_001.png"
assert CONTACT_SHEET_NAME_TEMPLATE.format(index=12) == "contact_sheet_012.png"
def test_relationship_highlights_bind_indices_and_preserve_highest_priority() -> None:
summary = {
"flagged_tiles": [
{
"label_path": "/data/tile.txt",
"relationships": [
{
"relationship": "possible_nested",
"first_index": 2,
"second_index": 4,
},
{
"relationship": "exact_duplicate",
"first_index": 2,
"second_index": 5,
},
{
"relationship": "near_duplicate",
"first_index": 6,
"second_index": 7,
},
],
}
]
}
assert build_relationship_highlights(summary) == {
"/data/tile.txt": {
2: "exact_duplicate",
4: "possible_nested",
5: "exact_duplicate",
6: "near_duplicate",
7: "near_duplicate",
}
}