Guide · Introductory to intermediate · 14 min read

How to design a useful label taxonomy

Turn a kick-off wish list into classes annotators can actually apply: two tests for granularity, mutually exclusive versus multi-label rules, a hierarchy, separate rules for other, ignore and uncertain, a class dictionary and version numbers, worked on a synthetic surface-defect case.

anastig editorial teamPublished

A useful label taxonomy is a short, versioned list of classes that annotators can tell apart from the image alone, where every class maps to something you will do with the result. Give each class a written definition, what it includes and excludes, examples and look-alike counter-examples. Decide in advance how to handle "other", "ignore" and "uncertain", because they are three different things. Store properties such as size or severity as attributes, not as extra classes. Then test the list on a small double-labelled pilot before anyone labels at scale.

This guide covers the class list itself. Choosing the task type comes first (classification, detection or segmentation), and the written instructions, calibration and quality checks around the list come after (a reproducible annotation protocol).

Start from decisions, not from vocabulary

A class list written in a kick-off meeting usually mixes three kinds of words: what things look like ("scratch"), what caused them ("dirt") and what to do about them ("reject"). Only the first kind can be labelled from an image. Start by listing the decisions the model's output will feed, then ask which visual distinctions each decision needs.

The LVIS dataset team called this "evaluation-first" design: before collecting any data, they defined the task and how it would be scored [1]. Their reason applies to small projects too. If one object can carry two correct labels, such as a toy that is also a deer, a car that is also a vehicle, or a backpack that someone calls a rucksack, then a correct prediction can be scored as wrong. That happens unless the class list says how those relationships are handled [1].

A worked case: cosmetic defects on brushed panels

A small manufacturer photographs brushed-aluminium cover panels under fixed lighting and wants a model to find cosmetic defects. The case is synthetic, but its problems are typical. The kick-off meeting produced this draft list, version 0:

Draft label (v0)ProblemFate in v1.0
scratchFine, but "how long is a scratch?" is not definedKept, with a minimum length
crackRare; easily confused with a scratchKept as a separate class because missing one is costly; reported at parent level until there are enough examples
dentFineKept
stain, dirt"Dirt wipes off, a stain does not" cannot be seen in a photoMerged into contamination
defectOverlaps every other classBecomes the parent node; never used as a label
minor, majorSeverity, not appearanceAttribute (measured size) plus a downstream rule
bad partA decision about the whole panel, not a markRemoved; computed from the labels
otherNo rule for when to use itKept as "other defect" with a mandatory comment and a weekly review
Taxonomy tree. A mark inside the inspection zone is either a defect or not a defect. Defect splits into material cut or split (0 scratch, 1 crack), shape changed (2 dent), material added (3 contamination) and type not listed (4 other defect); these five leaves are the only labelled classes. Not a defect covers brushing grain and reflection, documented but never labelled. Side boxes: ignore region with id 255 for glare, stickers, out-of-zone areas and blur, excluded from training and scoring; uncertain flag, best-guess class plus flag, sent to adjudication, then the decided class or ignore. Attributes on every mark: length or diameter in millimetres, truncated, uncertain and a comment required for other defect; severity and the reject decision are computed later.
DiagramThe v1.0 taxonomy. Four defect classes and "other defect" are labelled, each with an id. Look-alikes are documented so annotators recognise them, but they are never labelled. Ignore regions, the uncertain flag and attributes are rules, not classes.

Choose the granularity with two tests

Labels can be broad or fine. The COCO authors gave the example of a dog that could be labelled "mammal", "dog" or "German shepherd". They chose entry-level categories, the words people commonly use when describing objects [2]. Cityscapes chose its classes by frequency, relevance to applications, annotation effort and compatibility with other datasets. It defined 30 classes but scored only 19, leaving out those too rare to evaluate [3].

