

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 了解 Rekognition 的分析类型
<a name="how-it-works-types"></a>

以下是 Amazon Rekognition Image API 和 Amazon Rekognition Video API 可以执行的分析类型。有关 API 的信息，请参阅[了解 Rekognition 的图像和视频操作](how-it-works-operations-intro.md)。

下表列出了与正在使用的媒体类型和使用情况相关的需要使用的操作：


****  

| 使用场景 | 媒体类型 | 操作 | 
| --- | --- | --- | 
|  [审核内容](moderation.md)  | 图片 |  [DetectModerationLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectModerationLabels.html), [StartMediaAnalysisJob](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html), [GetMediaAnalysisJob](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetMediaAnalysisJob.html), [ListMediaAnalysisJobs](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListMediaAnalysisJobs.html)  | 
|  | 存储视频 | [StartContentModeration](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartContentModeration.html), [GetContentModeration](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetContentModeration.html)  | 
| 身份验证 | [映像](collections.md) | [CreateCollection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateCollection.html), [CreateUser](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateUser.html), [IndexFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html), [AssociateFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_AssociateFaces.html), [SearchFacesByImage](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFacesByImage.html), [SearchUsersByImage](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html) | 
|  | [存储视频](procedure-person-search-videos.md) | [CreateCollection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateCollection.html), [IndexFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html), [StartFaceSearch](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartFaceSearch.html), [GetFaceSearch](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetFaceSearch.html) | 
|  | 流视频（[检测人脸活跃度](face-liveness.md)） |  [CreateFaceLivenessSession](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateFaceLivenessSession.html), [StartFaceLivenessSession](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartFaceLivenessSession.html), [GetFaceLivenessSessionResults](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetFaceLivenessSessionResults.html),  | 
| [人脸分析](faces.md) | 图片 | [DetectFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectFaces.html), [CompareFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CompareFaces.html) | 
|  | 存储视频 | [StartFaceDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartFaceDetection.html), [GetFaceDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetFaceDetection.html) | 
|  | 流视频 | [CreateStreamProcessor](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateStreamProcessor.html), [StartStreamProcessor](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartStreamProcessor.html) | 
| [物体和活动识别](labels.md) | 图片 | [DetectLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectLabels.html) | 
|  | 存储视频 | [StartLabelDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartLabelDetection.html), [GetLabelDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetLabelDetection.html) | 
| [互联家居](https://github.com/aws-samples/rekognition-streaming-video-events) | 流视频 | [StartStreamProcessor](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartStreamProcessor.html) | 
| [媒体分析](segments.md) | 存储视频 | [StartSegmentDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartSegmentDetection.html), [GetSegmentDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetSegmentDetection.html) | 
| [工作场所安全](ppe-detection.md) | 图片 | [DetectProtectiveEquipment](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectProtectiveEquipment.html) | 
| [文本检测](text-detection.md) | 图片 | [DetectText](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectText.html) | 
|  | 视频 | [StartTextDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartTextDetection.html), [GetTextDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetTextDetection.html) | 
| [人物的轨迹](persons.md) | 视频 | [StartPersonTracking](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartPersonTracking.html), [GetPersonTracking](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetPersonTracking.html) | 
| [名人识别](celebrities.md) | 图片 | [RecognizeCelebrities](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_RecognizeCelebrities.html) | 
|  | 视频 | [StartCelebrityRecognition](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartCelebrityRecognition.html), [GetCelebrityRecognition](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetCelebrityRecognition.html) | 
| [自定义标签检测](https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/what-is.html) | 图片 | [DetectCustomLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectCustomLabels.html) | 
|  | 模型训练 | [参见自定义标签开发人员指南](https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/what-is.html) | 

## 标签
<a name="how-it-works-labels-intro"></a>

*标签* 是指以下任一项目：物体（例如，花、树或桌子）、事件（例如，婚礼、毕业典礼或生日聚会）、概念（例如，风景、傍晚和自然）或活动（例如，跑步或打篮球）。Amazon Rekognition 可以检测图像和视频中的标签。有关更多信息，请参阅 [检测对象和概念](labels.md)。

Rekognition 可以检测图像和存储视频中的大量标签。Rekognition 还可以检测流视频中的少量标签。

根据使用案例使用以下操作检测标签：
+ 要检测图像中的标签：使用[DetectLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectLabels.html)。您可以识别图像属性，例如主图像颜色和图像质量。要实现此目的，请[DetectLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectLabels.html)使用 wit `IMAGE_PROPERTIES` h 作为输入参数。
+ 要检测存储视频中的标签：使用[StartLabelDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartLabelDetection.html)。存储视频不支持检测主图像颜色和图像质量。
+ 要检测流媒体视频中的标签：使用[CreateStreamProcessor](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateStreamProcessor.html)。流视频不支持检测主图像颜色和图像质量。

您可以使用纳入和排除筛选选项来指定要为图像和存储视频标签检测返回的标签类型。

## 自定义标签
<a name="how-it-works-custom-labels-intro"></a>

Amazon Rekognition Custom Labels 可以通过训练机器学习模型，识别图像中特定于您的业务需求的物体和场景。例如，您可以训练模型来检测徽标或装配线上的工程机器零件。

**注意**  
有关 Amazon Rekognition Custom Labels 的信息，请参阅 [Amazon Rekognition Custom Labels 开发人员指南](https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/what-is.html)。

Amazon Rekognition 提供了用于创建、训练、评估和运行机器学习模型的控制台。有关更多信息，请参阅**《Amazon Rekognition Custom Labels 开发人员指南》中的 [Amazon Rekognition Custom Labels 入门](https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/gs-introduction.html)。您还可以使用 Amazon Rekognition Custom Labels API 来训练和运行模型。*有关更多信息，请参阅亚马逊 Rekognit [ion 开发者指南中的亚马逊 Rekognition 自定义标签 SDK 入门](https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/gs-cli.html)。 CustomLabels *

要使用经过训练的模型分析图像，请使用[DetectCustomLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectCustomLabels.html)。

## 面部活跃度检测
<a name="face-liveness-detection"></a>

Amazon Rekognition Face Liveness 可以帮助您验证正在进行人脸身份验证的用户是否真实出现在摄像头前，并且不是仿冒用户人脸的不法分子。它可以检测出现在摄像头前的仿冒攻击和绕过摄像头的攻击。用户可以通过拍摄简短的自拍视频来完成 Face Liveness 检查，该检查会返回 Liveness 分数。Face Liveness 通过概率计算确定，检查后会返回置信度分数（介于 0-100 之间）。分数越高，对于接受检查的人是真实的就越有信心。

有关 Face Liveness 的更多信息，请参阅[检测人脸活跃度](face-liveness.md)。

## 人脸检测和分析
<a name="how-it-works-faces-intro"></a>

Amazon Rekognition 可以检测图像和存储视频中的人脸。借助 Amazon Rekognition，您可以获得有关以下内容的信息：
+ 在图像或视频中检测到人脸的位置
+ 人脸标记，例如眼睛的位置
+ 图像中存在人脸遮挡
+ 检测到的情绪，例如快乐或悲伤
+ 图像中人物的视线方向

您还可以解读人口统计信息，例如性别或年龄。您可以将一个图像中的人脸与另一个图像中检测到的人脸进行比较。还可以存储有关人脸的信息以供以后检索。有关更多信息，请参阅 [检测和分析人脸](faces.md)。

要检测图像中的人脸，请使用 [DetectFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectFaces.html)。要检测存储视频中的人脸，请使用 [StartFaceDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartFaceDetection.html)。

## 人脸搜索
<a name="how-it-works-search-faces-intro"></a>

Amazon Rekognition 可以搜索人脸。人脸信息将索引到称为集合的容器中。集合中的人脸信息随后可与在图像、存储视频和流视频中检测到的人脸进行匹配。有关更多信息，请参阅 [在集合中搜索人脸](collections.md)。

要搜索图像中的已知人脸，请使用 [DetectFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectFaces.html)。要搜索存储视频中的已知人脸，请使用 [StartFaceDetection](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartFaceDetection.html)。要搜索流视频中的已知人脸，请使用 [CreateStreamProcessor](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateStreamProcessor.html)。

## 人物的轨迹
<a name="how-it-works-persons-intro"></a>

Amazon Rekognition 可以跟踪在存储视频中检测到的人物的轨迹。Amazon Rekognition Video 提供了在视频中检测到的人物的跟踪轨迹、人脸详细信息以及帧内位置信息。有关更多信息，请参阅 [人物的轨迹](persons.md)。

要检测所存储视频中的人员，请使用 [StartPersonTracking](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartPersonTracking.html)。

## 个人防护设备
<a name="how-it-works-ppe-intro"></a>

 Amazon Rekognition 可以检测图像中检测到的人员佩戴的个人防护设备 (PPE)。Amazon Rekognition 可以检测口罩、手套和头罩。Amazon Rekognition 可以预测个人防护设备能否覆盖相应的身体部位。您还可以获得用于检测到的人员和个人防护装备物品的边界框。有关更多信息，请参阅 [检测个人防护设备](ppe-detection.md)。

要检测图像中的 PPE，请使用[DetectProtectiveEquipment](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectProtectiveEquipment.html)。

## 名人
<a name="how-it-works-celebrities-intro"></a>

 Amazon Rekognition 可以识别图像和存储视频中的数千位名人。您可以获取有关名人的人脸在图像上的位置、人脸标记以及名人人脸的姿势的信息。您可以获取名人出现在存储视频中时的跟踪信息。您还可以获得有关知名名人的更多信息，例如所表达的情感和性别的表现。有关更多信息，请参阅 [识别名人](celebrities.md)。

要识别图像中的名人，请使用 [RecognizeCelebrities](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_RecognizeCelebrities.html)。要识别存储视频中的名人，请使用 [StartCelebrityRecognition](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartCelebrityRecognition.html)。

## 文本检测
<a name="how-it-works-text-intro"></a>

Amazon Rekognition 图像文本识别可以检测图像中的文本并将其转换为机器可读的文本。有关更多信息，请参阅 [检测文本](text-detection.md)。

要检测图像中的文本，请使用 [DetectText](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectText.html)。

## 不当或冒犯性内容
<a name="how-it-works-moderation-intro"></a>

Amazon Rekognition 可以分析图像和存储视频中是否有成人和暴力内容。有关更多信息，请参阅 [审核内容](moderation.md)。

要检测不安全的图像，请使用 [DetectModerationLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectModerationLabels.html)。要检测不安全的存储视频，请使用 [StartContentModeration](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartContentModeration.html)。

## 自定义
<a name="how-it-works-customization"></a>

Rekognition 提供的某些图像分析 API 允许您创建根据自己的数据训练的自定义适配器，提高深度学习模型的准确性。适配器是可插入 Rekognition 预先训练好的深度学习模型的组件，可利用基于图像的领域知识提高模型的准确性。您可以通过提供样本图像并对其进行注释来训练适配器以满足您的需求。

创建适配器后，系统会为您提供一个 AdapterId。您可以将其提供 AdapterId 给操作，以指定要使用已创建的适配器。例如，您向 [DetectModerationLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectModerationLabels.html)API 提供用于同步图像分析的。 AdapterId 在请求中提供后 AdapterId ，Rekognition 会自动使用它来增强对图像的预测。这使您可以利用 Rekognition 的功能，同时对其进行自定义以满足您的需求。

您还可以选择使用 [StartMediaAnalysisJob](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html)API 批量获取图像的预测结果。有关更多信息，请参阅[批量分析](https://docs.aws.amazon.com/rekognition/latest/dg/bulk-analysis.html)。

您可以通过将图像上传到 Rekognition 控制台并对这些图像进行分析来评测 Rekognition 操作的准确性。Rekognition 将使用所选功能为您的图像添加注释，然后您可以查看预测，使用经过验证的预测来确定哪些标签会从创建适配器中受益。

目前，您可以将适配器与 [DetectModerationLabels](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectModerationLabels.html). 有关创建和使用适配器的更多信息，请参阅[使用自定义审核提高准确性](moderation-custom-moderation.md)。

## 批量分析
<a name="how-it-works-bulk"></a>

Rekognition Bulk Analysis 允许您通过在操作中使用清单文件来异步处理大量图像。[StartMediaAnalysisJob](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html)有关更多信息，请参阅[批量分析](https://docs.aws.amazon.com/rekognition/latest/dg/bulk-analysis.html)。