BaşlayınÜcretsiz başlayın

Cat detector

Sam has been getting more and more challenging projects as a result of her popularity and success.

The newest request is from the animal control team. They want to receive notifications when an image comes in from the Get It Done application contains a cat. They can find feral cats and go rescue them. They provided her with two images that she can test her system with. One contains a cat, one does not. Both images are referenced in variables image1 and image2 respectively.

Sam has also created the boto3 Rekognition client in the rekog variable.

Help Sam use Rekognition to enable the animal control team to rescue stray cats!

Bu egzersiz, kursun bir parçasıdır

Introduction to AWS Boto in Python

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Use Rekognition client to detect labels
image1_response = rekog.____(
    # Specify the image as an S3Object; Return one label
    ____=image1, MaxLabels=____)

# Print the labels
print(image1_response['Labels'])
Kodu Düzenle ve Çalıştır