FlyLabelImg icon FlyLabelImg

Annotation Quality Control: Tiny, Duplicate, Out-of-Bounds and Unknown Boxes

Label errors are silent. The training runs, the loss goes down, the metrics look plausible — and the model just learned that a two-pixel speck in the corner is a "person", because someone's editor once exported a degenerate box. Unlike code bugs, label rot reproduces on every epoch. The fix is a mechanical quality pass, run before training and after any bulk edit.

The five rule checks every dataset needs

CheckWhat it catchesTypical cause
Out-of-boundsBoxes extending past the image edgeResize-after-label, coordinate-space confusion, hand-typed XML
TinyBoxes below a plausible area thresholdAccidental click-pairs, degenerate exports, label-space noise
DuplicateSame-class boxes overlapping at high IoUCopy-paste, double annotation passes, un-deduped AI output
Unknown classLabels outside the declared class listRenamed classes, typo'd entries, stale classes.txt order
Format conflictSidecar/content mismatchesMixed tools, half-converted datasets, parallel VOC/YOLO edits

Each of these is mechanical — a script or a tool can flag every instance in minutes. What you do about them varies: tiny boxes get a human look (sometimes they are real detections of distant objects), duplicates get merged, out-of-bounds boxes get clipped or deleted.

The sixth check: model re-inference

Rules catch structural errors, not semantic ones — a perfectly formed box around the wrong object passes every rule. For that, re-run a model over annotated images and compare: model says "person" where your label says "helmet", a strong detection where you labeled nothing, or silence where you labeled a crowd — each is a review candidate. This is the machine version of a second annotator, and it doubles as a free sanity check of the model itself.

In FlyLabelImg the pass is built in: 检查标注 (Check) runs the rule set over the folder and lists findings per image; optionally it re-runs the local model over annotated images and reports position/class/miss discrepancies. Findings open the exact image for fixing. Combined with the review-first workflow, most label rot is caught the day it is introduced, not the week the model misbehaves.

When to run the pass

  • After every bulk operation — imports, conversions, AI batch runs, class renames.
  • Before every training run — five minutes of checks beats a week of wondering why mAP dropped.
  • Before delivery — if the dataset changes hands, format conflicts and unknown classes are the first thing the receiver will trip over.

Fixes that stick

  • Clamp or delete out-of-bounds boxes; log what you deleted.
  • For tiny boxes, look before deleting — distant real objects are legitimate; degenerate click-pairs are not.
  • Merge duplicates by keeping the tighter box, and check whether the duplicate rate correlates with a particular annotator or batch.
  • Unknown-class labels: reconcile with classes.txt order first (positional indices!), then rename.

One click, all five rules

FlyLabelImg's checker audits your folder for out-of-bounds, tiny, duplicate, unknown-class and format-conflict labels — and re-runs the local model for a semantic second opinion. 30-day trial, all features.

FAQ

What counts as a "tiny" box?

It depends on your domain. A common default flags boxes below roughly 8×8 pixels or under 0.05% of image area — but distant-traffic-cam datasets legitimately contain such objects, so treat the check as "review", not "delete".

How high should duplicate IoU threshold be?

Same-class duplicates are near-certain at IoU > 0.9, plausible at > 0.7. Below that, overlapping objects are legitimate — people in a crowd, parked cars — so tighten the threshold rather than trust one number blindly.

Can quality checks replace human review?

No — they prioritize it. Rules and model re-inference tell you which fifty images of five thousand to open. The judgment stays human.