For your own list, apply two tests to every class and to every pair of similar classes:

  1. Can a trained annotator decide it from the image alone? "Dirt wipes off" fails this test. "Branched dark line starting at an edge or hole" passes it.
  2. Does the distinction change a decision? If a scratch and a crack lead to different actions, keep them apart even if telling them apart is hard. If two classes always lead to the same action and are hard to tell apart, merge them. If they are easy to tell apart, keep both as leaves under one parent and report at the parent: a merge cannot be undone without relabelling.

Then check the first test with data. In a synthetic pilot, two annotators labelled the same 60 marks independently using the v0 list. For each class, the table counts the marks that both annotators gave that class ("both") and the marks that at least one of them gave it ("either"). With 60 marks the counts for rare classes are tiny, so read them as counts, not as rates.

Class (v0)BothEither
scratch1419
crack25
dent812
stain519
dirt619
other29

Do not argue for a merge from the rise in overall agreement. Merging two classes always raises raw agreement, by exactly the number of marks on which the two were swapped. Merging crack into scratch, which v1.0 rightly refuses, would also raise it, from 37 to 40 of 60. The evidence for a merge is the confusion pattern between the two classes. Here it is the stain/dirt corner of the pilot:

B: stainB: dirt
A: stain56
A: dirt56

On the 22 marks that both annotators saw as stain or dirt, they agreed on 11 and swapped 11. That is a coin flip, and it matches the first test: "wipes off" cannot be seen. Test 2 adds that both lead to the same action (clean and re-inspect), so v1.0 merges them into contamination. For the record, Cohen's kappa over all classes moves from 0.52 to 0.72. Kappa corrects for chance agreement and is explained in inter-annotator reliability.

Crack is a different case: 3 of the 5 marks that either annotator called a crack were called a scratch by the other. But a crack leads to a different action, so it fails only test 1, and only partly. v1.0 keeps crack as a class and fixes the definition instead: branched, or starting at an edge, hole or corner. It also adds examples and collects more crack images until there are enough to measure.

Mutually exclusive or multi-label

Decide this separately for each level at which you label.

  • Per mark (box, mask or point): one class. A mark is a scratch or a dent, not both. Mutually exclusive classes are what single-label classification assumes: each sample gets exactly one class [4]. When a mark fits two definitions, a written precedence rule decides. v1.0 uses crack, then dent, then scratch, then contamination: the costlier miss wins.
  • Per image: often several. A panel can have a scratch and a dent. Image-level labels are then multi-label: each class is a separate yes or no, and zero or several can be "yes" [4].
  • Separate defects that overlap get separate labels. A scratch that runs through a dent is two marks, and their masks may overlap. Write this down; otherwise one annotator draws one region and another draws two.

Use a hierarchy, but label only the leaves

Group classes under parents (here: material cut or split, shape changed, material added). Annotators label only the leaves, and parents are derived. The hierarchy pays off in three ways. You can report at parent level when a leaf is too rare to score on its own. You can collapse two leaves later without relabelling. And you can map your classes onto another dataset's.

Do not ask annotators to label both a parent and its child on the same object. Open Images collected image-level labels at several levels of its hierarchy. For its training set, before drawing boxes, it removed every label that was the parent of another label on the same image. An image labelled animal, zebra and car got boxes for zebra and car only [5].

"Other", "ignore" and "uncertain" are three different things

OptionWhat it meansEffect on training and scoringPrecedent
Other defect (id 4)A real defect that fits no classLabelled like any class, with a mandatory comment. Review them weekly; a recurring pattern becomes a candidate class in the next version—
Ignore regionPart of the image nobody can or should judge: glare that hides the surface, stickers, areas outside the inspection zoneExcluded from training loss and from evaluationCityscapes "void" [3]; COCO "crowd" regions [2]
Uncertain flagThe annotator cannot decide between classes, or whether a mark is a defect at allBest-guess class plus the flag; every flagged mark goes to adjudication. Afterwards the decided class is used, or the mark becomes an ignore region if it is still undecidableRelated: PASCAL VOC kept hard objects with their class but marked them "difficult" and left them out of scoring [6]

