Ich versuche, um mehrere Bilder mit AWS RekognitionMake api ruft parallel
In Haupt-Funktion in einer Schleife zu analysieren:
with open("Test/frame%d.jpg" % count, "rb") as image:
for face in RekognitionClass.detect_faces(image):
=>Process result and write in DB
Rekognition Klasse:
def detect_faces(image, attributes=['ALL'], region="eu-west-1"):
rekognition = boto3.client("rekognition", region)
response = rekognition.detect_faces(Image={'Bytes': image.read()}, Attributes=attributes)
return response['FaceDetails']
Aber man api Anruf dauert ca. Mindestens 2 Sekunden, und ich würde gerne mehr parallele Anrufe machen, wenn möglich