← Back to Documentation

Mathematical Quality Assurance

Hungarian Algorithm, Pairwise Scores, Q0–Q4

Podcast-Erklärung

Hören Sie eine detaillierte Erklärung der mathematischen Qualitätssicherung mit Fokus auf den Hungarian Algorithm und die IoU-Berechnung.

Länge: ca. 15 Minuten

1. Blind Labeling & Confirmation Bias Prevention

The Problem

When multiple annotators...

  • Confirmation bias
  • Herd behavior
  • Hierarchy effects
  • Fatigue clustering

The Solution: Blind Labeling

LaSoFly implements true blind labeling:

  • Each annotator
  • No discussions
  • Independent decisions
  • Only after completion

2. Circle Matching mit dem Hungarian Algorithm

Das Problem

Annotator A annotiert 5 Objekte...

Dies ist ein Matching-Problem...

Der Ungarische Algorithmus (Kuhn-Munkres)

Der Hungarian Algorithm ist ein klassisches Operations-Research-Verfahren...

Eingabe: Kostenmatrix cost[i][j] mit Größe n × m

Kostenberechnung:

cost[i][j] = 1 - IoU(circle_A[i], circle_B[j])

Ausgabe: Matching, das die Gesamtkosten minimiert (= Gesamtüberlappung maximiert)

Komplexität: O(n³) — selbst für große Bilder mit 100+ Bäumen schnell

IoU (Intersection over Union) für Kreise

Für zwei Kreise C₁ (Mittelpunkt p₁, Radius r₁) und C₂ (Mittelpunkt p₂, Radius r₂):

IoU = Intersection / Union

Intersection: Schnittfläche der beiden Kreise

Union: Vereinigungsfläche der beiden Kreise = Area(C₁) + Area(C₂) - Intersection

Die Schnittfläche zweier Kreise wird mit der Lens-Formel berechnet:

Wenn d = ||p₁ - p₂|| (Abstand der Mittelpunkte): Intersection = r₁²·arccos((d² + r₁² - r₂²)/(2·d·r₁)) + r₂²·arccos((d² + r₂² - r₁²)/(2·d·r₂)) - 0.5·√((r₁+r₂+d)·(r₁+r₂-d)·(d+r₁-r₂)·(d-r₁+r₂)) Union = π·r₁² + π·r₂² - Intersection IoU = Intersection / Union

Ergebnis: IoU ∈ [0, 1], wobei 1.0 bedeutet "perfekt identische Kreise" und 0.0 bedeutet "keine Überlappung".

3. Pairwise Scores

Nach dem Matching zwischen Annotator A und Annotator B berechnen wir ihren Pairwise Agreement Score:

pairwise_score(A, B) = Σ IoU(matched_pairs) / max(|A|, |B|)

Interpretation:

  • Gematchte Kreise mit hohem IoU tragen positiv zum Score bei
  • Ungematchte Kreise (Annotator A sieht einen Baum, B nicht) gehen als 0 in den Score ein
  • Normalisierung nach max(|A|, |B|) macht den Score unabhängig von der Annotationsmenge

Beispiel: A hat 5 Kreise, B hat 3. Sie matchen 3 Kreise mit durchschnittlichem IoU von 0.85.

pairwise_score(A,B) = (0.85 + 0.85 + 0.85) / max(5, 3) = 2.55 / 5 = 0.51

Note: pairwise scores are weighted by trust stage — see Section 6.

4. Qualitätsstufen (Q0–Q4)

Aus den Pairwise Scores aller Annotator-Paare aggregieren wir einen Image-Level Consensus Score und teilen ihn in 5 Qualitätsstufen ein:

Stufe

Q0

Score

< 0.4

Bedeutung

Keine Übereinstimmung

Training

Nicht geeignet

Stufe

Q1

Score

0.4–0.6

Bedeutung

Schwache Übereinstimmung

Training

Nur mit Admin-Review

Stufe

Q2

Score

0.6–0.8

Bedeutung

Gute Übereinstimmung

Training

Nutzbar

Stufe

Q3

Score

0.8–0.9

Bedeutung

Sehr gute Übereinstimmung

Training

Geeignet

Stufe

Q4

Score

≥ 0.9

Bedeutung

Exzellente Übereinstimmung

Training

Ideal für Training

Default Training-Threshold:

Bilder mit Consensus Score ≥ 0.7 (Q2+) werden zum Training freigegeben — admin-tunable.

5. Human-in-the-Loop Workflow

Das komplette Labeling-Pipeline kombiniert Automation mit manueller Qualitätskontrolle:

