如何获取@aws-amplify/predictions的全脸识别信息?
How to get the full face recognition information from @aws-amplify/predictions?
我在 React Native 应用程序中使用@aws-amplify/predictions 的面部识别。在 Predictions.identify 中,我想取回所有信息,例如检测到的面部属性。我正在获取地标、边界框(检测到的人脸)和元数据。根据其他示例的文档,这似乎是默认信息,要取回所有信息,我必须传入 "format: [ALL]" 或类似信息,但我无法找到实体检测的结构我正在使用,仅用于文本识别等
entities: {
source: {
bytes
},
format: ["ALL"]
}
@aws-amplify/predictions是否提供了我想要的所有信息,如果是,我该如何请求获取完整的人脸识别信息?
文档似乎相互矛盾,因为我被要求将我的图像上传到 S3 存储桶中并从那里进行分析。我正在使用作为数组缓冲区发送的本地图像。
随后的文档:
https://aws-amplify.github.io/docs/js/predictions
https://docs.aws.amazon.com/rekognition/latest/dg/faces-detect-images.html
https://docs.aws.amazon.com/rekognition/latest/dg/API_DetectFaces.html
这是可以理解的。 Amplify AmazonAIIdentifyPredictionsProvider simplifies the Rekognition DetectFaces() request. That means the provider does not allow a requester to pass in the parameter key 'format' with a value. Click on the AmazonAIIdentifyPredictionsProvider link 看Amplify预测javascript代码。请注意请求输入参数字典如何只有一个键,'Image.'
const param = { Image: inputImage };
要摆脱困境,只需在 react-native 应用程序中使用 aws-sdk 'aws-sdk/clients/rekognition' class 调用 react-native 应用程序中的 API。请求者可以通过 aws-sdk 客户端传入 'format' 密钥。
Rekognition DetectFaces 接受一团字节。 DetectFaces 也接受一个 S3 对象。
我在 React Native 应用程序中使用@aws-amplify/predictions 的面部识别。在 Predictions.identify 中,我想取回所有信息,例如检测到的面部属性。我正在获取地标、边界框(检测到的人脸)和元数据。根据其他示例的文档,这似乎是默认信息,要取回所有信息,我必须传入 "format: [ALL]" 或类似信息,但我无法找到实体检测的结构我正在使用,仅用于文本识别等
entities: {
source: {
bytes
},
format: ["ALL"]
}
@aws-amplify/predictions是否提供了我想要的所有信息,如果是,我该如何请求获取完整的人脸识别信息?
文档似乎相互矛盾,因为我被要求将我的图像上传到 S3 存储桶中并从那里进行分析。我正在使用作为数组缓冲区发送的本地图像。
随后的文档:
https://aws-amplify.github.io/docs/js/predictions https://docs.aws.amazon.com/rekognition/latest/dg/faces-detect-images.html https://docs.aws.amazon.com/rekognition/latest/dg/API_DetectFaces.html
这是可以理解的。 Amplify AmazonAIIdentifyPredictionsProvider simplifies the Rekognition DetectFaces() request. That means the provider does not allow a requester to pass in the parameter key 'format' with a value. Click on the AmazonAIIdentifyPredictionsProvider link 看Amplify预测javascript代码。请注意请求输入参数字典如何只有一个键,'Image.'
const param = { Image: inputImage };
要摆脱困境,只需在 react-native 应用程序中使用 aws-sdk 'aws-sdk/clients/rekognition' class 调用 react-native 应用程序中的 API。请求者可以通过 aws-sdk 客户端传入 'format' 密钥。
Rekognition DetectFaces 接受一团字节。 DetectFaces 也接受一个 S3 对象。