Tutorials

AI-generated illustration of a compact wheeled robot, a wooden pallet, and a traffic cone in a dim synthetic warehouse aisle, each enclosed by slightly offset teal and gold bounding boxes. Synthetic data only.
Tutorial

How I built a synthetic-data annotation QA workbench with agreement scores

A portfolio walkthrough of annotation-qa-workbench: a synthetic warehouse scene, a stdlib Python scorer, and a React workbench that compares IoU, Cohen's kappa, Krippendorff's alpha, teaching MOTA, and standard IDF1. How to run it, the locked goldens, four injected mutants, and the honest limits, including assignment oracles that stop at n <= 8 in TypeScript and n <= 6 in Python. Synthetic data only. The workbench shows recorded CI scores and does not train a model.

Arpan Bom10 min read
ShareXLinkedIn

This is a synthetic-data tool

This is a portfolio demo. It is not a production labelling platform, not CVAT, not Label Studio, and not a model-training run. The locked scene is a synthetic warehouse aisle called warehouse_v1: 20 frames of drawn robot, pallet, and cone boxes, plus three synthetic annotator traces (A, B, and C). There are no real robot images, no customer photos, and no public datasets such as COCO or ImageNet. The GitHub Pages workbench loads a recorded CI report and lets you draw a temporary "You" annotation in the browser. "You" edits stay in memory and are lost on reload. I did not invent intersection-over-union, Cohen's kappa, Krippendorff's alpha, MOTA, IDF1, or Kuhn-Munkres assignment.

Try the live demo

The fastest way to see the recorded result is the static workbench on GitHub Pages: https://applycoding.github.io/annotation-qa-workbench/

The page title is "annotation-qa-workbench - synthetic data." The header repeats "Synthetic data only," "Simulation only," and "Recorded CI scores sit beside a live annotator; this page does not train a model and does not use real robot images." The app loads report.json from the same origin. A production build refuses a report with sample set to true.

The live GitHub Pages workbench of annotation-qa-workbench on commit af14b8f, with annotator A selected, honesty labels, live scores, and the recorded CI panel. Synthetic data only.

Image: a fresh screenshot of the live demo on commit af14b8f. Annotator A is selected. Synthetic data only. applycoding.com.

What the project is

annotation-qa-workbench (repo: applycoding/annotation-qa-workbench, commit af14b8f) is an original implementation of well-known agreement and tracking scores, inspired by the papers and workbench ideas credited in REFERENCES.md. CVAT and Label Studio are references only for the idea of a box-drawing workbench and of multi-annotator checks. This tree does not vendor, wrap, or translate those projects.

The stack at this commit is:

Layer Role
annotation_qa_workbench / aqw Stdlib-only Python package. generate writes the locked scene, score writes a schema v1 report, and report --check rejects a sample report in CI.
fixtures/scenes/warehouse_v1.json Locked 20-frame synthetic scene and annotators A, B, and C
fixtures/expected/ Locked rational goldens that pytest and Vitest both read
web/ React 19 and Vite workbench with a canvas annotator, live scores, and a CI report panel
GitHub Actions One workflow on ubuntu-24.04 (never ubuntu-latest), SHA-pinned Actions, hashed Python deps, Node 26.13.0

Python does not use NumPy, SciPy, OpenCV, Pillow, or ROS.

How scoring works

Boxes are half-open xywh rectangles. Intersection-over-union is the usual overlap of two axis-aligned boxes. Frames are capped at 8 boxes, and identities are capped at 32.

Assignment on each frame is a minimum-cost match of boxes whose IoU is at least 0.5 (assignment_protocol: per_frame_min_cost_iou). That is a teaching protocol, not classic CLEAR priority matching. The assignment step uses Kuhn-Munkres. Python checks Hungarian results against an exhaustive oracle when both sides have at most 6 boxes. TypeScript uses exhaustive search for sides of at most 8, which covers a warehouse frame, and uses Hungarian for larger padded squares (identities 9 through 32). There is no exhaustive oracle for those larger identity matrices, and 32-factorial enumeration is not attempted.

Cohen's kappa is computed on nominal labels. Krippendorff's alpha is the nominal coincidence-matrix form. The locked Ben and Gerry textbook example is 155/224. Warehouse label-level alphas are also locked: AC is 1, AB and BC are 71/150, ABC is 671/830, and GT versus A, B, and C is 457/530 (about 0.862264 on the live page). Label-level alpha does not capture annotator A's spatial shift; mean IoU does.