1

Blind Labeling durch Annotatoren

Annotators arbeiten unabhängig an ihren zugewiesenen Bildern (keine Sicht auf andere)

2

Automatische Consensus-Berechnung

Worker-Job berechnet Hungarian Algorithm, Pairwise Scores, Q0–Q4 Stufen

3

Admin-Review in Karten-Visualisierung

Admin sieht alle Annotationen überlagert, mit IoU-Heatmaps und Consensus Scores

4

Freigabe oder Rückweisung

Q3/Q4 Auto-Approve, Q2 mit Approval, Q0/Q1 Rückweisung für Nachbearbeitung

5

Training-Batch-Generierung

Freigegebene Labels (Q2+) werden in deduplizierte Batches konvertiert für CNN-Training

6. Vertrauensstufen & gewichtete Aggregation

Nicht jeder Pairwise Score zählt gleich viel.

Die vier Vertrauensstufen

Neuling

Frisch registriert.

Gewicht

1

Erfahren

Hat Counter & Match-Rate erreicht.

Gewicht

2

Geprüft

Hat den Gold-Test bestanden.

Gewicht

3

Experte

Wurde von Experten gewählt.

Gewicht

4

Gewichte in der Aggregation

Beim Image-Level Consensus Score fließt jedes Annotator-Paar mit dem Produkt seiner Stufen-Gewichte ein:

weight(A, B) = STAGE_WEIGHT(A) × STAGE_WEIGHT(B)

Die Q4-Experten-Regel

Q4 wird nur vergeben, wenn mindestens ein Experte am Bild gearbeitet hat.

Warum? Expertise zählt.

Der Gold-Test (Erfahren → Geprüft)

Geprüfte Annotatoren werden anhand bekannter Referenz-Tiles ermittelt.

Promotion zum Experten (Geprüft → Experte)

Bestehende Experten und Admins prüfen Beispiel-Annotationen und stimmen ab.

Admin-Override

Admins können die Stufe eines Annotators jederzeit manuell überschreiben — mit Pflicht-Begründung und Audit-Log.

7. Three Principles for AI Projects

Three lessons distilled from the LaSoFly journey. They sound trivial — and are not. They mark the spots where most AI projects fail in practice.

1

A solution is only as good as the parts it is built from.

The heuristic pipeline did not fail through lack of algorithmic finesse but through missing information in the input image. The pretrained AI model did not fail through poor architecture but through training data from the wrong domain. The consensus platform works not through Hungarian matching alone but through the interplay of TrustScore, gold tiles and quality levels. The chain is exactly as strong as its weakest link.

2

The best AI model is worthless if deployed in the wrong context.

DeepForest on NEON forest aerials is an excellent tool — confidence 0.85–0.95, clean crown segmentation, top scores in comparison studies. On hessian residential orthophotos the same model produced 115 detections instead of 50, with confidences capped at 0.67. The model did not get worse. The context changed. AI is not a domain-independent truth machine — it is a function of its training data.

3

Garbage in, garbage out — an AI predicts coherences, not truth.

An AI is only as good as its underlying model and the data quality it was trained on. It detects statistical patterns in what it has seen and extrapolates predictions — never the actual truth. It cannot tell a reliable signal from a systematic artifact when both appear equally often in the training data. Where the data quality is off, the best model prediction is a well-phrased shot in the dark. In such situations the experience of a domain expert with their often underestimated gut feeling is superior to the AI — not because the human computes more cleverly, but because they bring context the data does not contain.

These three principles are a reminder of one's own diligence: before the model choice comes the data work. Before the data work comes the question of whether the available data even contains the right signal. And above all stands the willingness to procure missing information from an entirely different source if necessary — as in this project the height data from the hessian open-data collection.

8. Warum das wichtig ist

Saubere Ground Truth = Bessere Modelle

Ohne Consensus-Qualitätskontrolle:

  • Noisy Labels (Q0/Q1 mit Disagreement)
  • Einzelannotator-Bias (keine Validierung)
  • Schlechtere CNN-Vorhersagen
  • Große Test-Fehler in der Produktion

Mit LaSoFlys Consensus + Q-Level-Filtering + Vertrauensstufen:

  • Saubere, validierte Labels
  • Hohe Inter-Annotator Agreement
  • Expertise zählt mehr als Stimmenanzahl — gewichtete Aggregation
  • CNNs trainieren auf konsistenten Daten

Ergebnis: Präzisere Objekt-Erkennung in der Praxis.

Learn more about LaSoFlys concept

← Back to Concept