Data Annotation Guidelines: A Template and Test Plan

Data annotation guidelines for creating accurate and consistent labels

Try a quick test. Pick one image from your dataset and list the objects you would label. Give the same image and your current instructions to a colleague, and ask for the same list. If you two disagree on even one object, your data annotation guidelines have a gap. A team of fifty annotators will find that gap fifty times.

This guide shows what to put in the document, gives you a template to copy, and walks through a pilot test with the math worked out: IoU for boxes and Cohen’s kappa for classes. The rules and thresholds come from published guides by CVAT, CloudFactory, Scale and others. Most of those are written by companies that sell labeling tools or services, so we mark where a number is a starting point and not a law.

What Good Data Annotation Guidelines Contain

A guideline is the single place where every labeling decision is written down. CVAT’s guide to production-ready annotation guidelines lists five parts, and the other sources we read agree with them in different words:

  1. Purpose. What the model will do and why the data exists.
  2. Classes. A definition for each label, with examples of what counts and what does not.
  3. Rules. How to draw or tag: shape, tightness, minimum size, overlapping objects.
  4. Edge cases. Hidden, cut-off, blurry and look-alike objects, decided in advance.
  5. Quality bar. What “finished” means, and how work is accepted or sent back.

Writer Eugene Yan frames the same idea as questions the document must answer. In his note on writing labeling guidelines, he asks why the task matters, what the task is, what the terms mean, how to decide, and how to perform the task. That is a handy checklist for a first draft.

One more point from CloudFactory: write for people who know annotation tools but not your project, and who are not ML engineers. Skip internal jargon. Explain each requirement in plain words.

Start With Your Data, Not a Blank Page

Building data annotation guidelines by reviewing sample images and annotation data
Start with real dataset examples to identify difficult cases before writing annotation rules.

The most common way to write a weak guideline is to write it from memory. Scale’s instruction-writing tips say to review a representative sample of your data first, put yourself in the labeler’s seat, and note every spot where you would want guidance. We would add a simple routine on top of that.

  1. Pull 100 random images, plus 30 you already know are awkward: crowded, dark, blurry, cut off.
  2. Label them yourself, and mark every object where you hesitated for more than a few seconds.
  3. Group the hesitations into types: hidden objects, tiny objects, look-alike classes, reflections, and so on.
  4. Write one rule per type, and save one example image for each.

Then run the coverage check Scale suggests: take a fresh sample and see whether your rules answer at least 90 percent of what you meet. That 90 percent figure is Scale’s. Our own reading of it is stricter on one point. If more than about one image in ten still hits a case with no rule, do not hand the document to a team yet.

Practical tip: keep a running “I hesitated” log while you label. It takes no extra time, and it is the raw material for your edge-case section.

A Copy-Paste Guideline Template

Here is a skeleton we built from the structures in the sources above. Square brackets are blanks for you to fill. It is written for image work, but the same sections suit text and audio.

ANNOTATION GUIDELINE  |  Project: [name]  |  Version: [1.0]  |  Date: [date]

1. WHY WE ARE LABELING
   [Two or three sentences: what the model will do, and what goes
   wrong in real life if the labels are bad.]

2. TASK IN FIVE LINES
   - Data: [images / video / text / audio]
   - Label type: [boxes / polygons / keypoints / tags]
   - Classes: [number] (list in section 6)
   - Goal per item: [for example, label every visible [class]]
   - Output format: [COCO / YOLO / other]

3. WORDS WE USE
   [Define every term a newcomer could read two ways.
   Example: "Foreground" means [rule].]

4. WORKFLOW
   Step 1: Open the item.  Step 2: Check if it is usable (section 5).
   Step 3: Label.  Step 4: Check your own work.  Step 5: Submit.

