我想将Firebase与Amazon Rekognition一起使用吗?
我阅读了Node.js的Rekognition类,它在代码中包含S3命令。
答案 0 :(得分:3)
否,如果不需要,您不需要使用 s3 。使用s3可提供低延迟,但是您可以直接通过API调用使用 Rekognition 服务,API调用的响应将在 json 中包含您想要的结果您可以根据需要使用的格式。
如果您使用直接API调用,那么在使用REkognition API时,必须以 base-64编码格式传递图像。
您还可以将AWS开发工具包的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正常工作。