Image annotation

On this page 7

Image annotation is the process of attaching machine-readable labels to images, such as class tags, bounding boxes, polygons, pixel masks or keypoints, so that a model can learn the mapping from pixels to meaning. In computer vision, annotated images form the ground truth that supervised models are trained and evaluated against, which makes annotation one of the most decisive and most expensive stages of any vision project in artificial intelligence.

The quality of the labels sets a ceiling on model quality: a detector cannot become more consistent than the people and tools that labeled its training data. For that reason, annotation is treated as an engineering discipline with written guidelines, quality metrics and review loops rather than as simple clerical work.

How image annotation turns pixels into training data

Image annotation works by pairing each image with a structured label record that a training pipeline can read. The record stores the image identifier, the label geometry (coordinates of a box, the vertices of a polygon, a run-length encoded mask) and the class from a fixed taxonomy, often with attributes such as occlusion, truncation or difficulty.

A typical workflow has five stages: defining the label taxonomy and guidelines, sampling images, labeling, quality review and export. Exports follow established formats, most commonly COCO JSON, Pascal VOC XML and the plain-text YOLO format, which stores normalized box centers and sizes. Converting between them is routine, but conversions are a frequent source of silent errors such as off-by-one pixel offsets or swapped width and height.

The following table summarizes the main stages and what each one controls.

StageMain outputWhat it controls
Taxonomy designClass list and attribute schemaWhat the model is able to distinguish
Guideline writingRules with visual edge casesConsistency between annotators
LabelingBoxes, masks, points or tagsRaw coverage of the dataset
ReviewCorrections and agreement scoresLabel noise and systematic bias
ExportCOCO, VOC or YOLO filesCompatibility with training code
Stages of an annotation workflow

Annotation types and the tasks they serve

Each annotation type matches a specific vision task, and the cost rises with geometric precision. An image-level tag can take a second, while a careful instance mask of a complex object can take a minute or more, so the choice of type is primarily a decision about budget and required output.

Annotation typeTypical taskRelative effortMain limitation
Image-level tagImage classificationVery lowNo location information
Bounding boxObject detection, object trackingLowIncludes background pixels
PolygonInstance segmentationMediumVertices miss fine curves
Pixel maskSemantic or panoptic segmentationHighSlow on thin structures
KeypointsPose estimation, keypoint detectionMediumAmbiguous for occluded joints
Cuboid or 3D box3D object detectionVery highNeeds depth or LiDAR context
Text transcriptionOCR, image captioningMedium to highLanguage and style variation
Common annotation types compared

Projects often mix types deliberately: boxes for the full dataset and masks for a smaller subset, or tags for pretraining filters and keypoints only for the classes that need pose. This tiered approach keeps the cost per useful label under control.

Measuring annotation quality

Annotation quality is measured by comparing independent labels of the same images. For geometry, the standard measure is intersection over union (IoU) between two annotators’ boxes or masks; for classes, it is inter-annotator agreement, often expressed with Cohen’s or Fleiss’ kappa. A gold set of expert-labeled images serves as a fixed reference for auditing annotators over time.

Acceptance thresholds depend on the task and object size. The table below lists ranges that practitioners commonly use as starting points, not universal standards.

CheckApplies toCommon starting thresholdNote
Box IoU agreementDetection labels0.7 to 0.9Lower for small objects
Mask IoU agreementSegmentation labels0.8 to 0.95Boundaries dominate errors
Class agreementTags and box classesKappa above 0.8Reveals unclear guidelines
Keypoint distancePose labelsA few pixels, scaled by object sizeOften reported as OKS
Gold set accuracyEvery annotatorAgreed per projectTracks drift over weeks
Typical quality checks and starting thresholds

Low agreement is usually a guideline problem rather than a people problem. When two careful annotators disagree, the rule they followed was ambiguous, and the fix is a clearer rule with example images, not more review passes.

Manual, model-assisted and automatic annotation

Annotation can be fully manual, model-assisted or largely automatic, and mature teams combine all three. In model-assisted labeling, a pretrained detector or a promptable segmentation model proposes boxes and masks, and humans correct instead of draw, which can cut labeling time substantially on familiar object classes.

Active learning goes one step further: the current model selects the images it is least certain about, and only those are sent to annotators. This concentrates human effort where it improves the model most. Weak supervision and synthetic data with automatically generated labels reduce manual work further, but they introduce their own biases that must be measured on a human-labeled test set.

SituationRecommended approachReason
New domain, no existing modelManual labeling of a seed setPre-labels would be unreliable
Common objects, large volumeModel-assisted correctionProposals are mostly correct
Large unlabeled pool, tight budgetActive learning loopLabels go to informative images
Rare or dangerous scenariosSynthetic images plus real test setReal examples are scarce
Safety-critical evaluation dataDouble labeling with adjudicationTest labels must be trustworthy
Choosing an annotation strategy

Common pitfalls in image annotation

Most annotation failures are systematic rather than random, which is why they damage models more than occasional mistakes do. The most frequent problems are listed below.

  • Inconsistent box tightness: some annotators include shadows or reflections, others do not, which blurs what the detector learns.
  • Undefined edge cases: partially visible, reflected or printed objects need explicit rules, otherwise each annotator invents one.
  • Class imbalance hidden by volume: thousands of labels can still contain only a handful of examples of the rare class that matters most.
  • Leakage between splits: near-duplicate frames from the same video placed in both training and test sets inflate reported accuracy.
  • Taxonomy changes mid-project: renaming or merging classes without relabeling old data leaves contradictory ground truth.
  • Privacy exposure: faces, license plates and documents in images may require blurring, consent or restricted access before labeling.

A practical safeguard is to version datasets like code: every export receives an identifier, guideline changes are logged, and models are always traced back to the exact label version they were trained on.

Explained without jargon

A vision model learns the way a child learns from a picture book in which someone has pointed at things and named them. Image annotation is that pointing and naming. People draw a box around each car, outline each tumor or mark each elbow and knee, and the model studies thousands of these marked pictures until it can do the marking itself.

The key idea is simple: the model can only be as good as its labels. Sloppy or inconsistent marking teaches the model sloppy and inconsistent habits, so careful rules and double-checking matter more than sheer quantity.

A typical use case

A warehouse operator wants cameras to detect damaged parcels on a conveyor. The team collects about 20,000 frames, writes a guideline with photo examples of dents, tears and crushed corners, and labels a seed set of 2,000 images with bounding boxes and a damage-type attribute. Two annotators label every tenth image independently, and disagreements are resolved by a senior reviewer.

The first detector trained on the seed set then pre-labels the remaining frames, and annotators only correct its proposals. An active learning step sends the 3,000 most uncertain frames for full manual review. The result is a consistent dataset delivered in weeks instead of months, and a held-out test set labeled twice gives the team a trustworthy measure of how well the deployed model actually finds damaged parcels.