Without these options, annotators who meet an unclear case guess silently, and nobody can find those guesses afterwards. With them, unclear cases become a queue that someone can review.

Adjudication works that queue. Name one person or role who decides, such as the quality engineer. Record each decision as a numbered boundary rule with the example image, for example "B7: a dark line that starts at a rivet is a crack". A rule that only clarifies, without changing what any existing label should be, is a patch. A rule that changes existing labels is a major version, as defined in the versioning table below. The full procedure, with calibration and agreement checks, is in build a reproducible annotation protocol.

Store properties as attributes, not classes

Size, severity, visibility and position describe a mark; they are not different kinds of mark. Turning them into classes (scratch-minor, scratch-major) multiplies the list and forces annotators to make judgement calls that a ruler could make. Open Images stores properties such as occluded, truncated, group-of, depiction (a drawing or statue of the object) and inside (the view from inside a car or aeroplane) as attributes on the box, not as classes [5]. The PASCAL VOC guidelines make such flags measurable: an object is marked truncated if more than 15 to 20 % of it lies outside its bounding box, and occluded if more than 5 % of it is hidden inside the box [7]. In the panel case, annotators record length in millimetres. Severity and the accept or reject decision are computed later from length and the drawing's zone, so the rule can change without relabelling. For how to handle hidden and cut-off objects, see how to label occluded and truncated objects.

Write the class dictionary

Each class gets one row in a dictionary that annotators keep open while they work. The PASCAL VOC guidelines are a compact model. Each class has an include and an exclude list. The entry for chair, for example, reads "Includes armchairs, deckchairs but not stools or benches" [7]. LVIS resolved synonyms by making each category a WordNet synset, a word sense with its set of synonyms and a definition [1]. A plain synonym column does the same job in a small project.

IDClassDefinition (what is visible)Includes / synonymsExcludes and boundary rulesMinimum size
0scratchStraight or curved line that cuts across the brushing direction or differs clearly from the grain in brightnessScuff line, score markLines parallel to the brushing and within normal grain contrast are grain. A line that branches or starts at an edge, hole or corner is a crack1.0 mm long
1crackDark line that branches or starts at an edge, a hole or a cornerSplit, fracture lineA straight unbranched line in open surface is a scratch; if unsure, keep the best guess and set the uncertain flagAny visible length
2dentLocal light-to-dark shading change with no material removed and grain still continuousDing, impressionShading caused by the lighting across the whole panel. A scratch inside a dent is labelled separately2.0 mm across
3contaminationForeign material on the surface: patch, spot or particle that hides the grainDirt, stain, smudge, particle, residueBright areas without texture are reflections: draw an ignore region1.0 mm across
4other defectA defect that fits none of the above—Comment required: describe it in five words or more1.0 mm
255ignore regionArea that cannot be judgedGlare, sticker, out-of-zone, motion blurNever used for a mark you can see clearly—

Add at least three example crops and three look-alike counter-examples to every row. Use the same image IDs in every version of the guideline, so changes stay visible.

Worked example: labelling the eight swatches

Eight synthetic 30 by 20 millimetre brushed-metal swatches with horizontal grain. 1: dark line across the grain, 14.2 mm. 2: faint line along the grain, 20.0 mm. 3: branched dark line starting at a hole, total 20.6 mm. 4: round light-to-dark shading, 9.0 mm across, with the grain lines continuing through it. 5: irregular dark patch, 8.0 mm wide. 6: bright area with no grain visible, 13.0 by 6.4 mm. 7: dark line of 18.6 mm through round shading 8.0 mm across, grain continuing through the shading. 8: short dark line of 0.9 mm inside a dashed locator frame.
Synthetic dataEight synthetic swatches to label with the v1.0 dictionary. The measurements are computed from the drawn shapes.

