我想将 Firebase 与 Amazon Rekognition 一起使用,可以使用吗?
我读过 Class for Rekognition for Node.js 它在代码中有 S3 命令。
不,您不需要使用s3如果你不想的话。使用 s3 提供低延迟但你可以使用重新认知直接通过 API 调用提供服务,API 调用的响应将包含您想要的结果json您可以根据需要使用的格式。
此外,如果您使用直接 API 调用,那么您必须将图像传递给Base-64 编码使用 REkognition API 时的格式。
您还可以使用适用于不同编程语言的 AWS 开发工具包,这将使您的任务更轻松地使用不同的 AWS 服务。
例如,用于检测 python 中的标签:
import boto3
from PIL import Image
import io
local='images/4.jpeg'
client = boto3.client('rekognition')
image = Image.open(local)
stream = io.BytesIO()
image.save(stream,format="JPEG")
image_binary = stream.getvalue()
response = client.detect_labels(
Image={'Bytes':image_binary}
)
print(response)
而某些重新识别服务需要 s3 才能工作。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)