Introduction to AWS Boto in Python
Maksim Pecherskiy
Instructor

Detecting Objects in an image

Extracting Text from Images

Use Rekognition if:
Build a model if:






Initialize S3 Client
s3 = boto3.client(
  's3', region_name='us-east-1', 
  aws_access_key_id=AWS_KEY_ID, aws_secret_access_key=AWS_SECRET
)
Upload a file
s3.upload_file(
  Filename='report.jpg', Key='report.jpg', 
  Bucket='datacamp-img')
  rekog = boto3.client(
  'rekognition',
  region_name='us-east-1', 
  aws_access_key_id=AWS_KEY_ID, 
  aws_secret_access_key=AWS_SECRET)
  
response = rekog.detect_labels( Image={'S3Object': { 'Bucket': 'datacamp-img', 'Name': 'report.jpg' },MaxLabels=10, MinConfidence=95 )






response = rekog.detect_text(
  Image={'S3Object': 
          {
            'Bucket': 'datacamp-img', 
            'Name': 'report.jpg'
          }
        }
)
  




.detect_labels()

.detect_text()
Introduction to AWS Boto in Python