

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

# 搜索集合内的人脸和用户
<a name="collections-search-faces"></a>

创建人脸集合并存储人脸矢量 and/or 用户向量后，可以在人脸集合中搜索面部匹配项。使用 Amazon Rekognition，您可以搜索集合中与以下条件匹配的人脸：
+ 所提供的人脸 ID ([SearchFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFaces.html))。有关更多信息，请参阅 [使用人脸 ID 搜索人脸](search-face-with-id-procedure.md)。
+ 所提供图像中的最大人脸 ([SearchFacesByImage](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFacesByImage.html))。有关更多信息，请参阅 [使用图像搜索人脸](search-face-with-image-procedure.md)。
+ 存储视频中的人脸。有关更多信息，请参阅 [搜索存储视频中的人脸](procedure-person-search-videos.md)。
+ 流视频中的人脸。有关更多信息，请参阅 [使用流视频事件](streaming-video.md)。

您可以使用 `CompareFaces` 操作将源图像中的人脸与目标图像中的人脸进行比较。此比较的范围限制为在目标图像中检测到的人脸。有关更多信息，请参阅[比较图像中的人脸](https://docs.aws.amazon.com/rekognition/latest/dg/faces-comparefaces.html)。

以下列表中显示的各种搜索操作将人脸（由 `FaceId` 或输入图像识别）与存储在给定人脸集合中的所有人脸进行比较：
+ [SearchFaces](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFaces.html)
+ [SearchFacesByImage](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFacesByImage.html)
+ [SearchUsers](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsers.html)
+ [SearchUsersByImage](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html)