Teaching MOTA uses the per-frame assignment above. MOTP is reported as mean IoU (motp_mean_iou), not a world-coordinate distance. Standard IDF1 uses all threshold-valid identity pairs, including a discriminating idf1_potential_pairs fixture whose standard IDF1 is 1 and whose teaching MOTA is 1/2.

Annotator B's precision of 1 is class-agnostic localization precision at IoU 0.5, not a claim that every class was independently graded as a detection score.

Build and run locally

Python 3.12 is what CI uses. From a clone of this commit:

pip install --require-hashes -r requirements.lock
pip install --no-build-isolation --no-deps .
aqw generate --out fixtures/scenes
aqw score --scene fixtures/scenes/warehouse_v1.json --out artifacts/report.json --sha "$GITHUB_SHA"
aqw report --check artifacts/report.json --require-ci --expect-sha "$GITHUB_SHA"

The workbench build, with the Pages base path, is:

cd web && npm ci && npx vite build --base /annotation-qa-workbench/

The production Vite plugin fails the build if report.json is missing. Copy a checked CI report in before the Pages build. Do not commit a sample: false report into web/public/. The checked-in web/public/sample_report.json is marked sample: true and is rejected in a production build.

Results from the tests

On commit af14b8fd34496b23d0797c61cc1bb36f1a4d83cc, GitHub Actions run 43060531401 completed the core, web, and pages jobs. The actor and triggering_actor were applycoding.

The locked warehouse scores versus ground truth are:

Annotator MOTA IDF1 Label kappa MOTP mean IoU IDSW
A 1 1 1 32619964/39538911 (0.825009) 0
B 2/3 4/5 1/2 1 0
C 29/30 2/3 1 1 2

The live report.json at this SHA has git_sha af14b8fd34496b23d0797c61cc1bb36f1a4d83cc, sample false, schema 1, those same scores, and warehouse alphas AC 1, AB/BC 71/150, ABC 671/830, and GTABC 457/530. The Ben and Gerry alpha 155/224 is locked in fixtures/expected/alpha.json and is checked by pytest and Vitest; it is not a field on the live report.

CI at this SHA reported:

  • ruff clean, and mypy --strict clean on 14 source files
  • pytest 53 passed, with package coverage 90.71% (624 statements, 58 missed, floor 80)
  • Vitest 21 passed (2 files)
  • Playwright 15 passed (3.7s)
  • Four injected scorer mutants, each rejected when the healthy golden still holds: iou_over_gt (IoU over the ground-truth area only), kappa_is_po (kappa reduced to observed agreement), mota_skip_idsw (identity switches dropped from MOTA), and idf1_match_only (IDF1 restricted to matched pairs)

The live Pages site returned HTTP 200, the document title includes "synthetic data," and its report.json carried this SHA with sample false.

License and references

Apache-2.0. Copyright 2026 Arpan Bom. See LICENSE (byte-identical to the official Apache-2.0 text from apache.org, sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30) and NOTICE.

Idea references, not vendored code, are listed in REFERENCES.md:

  • The idea of a box-drawing workbench, from cvat-ai/cvat (MIT)
  • The idea of multi-annotator quality checks, from HumanSignal/label-studio (Apache-2.0)
  • Cohen, J., "A Coefficient of Agreement for Nominal Scales," Educational and Psychological Measurement, 20(1), 37-46, 1960 (formula only)
  • Krippendorff, K., "Computing Krippendorff's Alpha-Reliability," 2011 revision, including the locked Ben and Gerry example
  • Bernardin, K. and Stiefelhagen, R., "Evaluating Multiple Object Tracking Performance: The CLEAR MOT Metrics," EURASIP Journal on Image and Video Processing, 2008, DOI 10.1155/2008/246309. This demo uses a teaching MOTA and an overlap-form motp_mean_iou; it does not claim a world-coordinate MOTP.
  • Ristani, E., Solera, F., Zou, R., Cucchiara, R., and Tomasi, C., "Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking," ECCV Workshops 2016, arXiv:1609.01775. This demo uses the usual identity-score accumulator (all threshold-valid pairs, then a global identity assignment). It is not official MOTChallenge code.

