Created
March 13, 2024 23:15
-
-
Save Pelirrojo/7415c1798014b53fa8f6b6014755fce8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
# Cacheable references | |
rekognition = boto3.client("rekognition") | |
# Function to call Amazon Rekognition and detect faces in an image | |
async def detect_faces(image_path): | |
"""Count the number of faces in one app""" | |
with open(image_path, "rb") as image_file: | |
image_bytes = image_file.read() | |
response = rekognition.detect_faces(Image={"Bytes": image_bytes}, Attributes=["ALL"]) | |
return response | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment