주차 표지판 판독기
도시 계획 담당자들은 청소 트럭 카메라에서 수집한 수백만 장의 이미지를 보유하고 있어요. 하지만 도시는 이 데이터의 기록을 따로 보관하지 않기 때문에, 주차 규정을 알아낼 수 있다면 계획 수립에 큰 도움이 됩니다.
Sam은 boto3 Rekognition 문서에서 detect_text()를 찾았어요. 이 메서드를 사용해 도시 계획 담당자들이 제공한 이미지에서 텍스트를 추출하려고 합니다.

Sam이 이미 한 일:
- Rekognition 클라이언트를 생성했어요.
.detect_text()를 호출해 결과를response에 저장했어요.
이제 Sam이 도시의 주차 규정 데이터 소스를 만들 수 있도록 도와주세요. Rekognition의 .detect_text() 메서드를 사용해 주차 표지판 이미지에서 줄과 단어를 추출하세요.
이 연습은 강의의 일부입니다
Python으로 시작하는 AWS Boto
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# 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)