Three of the eight, worked through:

  • Swatch 1: a 14.2 mm dark line across the grain, unbranched and in open surface. Scratch, length 14.2 mm.
  • Swatch 2: a faint 20.0 mm line parallel to the brushing, inside normal grain contrast. Not labelled: it is grain. This is exactly the look-alike the dictionary's exclude column is for. Two annotators without that rule would likely disagree here.
  • Swatch 6: a bright area with no grain visible. The surface under it cannot be judged, so draw an ignore region, not a defect and not "no defect". If glare is frequent, change the lighting; a taxonomy rule cannot recover hidden pixels.

The other five are in the worksheet.

Version the taxonomy like an interface

Models, datasets and reports all depend on the class list, so treat changes to it like changes to an interface. Semantic Versioning numbers releases MAJOR.MINOR.PATCH: the major number changes for incompatible changes, the minor for backward-compatible additions, the patch for backward-compatible fixes [8]. For a taxonomy, "compatible" has a specific meaning: every existing label stays correct and complete.

ChangeExampleVersion stepWhat existing labels need
Clarify wording, add examplesAdd three crack photos1.0.0 → 1.0.1Nothing
Add an optional attributeAdd "near weld: yes/no", default unknown1.0.1 → 1.1.0Nothing; the attribute is unknown on old labels
New class carved out of "other defect""pit" after 30 commented "other" marks1.1.0 → 1.2.0 only if a check shows pits were labelled only as "other" (re-review every "other" mark, plus a sample of contamination, dent and unlabelled areas); otherwise 2.0.0Re-review "other" marks; note in the change log that "other" now means less
Merge, split or redefine a class; any new class whose instances may sit unlabelled in old imagesSplit contamination into stain and particle1.2.0 → 2.0.0Map or relabel affected images; old data is incomplete until then

Store the taxonomy version with every label, keep a mapping table between versions (v0 stain and v0 dirt both map to v1.0 contamination), and never edit a released version in place.

Printable checklist

#CheckDone when
1Every class serves a decisionEach class names the action or report it feeds
2Every class can be decided from the imageA definition refers only to visible evidence
3Similar pairs have boundary rulesEach confusable pair has an "if … then …" rule and look-alike examples
4Mutually exclusive per mark, multi-label per image (or justified otherwise)Written in the guideline, with a precedence order
5Hierarchy defined; only leaves labelledParent of every leaf listed; reporting level stated for rare leaves
6Other, ignore and uncertain defined separatelyEach has a rule, and what happens next is written down
7Properties are attributesNo class name contains a size, severity or decision
8Synonyms listedEvery common alternative word maps to one class
9Minimum sizes setStated in pixels or millimetres for each class
10Examples and counter-examplesAt least three of each per class, with fixed image IDs
11Pilot runAt least two annotators double-labelled a sample; low-agreement pairs reviewed
12VersionedVersion number on the document and on every label record; mapping table kept

Worksheet

Use the v1.0 dictionary and the swatch figure.

  1. Label swatches 3, 4, 5, 7 and 8. Give the class (or "not labelled" or "ignore region"), any attribute and the rule you applied.
  2. A new annotator labels swatch 7 as one dent with a 18.6 mm length. What is wrong, and which rule fixes it?
  3. The quality team wants to split "contamination" into "oil stain" and "metal particle". Which version step is this, and what must happen to the existing labelled images?
  4. You add the attribute "near weld: yes/no" with default "unknown". Which version step is it?
  5. After a month, 34 "other defect" comments describe small round pits. What do you do?
  6. A manager asks for classes "scratch-cosmetic" and "scratch-functional". What do you propose instead?