5. GLOBAL RULES (apply to every class)
   Usable item: skip if [too dark / blurry / wrong rotation].
   Minimum size: do not label objects smaller than [N] pixels
                 on the short side.
   Tightness: box edges within [N] pixels of the visible object.
   Hidden objects: label if at least [X]% is visible; mark the
                 "occluded" flag when under [Y]% is visible.
   Cut-off at the frame edge: [label the visible part / skip].
   Overlapping objects: [one label per object, even if they touch].
   Do not label: [reflections, posters, toys, screens].

6. CLASSES (one block per class)
   Name: [class]
   Meaning: [one or two sentences]
   Good examples: [image 1, image 2]  (add a line saying why)
   Bad examples:  [image 3, image 4]  (add a line saying why)
   Often confused with: [other class]. Tell them apart by: [rule].

7. EDGE CASES (add one entry each time a question comes up)
   Case: [description]  |  Decision: [rule]  |  Example: [image]

8. WHEN YOU ARE UNSURE
   Use the "unsure" tag. Do not guess. Add a short note.
   Spend no more than [N] seconds deciding.

9. QUALITY BAR
   Accepted when: [IoU of at least 0.__ against review labels /
   no more than __% rejected in a sample of __].
   Rejected work is returned with a one-line reason.

10. CHANGE LOG
   Version | Date | Author | What changed | Batches to relabel

Two details are worth copying exactly. The “unsure” tag comes from Yan’s note: giving annotators a way out beats forcing a bad guess. The change log with a “batches to relabel” column is our addition to CloudFactory’s revision-history idea, because a rule change often means old work needs a second look.

Turn Vague Words Into Measurable Rules

Turning vague data annotation instructions into clear and measurable labeling rules
Replace unclear instructions with measurable rules to improve annotation consistency.

Words like “tight”, “clear” and “mostly visible” mean different things to different people. CVAT says the instruction “draw a box around the object” is a reliable route to inconsistent data, and that you need to say how tight the box should be. The table shows the swap to make.

Vague rule Measurable rule What it settles
Draw a tight box Edges within [3] pixels of the outermost visible pixel Loose vs tight boxes
Skip mostly hidden objects Skip when over [80]% is hidden; set the occluded flag under [50]% visible Hidden objects
Ignore tiny things Skip objects under [10] pixels on the short side Background clutter
Label what is in front Label objects within about [10] metres of the camera Foreground vs background
Use your judgment When unsure, use the “unsure” tag and add a note Silent guessing

The numbers in brackets are placeholders. Some are borrowed from real projects: CVAT’s sample rules use a 3 pixel gap, a 50 percent occlusion flag and an 80 percent skip line, and CloudFactory’s waste project used a rough 50 percent visibility rule and a 10 metre foreground limit. Those fit their data. Yours may need different values, so test them in a pilot.

A pixel gap means different things on small and large objects

Here is a check we ran with our own arithmetic. Say your rule allows a 3 pixel gap on each side of a box. IoU is the area where two boxes overlap divided by the area they cover together.

  • Large object, 200 by 200 pixels. A box 3 pixels loose on every side is 206 by 206. IoU is 40,000 divided by 42,436, about 0.94.
  • Small object, 30 by 30 pixels. The same 3 pixel gap gives a 36 by 36 box. IoU is 900 divided by 1,296, about 0.69.

Same rule, very different result. On the small object, a gap that looks fine already falls below the 0.7 to 0.8 range CVAT mentions as a common benchmark for object detection. So set the allowed gap as a share of object size, or set a minimum size and a tighter gap for small objects.

The Pilot Test, With the Math

Data annotation pilot test showing independent annotators and agreement measurement
Test annotation guidelines with multiple annotators and measure agreement before scaling the project.

Do not give new data annotation guidelines to a whole team on day one. CVAT’s advice is to pilot first. Have three independent annotators label the same set of hard examples, for instance 100 challenging frames for images or video, then compare the results. The pilot is a test of the document, not a way to produce training data. The TRAM project’s annotation best practices wiki says the same: use a pilot to practice, check agreement, and update the guidelines.

