首页 > 解决方案 > how to reduce usage aws rekogniton api usage

问题描述

I have created some application that uses aws rekognition service,

I am doing this via boto3 python library

here is sample code

try:
    aws_res = rek_client.search_faces_by_image(CollectionId='inspact',
                                                Image={
                                                  'Bytes': image_base64},
                                                   MaxFaces=1,
                                                   FaceMatchThreshold=95,
                                                   QualityFilter='HIGH'
                                                   )

except IndexError as e:
        print(e)
        error = 'Unknown face'
        return make_response(error, 400)

I suspect that API usage that I log in python and face API usage on aws never matches at all ,there is always 30-40% difference, so my question is there anything in code that I'm missing that I have to wrap to make it efficient

标签: pythonamazon-web-servicesboto3amazon-rekognition

解决方案


推荐阅读