Created
July 12, 2022 20:59
-
-
Save RamVegiraju/4b8807944020e27f2e346f90169fa756 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def show_custom_labels(model,bucket,photo, min_confidence): | |
client=boto3.client('rekognition') | |
#Call DetectCustomLabels | |
response = client.detect_custom_labels(Image={'S3Object': {'Bucket': bucket, 'Name': photo}}, | |
MinConfidence=min_confidence, | |
ProjectVersionArn=model) | |
# For object detection use case, uncomment below code to display image. | |
display_image(bucket,photo,response) | |
return len(response['CustomLabels']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment