AWS provides a range of machine learning services that can be used for image recognition and classification projects. Two of the most popular services are Amazon Rekognition and Amazon SageMaker. In this post, we’ll compare these two services based on their features and capabilities.
Amazon Rekognition
Amazon Rekognition is a fully managed image and video analysis service that can analyse images and videos for objects, people, text, scenes, and activities. Rekognition provides a set of pre-built models for common use cases such as face recognition, object detection and tracking, and celebrity recognition.
Amazon Rekognition Custom Labels
Custom Labels is a powerful extension to Rekognition that enables users to identify specific objects in both images and videos based on their unique needs. Custom Labels builds on Rekognition’s existing training data, which includes tens of millions of images.
As a result, users only need to provide a small set of images to train their model, without having to start from scratch. The training process is incredibly user-friendly and straightforward, requiring only a single click of a button.
Features
- Fully managed service
- Pre-built models for common use cases
- Integration with other AWS services like S3 and Lambda
- Ready to use (Amazon Rekognition)
- Easy labelling of your dataset (Amazon Rekognition Custom Labels)
- Minimal training using your own training data (Amazon Rekognition Custom Labels)
- Easy SDK or CLI invocation
- Hosting for inference all managed by Amazon
Benefits
- Easy to use and integrate with other AWS services
- Doesn’t require ML expertise
- Quick setup and deployment
- Pre-built deep learning models will be used but will not require any ML knowledge
- Supports multiple use cases
Limitations
- Although no specific ML knowledge is required, you are required to supply your own dataset to use Amazon Rekognition Custom Labels, which you can either label with easy-to-use interface, or use Amazon Ground Truth
- Limited data preparation tools
- Inference compute is limited to a minimal predefined list
- Inability to export or import models meaning that models built with Rekognition cannot be used elsewhere
Amazon SageMaker
Amazon SageMaker is a fully managed machine learning platform that can be used to build, train, and deploy machine learning models. SageMaker provides a range of built-in algorithms for image classification, object detection, and semantic segmentation, among other tasks. SageMaker also allows you to bring your own algorithms and models to train and deploy on the platform.
Features
- Fully managed machine learning platform
- Built-in algorithms for image classification and object detection
- Custom algorithms and models can be used
- Built-in data processing features
Benefits
- Supports a wide range of machine learning algorithms and models
- Built-in tools for data preparation and processing
- Supports automatic scaling and model tuning
- Provides a complete end-to-end machine learning workflow
- Suitable for production MLOps models
- Supports importing and exporting of models
- Provides control of compute selection for training models
Limitations
- Requires some degree of ML knowledge
- Can be more complex to use than Rekognition
- More expensive than Rekognition
Comparison Table
Here is a table comparing the core features of Amazon Rekognition and Amazon SageMaker:
Feature | Amazon Rekognition | Amazon SageMaker |
Managed service | Yes | Yes, but you have more lower level control |
Built-in models | Yes (pre-built) | Yes (pre-built), but have the option to bring your own model |
Custom models | No (Amazon Rekognition) Yes (Amazon Rekognition Custom Labels) | Yes |
Data labelling | No (Amazon Rekognition) Yes – Built in UI or Ground Truth (Amazon Rekognition Custom Labels) | Yes (using Ground Truth) |
Integration with AWS services | S3, Lambda | S3, EC2, ECR, ECS, Lambda, Step Functions |
Algorithm support | Image and video analysis | Wide range of machine learning algorithms |
Data preparation tools | No | Yes (built-in data processing features) |
Automatic scaling | Yes (Amazon Rekognition) No – manually specify Inference Units (Amazon Rekognition Custom Labels) | Yes (automatic instance scaling) |
Model tuning | No | Yes |
Inference batching | No | Yes |
Hosting options | None, only in Rekognition | The model generated by SageMaker can be used by third party tools |
Hyperparameter optimisation | No | Yes |
ML expertise required | Not necessary | Yes, especially when fine tuning the hyperparameters of the training job |
Training | No training necessary (Amazon Rekognition) Yes (Amazon Rekognition Custom Labels) | Depends on the data size, hyperparameters and model selected |
Inference cost and compute capacity | Cost of API calls (Amazon Rekognition) | Depends on the type of instance selected and deployment options (real-time inference, serverless inference, asynchronous inference and batch transform) |
Conclusion
When it comes to choosing between Amazon Rekognition (including Custom Labels) and Amazon SageMaker for your image recognition and classification projects, it’s important to consider your specific needs and requirements. Amazon Rekognition is a good choice for projects that require basic image and video analysis, while Amazon SageMaker is better suited for more complex machine learning projects that require custom models and advanced data processing features.