Lesson 4 of 5 Data Quality, Cleaning and Labeling

Labeling Data with SageMaker Ground Truth

This lesson explains how SageMaker Ground Truth manages labelling jobs, workforces and quality control, and reduces cost by labelling confident items automatically.

Learning outcomes

After completing this lesson, you will be able to:

  • Configure labelling jobs and task types.
  • Choose between private, vendor and public workforces.
  • Reduce labelling cost with automated data labelling.

Labeling jobs and task types

A Ground Truth labelling job takes an input manifest of S3 objects, a task type and worker instructions, and produces an output manifest with labels. Built-in task types cover image classification, bounding boxes, semantic segmentation, keypoints, text classification, named entity recognition, video object tracking and 3D point clouds. Custom templates handle other tasks, such as rating FM responses.

Each object can be sent to several workers, and annotation consolidation combines their answers (for example, majority vote or weighted bounding box averaging) to improve accuracy.

Match the pairs

Pick the task type

Exam skills 1.3.2

Match each labelling need with the Ground Truth task type.

Log in to try this activity Interactive activities are free with an account.

Workforces

SageMaker Ground Truth sends labelling tasks to people, and it supports three types of workforce, chosen mainly by the sensitivity of the data. A private workforce uses the organisation's own employees or contractors; it is required for confidential or regulated data, such as medical images or customer documents, and suits tasks that need domain expertise.

A vendor workforce uses third-party labelling companies available through AWS Marketplace, which provide trained labellers under agreements suited to business data. A public workforce uses Amazon Mechanical Turk, which offers large numbers of workers quickly and cheaply, but only for non-sensitive data.

Sort into groups

Choose the workforce

Exam skills 1.3.2

Choose the Ground Truth workforce for each labelling job.

Log in to try this activity Interactive activities are free with an account.

Reducing labelling cost

Automated data labelling uses active learning: Ground Truth sends a sample to humans, trains a model on their labels, labels the items the model is confident about automatically and sends only uncertain items to humans. This can reduce cost substantially on large datasets of supported task types. SageMaker Ground Truth Plus is a fully managed service in which AWS provides an expert workforce and runs the project. Amazon Augmented AI (A2I) adds human review to production predictions, for example Textract extractions below a confidence threshold. The following table summarises the options.

NeedOption
Confidential dataGround Truth with a private workforce
Large dataset, lower costAutomated data labelling (active learning)
No workforce or project managementGround Truth Plus
Human review of low-confidence predictions in productionAmazon A2I
Non-sensitive data at scalePublic workforce (Mechanical Turk)

The following diagram shows the active learning loop of automated data labelling.

Automated data labelling in Ground Truth. Humans label an initial sample, Ground Truth trains a model on those labels, the model labels the items it is confident about, and only uncertain items go back to humans, whose labels improve the next round of the model.
The image count is illustrative.
True or false

Cheaper labels

Exam skills 1.3.2

Check how Ground Truth reduces the cost of labelling.

Log in to try this activity Interactive activities are free with an account.
Worked example

Labelling defect images

A manufacturer has 500,000 product photos and needs bounding boxes around defects. The images reveal unreleased product designs, and the budget is limited.

  • Use a private workforce of the company's quality inspectors, because the designs are confidential.
  • Enable automated data labelling so a model labels confident images after an initial human-labelled sample.
  • Send each human-labelled image to two inspectors and consolidate boxes to improve accuracy.

A public workforce would be cheaper per label but would expose confidential designs, which rules it out.

Check yourself

Which workforce must label confidential data?

Show answer

A private workforce of the company's own staff.

Exam Tips

Remember for the exam

  • Confidential data: private workforce only.
  • Lower cost on large datasets: automated data labelling.
  • Fully managed labelling with expert workers: Ground Truth Plus.
  • Human review of uncertain production predictions: Amazon A2I.
  • Annotation consolidation combines several workers' labels.