Implementing Image and Video Analysis with Amazon Rekognition - From Label Detection to Custom Models

Learn how to implement label detection, facial analysis, and text detection using pre-trained APIs, and build domain-specific image recognition models with Custom Labels.

Key Features of Rekognition

Rekognition is an image and video analysis service that provides pre-trained deep learning models as APIs. Key features include label detection (object and scene classification), face detection and analysis (age range, emotions, face orientation), text detection (character recognition in images), content moderation (detecting inappropriate content), and face comparison (similarity scoring between two faces). All features are accessible via API calls, with no need for ML model training or infrastructure management. Pricing is pay-per-use based on the volume of images and videos processed, with up to 5,000 images per month included in the free tier.

Implementing Label Detection and Text Detection

The DetectLabels API accepts images from an S3 bucket or as Base64-encoded bytes and returns detected labels (e.g., Car, Tree, Person) with confidence scores (0-100%). The MinConfidence parameter lets you set a confidence threshold to control false positives. Bounding box coordinates are also returned, allowing you to pinpoint where objects appear in the image. The DetectText API detects printed and handwritten text in images and extracts it as strings. It can detect up to 100 text elements per image, returning position information and confidence scores for each. It supports a wide range of OCR use cases, including product label reading on manufacturing lines, license plate recognition in parking lots, and document digitization.

Building Custom Models with Custom Labels

Custom Labels is a feature for classification and detection tasks that Rekognition's pre-trained models can't handle. Examples include defect detection on manufacturing lines, retail shelf analysis, and crop disease detection in agriculture, where domain-specific image recognition is required. You can start building a model with as few as a few dozen training images. Upload images to S3, label them using the Rekognition console or SageMaker Ground Truth, and start training. After training completes, launch an inference endpoint and run predictions via API using your custom model. The inference endpoint is billed hourly, so stop it during idle periods to control costs.

Rekognition Pricing

Rekognition pricing is pay-per-use based on the number of images processed. Label detection is about 1.00 USD per 1,000 images for the initial 1 million images per month, face detection is about 1.00 USD per 1,000 images, and text detection is about 1.00 USD per 1,000 images (as of August 2026). Analysis of up to 5,000 images per month is included in the free tier. For Custom Labels, the main cost is the hourly charge for the inference endpoint (about 4.00 USD per hour), so stop it during hours when it is not in use to keep costs down. Training is about 1.00 USD per hour.

Face Analysis and Face Comparison

Rekognition provides rich analysis of faces in images. In addition to detecting faces, it can estimate attributes such as age range, facial expression, and gaze direction. Face comparison, which determines whether the faces in two images belong to the same person, can be applied to identity verification and matching. If you create a face collection in advance, you can search whether a new image contains a registered person. However, handling face data requires a high degree of ethical and legal care, and obtaining the consent of the people involved and checking the applicable regulations are prerequisites. The richness of the technical features must always be considered together with the responsibility for privacy.

Content Moderation and Safety Detection

Image analysis also helps ensure safety. With the moderation feature that detects inappropriate images, you can automatically find violent or explicit content among posted images and use this for checks before publication. Detection results include categories and confidence, so you can set thresholds and route items between automatic processing and human review. There is also a feature that detects whether protective equipment such as helmets and gloves is being worn in images of work sites, and it can be applied to safety management. Because checking large numbers of images by hand alone is not realistic, this kind of automatic detection supports operational efficiency and safety.

Custom Models with Custom Labels

When you want to recognize business-specific targets that pre-trained APIs cannot detect, you can build your own model with Custom Labels. You can have it recognize targets that general-purpose models do not know, such as your own products and parts or specific logos and scenes, from a small amount of training data. It is important to prepare high-quality training data and keep improving while checking accuracy through evaluation. The reasonable decision is to use the general-purpose APIs if they are sufficient and to choose Custom Labels when you definitely need your own recognition. The advantage is that you can achieve image recognition in specialized fields without deep knowledge of machine learning.

Pipeline Design and Privacy

Image analysis is effective when built into an event-driven pipeline. You can automate the flow of running analysis with Lambda when an image is uploaded to S3, and then saving the results and sending notifications. Even when you handle large numbers of images, a serverless configuration scales. On the other hand, images showing faces or individuals are sensitive data, so they must be handled with the utmost care. State the purpose of collection, obtain consent, set a retention period, and delete the images when they are no longer needed. Control access to analysis results and images to prevent use for other purposes. A design that balances the use of the technology with protecting the rights of the people in the images is required.

Summary

Rekognition lets you implement image and video analysis without ML expertise. Pre-trained APIs cover common use cases, while Custom Labels handles domain-specific requirements. By combining S3 and Lambda in an event-driven architecture, you can build automated analysis pipelines triggered by image uploads.

References (Official AWS Resources)

The primary sources for this page are the official AWS website and documentation. Check the official pages below for the latest specifications and pricing.

If this page and the official documentation disagree, treat the official documentation as authoritative.

Share