Include the hard cases on purpose. If your pilot set is all clean images, high agreement tells you very little. CVAT also says to treat any disagreement as a hint that the guideline is unclear, not as proof that an annotator is weak.

Worked example 1: boxes and IoU

Annotator A boxes a van from x 100 to 300 and y 50 to 250. Annotator B boxes it from x 110 to 310 and y 60 to 260. Both boxes are 200 by 200, so each covers 40,000 square pixels.

  1. Overlap: x from 110 to 300 is 190 wide, y from 60 to 250 is 190 tall. Area is 36,100.
  2. Combined area: 40,000 plus 40,000 minus 36,100 is 43,900.
  3. IoU: 36,100 divided by 43,900 is about 0.82.

Now Annotator C draws a loose box from x 80 to 330 and y 30 to 280, which is 250 by 250 or 62,500 square pixels. It contains the whole van, and Annotator A’s box sits fully inside it. Overlap is 40,000, combined area is 62,500, so IoU is 0.64. C found the van, but the labels still disagree with A. Run this for every pair of annotators and look at the lowest scores first.

Worked example 2: classes and Cohen’s kappa

For tags and classes, plain percent agreement can mislead, because two people agree by chance sometimes. Cohen’s kappa corrects for that. Say two annotators tag 100 images as “damaged” or “ok”:

  • Both say damaged: 30. Both say ok: 50. They split on the other 20 (10 each way).
  • Observed agreement: 80 out of 100, or 0.80.
  • Each annotator says damaged 40 percent of the time. Chance agreement is 0.4 times 0.4 plus 0.6 times 0.6, which is 0.52.
  • Kappa: (0.80 minus 0.52) divided by (1 minus 0.52) is about 0.58.

An 80 percent match sounds good, yet a kappa of 0.58 is well short of the 0.8 that CVAT describes as commonly seen as strong agreement for classification. The numbers are an example, not a result from a real project. The point is to compute kappa and not trust raw percent. Eugene Yan makes a related point: if kappa holds steady or climbs as you refine the guideline, you are on the right track.

Turning scores into action

What you see Likely cause Fix
Low IoU, same objects found No tightness rule, or a rule nobody measures Add a pixel or percent target and a picture of a good box
One class gets different tags Class definition overlaps a neighbour Add an “often confused with” line and a deciding rule
Objects found by one person only No minimum size or occlusion rule Add thresholds and a “do not label” list
Disagreement spread everywhere Too many classes, or the goal is unclear Group classes into a hierarchy; rewrite the purpose section
Agreement is high on easy images only Pilot set was too clean Rerun with the hard cases added

After scoring, meet to settle each disagreement, then write the answer into the guideline. The TRAM wiki calls this adjudication and notes that its results should feed back into the document. It also finds that a second annotator brings a clear gain in quality while a third or fourth adds less, which is useful when deciding how many people should label each item.

If you would rather not run the pilot yourself, a service like Annotationera can handle boxes, polygons and masks. Either way, hand every team the same guideline and the same pilot set so you can compare them fairly. Our guide on how to choose a data annotation company shows how to read pilot errors by type.

Common Mistakes and Fixes

Common mistakes and fixes in data annotation guideline creation
Avoid common guideline mistakes and build a more consistent annotation workflow.

Only showing good examples. Annotators also need to see what not to label, with the reason. The TRAM wiki asks for both positive and negative examples. Scale suggests at least one image for each point and a line on why it is right or wrong. Fix: add a “bad examples” row to every class.

Too many flat classes. CVAT warns that choosing from a very long list slows people down and raises errors. Its example is 50 classes for one object. Fix: group labels, for instance Vehicle then Truck, and decide the group first.

Writing for the person who wrote the model. CVAT calls this the curse of knowledge: the team knows the data so well that it forgets to write down the small rules. Fix: give the draft to someone outside the project and collect every question they ask.

