What is Data Labelling?
Data labelling means recording the correct answer the model should learn: a tree's outline in an image, a spectrum's lab value, the time of a failure. In supervised learning, model quality is largely capped by label quality.
Label Types in Images
- Class label: one label for the whole image ("defective", "OK").
- Bounding box: for object detection.
- Polygon / mask: for segmentation; the most expensive.
- Line: for thin structures such as roads, boundaries and cables.
Labelling Sensor Data
In predictive maintenance a label is usually a time range: "bearing damaged from this date on", "that stop was a failure". The source is often maintenance logs and work orders. The moment a failure is recorded is not the same as the moment damage actually began; this uncertainty must be settled explicitly in the label definition.
Example: Annotator Agreement (Cohen's Kappa)
Two quality inspectors label the same 100 parts as "defective/OK":
| B: defective | B: OK | |
|---|---|---|
| A: defective | 20 | 6 |
| A: OK | 4 | 70 |
- Observed agreement: p₀ = (20 + 70) / 100 = 0.90
- Agreement expected by chance: pₑ = 0.26 × 0.24 + 0.74 × 0.76 = 0.6248
- κ = (p₀ − pₑ) / (1 − pₑ) = 0.2752 / 0.3752 ≈ 0.73
90% agreement looks high, but once chance is removed κ ≈ 0.73 remains. The 10 disputed parts point to borderline cases where the label definition needs tightening. Agreement between humans is also a practical indicator of what to expect from a model.
Tools and Speed-ups
- Label Studio, Roboflow, CVAT: common labelling tools.
- Pre-labelling: a model such as SAM proposes candidate masks; a human only says yes/no or corrects them.
- Active learning: the examples the model is least sure about are labelled first.
Existing Label Sources
Many industries already have labels: CAD drawings, cadastral records, lab results. But they are often incomplete: the drafter may not have drawn every building. Teaching "not drawn = not there" damages the model; excluding those areas from the loss (masking) works better.
Common Mistakes
- No written labelling guide: if "how long must a scratch be to count as a defect?" is not written down, every annotator decides differently.
- Careless labelling of the test set: if test labels are wrong, the metrics are wrong too; the test set should be the most carefully labelled part.
- Noticing class imbalance too late: collect examples of rare defect types deliberately.
Related: Industrial AI, Overfitting, Walnut crown detection example, Industrial AI solutions
Related Terms
- Model Evaluation Metrics: Precision, Recall, F1, IoU, mAPWhat are precision, recall, F1, IoU and mAP? A step-by-step confusion matrix example for visual inspection, and how to build an honest test set.
- What are Overfitting and Generalisation?What is overfitting and how to spot it? A training vs validation loss example, data leakage, class imbalance and test splits for predictive maintenance.
- What is Instance Segmentation?What instance segmentation is: how it differs from detection and semantic segmentation, Mask R-CNN vs YOLO-seg, mask IoU and when to use it.
- What are Transfer Learning and Foundation Models?What is transfer learning? Adapting a pre-trained model to your own problem with little data: backbone, head, fine-tuning options and foundation models.
- What is Computer Vision?What computer vision is: classification, detection, segmentation, a camera resolution calculation, IoU and mAP, industrial uses and common mistakes.