NOTICE lists the SHA-pinned GitHub Actions, Playwright Chromium and ffmpeg, and the locked Python and Node tools with versions and licenses (pytest, pytest-cov, coverage, ruff, mypy, hatchling, React, Vite, TypeScript, Vitest, Playwright, and their type packages). Runtime JavaScript redistributed in the Pages bundle is listed in THIRD_PARTY_NOTICES.md. NOTICE does not list wheel hashes.

How this was verified

I ran the standard portfolio-tutorial checks against commit af14b8fd34496b23d0797c61cc1bb36f1a4d83cc on main, after an independent review of pull request head cc359f5a7d0ad9f5083a0f1fba1199787de7445d.

  • The GitHub repo is not a fork. gh api repos/applycoding/annotation-qa-workbench reports "fork": false. After the squash merge, the only remote branch is main.
  • main has two commits, both with author and committer Arpan Bom (applycoding@gmail.com): the planning commit 8244022 and the squash af14b8f. git log --format=%B main has no Co-authored-by trailers. The squash parent is 82440228f6ca424b0b06eb63b3410233d21387d7.
  • A search of the tree found no third_party, vendor, or external directories, and no "ported from" or "copied from" markers in the authored source. There are no U+2014, U+2013, or U+2212 characters in project-authored files, the squash message, or the live workbench HTML and JavaScript. The only cursor token in the shipped bundle is the CSS cursor property on the canvas.
  • This is an original implementation of well-known methods (intersection-over-union, Cohen's kappa, Krippendorff's alpha, MOTA, and IDF1), inspired by the papers and workbench ideas credited above. I did not invent those methods, and I did not copy CVAT or Label Studio.
  • At af14b8f, NOTICE names the direct Python, Node, Actions, and Playwright browser pins, and it points at REFERENCES.md. The repo license is Apache-2.0. The LICENSE file is byte-identical to the official Apache-2.0 text. NOTICE does not list wheel hashes.
  • Commands, paths, APIs, and the numbers in this tutorial were checked against the repo at af14b8f and against the live demo. The 53 pytest passes, 90.71% package coverage, Vitest 21 passed, and Playwright 15 passed (3.7s) are from GitHub Actions run 43060531401 on that commit, which also deployed Pages. Both the actor and the triggering actor of that run are applycoding. Independent review of the pull-request tip cc359f5 used pull_request run 43059151530 and push run 43059139022; those runs were later deleted in the pre-merge cleanup because they were not authored by applycoding.
  • The work reached main after four verification rounds on the pull request. Round 1 rejected tautological mutant tests, thin Vitest and Playwright coverage, a weak identity-cap test, hygiene and SHA-pin holes, and a committed production report path. Round 2 fixed those items, but the isolated coverage fixture was untracked, Vitest still missed warehouse alphas and the idf1_potential_pairs scene, the root third-party notices file drifted from the copy under web/public/, the alpha caveat used the wrong metric name, and the hygiene gate swallowed some scanner errors. Round 3 tracked the fixture, added the missing Vitest goldens, a notices drift check, the alpha wording, and a LICENSE-hash dash exemption, but the negative coverage gate still failed on "No data to report," and a missing file(1) still skipped the tree scan. Round 4 pointed that gate at an isolated coverage config so it accepts only a real sub-80% report on undercover.py, and the hygiene gate now exits non-zero when file(1) is missing. Independent re-verification passed at cc359f5, and the squash on main is af14b8f.
  • This project is a synthetic-data portfolio demo. The workbench shows recorded CI scores beside a live annotator and does not train a model.

Limits

This is a portfolio demo on a synthetic warehouse scene. It is not a production annotator, not a certified QA tool, and not a claim about real customer data. Teaching MOTA uses per-frame min-cost IoU assignment, not classic CLEAR priority matching. MOTP is mean IoU, not a world-coordinate distance. TypeScript exhaustive assignment covers sides of at most 8; the Python oracle covers sides of at most 6; there is no exhaustive Hungarian oracle for identity sizes 9 through 32. CI installs Playwright Chromium with --with-deps after a documented apt and DNS workaround on ubuntu-24.04 (see DEVIATIONS.md). Package coverage of 90.71% omits cli.py. NOTICE does not list wheel hashes. "You" annotations are in-memory only.