No way to say “I don’t know”. Forced guesses turn into noise you cannot see later. Fix: add an “unsure” tag, as in the template.

Changing rules without a record. If rule 5 changes in week two, week-one labels follow the old rule. Fix: version the document, and note which batches need rework.

Blaming annotators for guideline gaps. If trained people read one instruction in two ways, the instruction is the problem. Fix: look at disagreement patterns before you look at people.

Keep the Guideline Alive

A guideline is never done. The TRAM wiki says plainly that updates will be needed during the pilot and even later. A few habits keep the document useful:

  • Make it easy to search. V7 suggests a table of contents with links and, for long documents, a wiki. CloudFactory adds descriptive headings and putting the key point first in each section.
  • Explain every correction. V7 advises telling annotators why a label is right or wrong, and turning common questions into an FAQ for new people.
  • Re-check agreement now and then. The TRAM wiki suggests sprinkling a few shared items among each person’s work and scoring them independently, even when each person otherwise labels different data.
  • Decide if annotators may talk to each other. V7 notes the rules differ if you use consensus review, where people must work alone. Write down whichever you choose.
  • Keep a gold set. A small set of expert-labeled items gives you a fixed reference for training and for judging new batches. It costs time to build, as V7 admits, but it shortens feedback loops.

Guidelines also shape cost. Fuzzy rules mean rework, and rework is where budgets slip. Our data annotation cost guide covers price drivers, and the guide to bounding box vs polygon annotation helps with the shape rules in section 5 of the template.

Our Take

Short and tested beats long and untested. A guideline with ten measurable rules and a clear edge-case list will outperform a forty-page document nobody can search. We would write a first draft from our own labeled sample, run a three-person pilot on the hardest images, and only then bring in a team. And we would measure, not guess: IoU for shapes, kappa for tags.

One honest limit: this is our reading of public guides, plus arithmetic we checked ourselves. We did not run a labeling project to produce it, and the thresholds are examples from other teams’ work. Treat them as starting points for your own data. If you are choosing between a team in-house and an outside partner, see in-house vs outsourced data annotation.

Questions People Ask

What are data annotation guidelines?

They are the written rules that tell annotators what to label and how. They cover the purpose of the project, class definitions, drawing or tagging rules, edge cases and the quality bar. They are also called labeling guidelines or labeling specifications.

How long should annotation guidelines be?

As long as your task needs and no longer. V7 says length depends on project complexity. A simple one-class box task may fit on two pages. A medical or multi-class project may need a searchable wiki. Judge by whether people can find answers fast.

What agreement score is good enough?

It depends on the task. CVAT mentions a kappa of 0.8 or higher as strong for classification, and an IoU of 0.7 to 0.8 as a common benchmark for detection, and says these are starting points. Set your own target before the pilot, then see whether the team reaches it on hard cases.

Who should write the guidelines?

Someone who knows the model’s goal and has labeled a sample by hand. Then someone outside the project should read it and ask questions. If you use a vendor, ask them to review the draft and list the gaps they find.

How many example images does each class need?

No source gives a fixed number. A workable minimum is a few good examples and a few bad ones per class, each with a one-line reason. Add more for classes that the pilot shows people confusing.

Can I use the same guideline for an outsourced team?

Yes, and you should. An outside team can only follow what is written. Add a project background section and sample images, and send the same pilot set to each vendor you compare.

Final Thoughts

Good data annotation guidelines are specific, tested and versioned. Start from your own sample, fill in the template, turn vague words into numbers, and prove the document works with a pilot before you scale. For more guides in this series, see our data annotation section.

Sources: CVAT: how to write annotation guidelines that work in production, Eugene Yan: how to write data labeling guidelines, CloudFactory: creating data annotation guidelines, Scale: writing instructions best practices, V7: 5 best practices for writing annotation guidelines, TRAM wiki: data annotation best practices guide.

Leave a Reply

Your email address will not be published. Required fields are marked *