LoslegenKostenlos starten

Parking sign reader

City planners have millions of images from truck cameras. Since the city does not keep a record of this data, parking regulations would be very valuable for planners to know.

Sam found detect_text() in the boto3 Rekognition documentation. She is going to use it to extract text out of the images City planners provided.

Sam has:

  • Created the Rekognition client.
  • Called .detect_text() and stored the result in response.

Help Sam create a data source for parking regulations in the City. Use Rekognition's .detect_text() method to extract lines and words from images of parking signs.

Diese Übung ist Teil des Kurses

<Kurs>Introduction to AWS Boto in Python</Kurs>
Kurs ansehen

Interaktive praktische Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Create empty list of words
words = []
# Iterate over the TextDetections in the response dictionary
for text_detection in response['____']:
  	# If TextDetection type is WORD, append it to words list
    if text_detection['____'] == 'WORD':
        # Append the detected text
        words.append(text_detection['____'])
# Print out the words list
print(words)
Code bearbeiten und ausführen