Show the answers
  1. Swatch 3: crack. The line branches and starts at a hole; total length 20.6 mm. Swatch 4: dent, 9.0 mm across. The shading is local and the grain is continuous. Swatch 5: contamination, 8.0 mm wide. Whether it would wipe off cannot be seen, and that is why stain and dirt were merged. Swatch 7: two marks, a scratch (18.6 mm) and a dent (8.0 mm). Per-mark classes are mutually exclusive, and overlapping defects get separate labels. Swatch 8: not labelled. At 0.9 mm it is below the 1.0 mm minimum for scratches. If short marks matter, lower the minimum in a new version, and only after checking in a pilot that annotators see them consistently.
  2. It merges two defects into one mark and gives the dent the scratch's length. The rule "a scratch inside a dent is labelled separately" (dent row) fixes it: one scratch of 18.6 mm and one dent of 8.0 mm.
  3. Major (2.0.0). Every existing contamination label is now ambiguous. Re-review all contamination marks and map each to one of the new classes. Until that is done, do not mix old and new labels when training or scoring.
  4. Minor (1.1.0). Existing labels stay correct; the attribute is simply unknown on them.
  5. Draft a "pit" class with a definition, examples and look-alikes. Re-review every "other defect" mark (not only the 34), and check a sample of contamination, dent and unlabelled areas for pits labelled differently or missed. If pits appear only under "other", release a minor version and note that "other" has narrowed; if they also hide elsewhere, it is a major version. Run a short pilot first to check that annotators agree on pits.
  6. Keep one class, scratch, and record measured attributes (length, and zone from the drawing). Compute "functional" or "cosmetic" with a written rule. The rule can then change without relabelling, and annotators do not have to guess at consequences.

When the list is stable, write the full annotation guideline around it, with instructions, a calibration round and quality checks: build a reproducible annotation protocol. For a research study, the sampling and split decisions around the list are covered in plan a computer vision dataset for a research study.

References

  1. [1] A. Gupta, P. Dollár and R. Girshick. LVIS: A Dataset for Large Vocabulary Instance Segmentation. CVPR 2019; arXiv:1908.03195. arxiv.org/abs/1908.03195
  2. [2] T.-Y. Lin, M. Maire, S. Belongie, L. Bourdev, R. Girshick, J. Hays, P. Perona, D. Ramanan, C. L. Zitnick and P. Dollár. Microsoft COCO: Common Objects in Context. ECCV 2014; arXiv:1405.0312. arxiv.org/abs/1405.0312
  3. [3] M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth and B. Schiele. The Cityscapes Dataset for Semantic Urban Scene Understanding. CVPR 2016, 3213–3223; arXiv:1604.01685. arxiv.org/abs/1604.01685 doi:10.1109/CVPR.2016.350
  4. [4] scikit-learn user guide: Multiclass and multioutput algorithms (multiclass vs multilabel classification), version 1.9 documentation. Accessed 2026-11-28. scikit-learn.org/stable/modules/multiclass.html
  5. [5] A. Kuznetsova, H. Rom, N. Alldrin, J. Uijlings, I. Krasin, J. Pont-Tuset, S. Kamali, S. Popov, M. Malloci, A. Kolesnikov, T. Duerig and V. Ferrari. The Open Images Dataset V4. International Journal of Computer Vision 128, 1956–1981, 2020; arXiv:1811.00982. arxiv.org/abs/1811.00982 doi:10.1007/s11263-020-01316-z
  6. [6] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn and A. Zisserman. The PASCAL Visual Object Classes (VOC) Challenge. International Journal of Computer Vision 88(2), 303–338, 2010. doi.org/10.1007/s11263-009-0275-4 doi:10.1007/s11263-009-0275-4
  7. [7] PASCAL VOC2011 Annotation Guidelines (linked from the VOC2012 challenge pages), Visual Geometry Group, University of Oxford. Accessed 2026-11-28. www.robots.ox.ac.uk/~vgg/projects/pascal/VOC/voc2012/guidelines.html
  8. [8] T. Preston-Werner. Semantic Versioning 2.0.0. Accessed 2026-11-28. semver.org/

Where to go next

How to cite: anastig (2026). How to Design a Useful Label Taxonomy. Retrieved from https://anastig.ai/learn/how-to-design-a-useful-label-taxonomy

How this resource was prepared and checked: editorial standards. Found an error? Tell us.

How to Design a Useful Label Taxonomy | anastig