Mengenali pola

Pengantar AWS Boto di Python

Maksim Pecherskiy

Instructor

Rekognition

Rekognition

Pengantar AWS Boto di Python

Apa itu Rekognition?

Mendeteksi objek pada gambar

Deteksi objek pada gambar

Ekstraksi teks dari gambar

Ekstrak teks dari gambar

Pengantar AWS Boto di Python

Mengapa tidak bangun sendiri?

Gunakan Rekognition jika:

  • Cepat namun baik
  • Kode tetap sederhana
  • Mengenali banyak hal

Bangun model jika:

  • Kebutuhan khusus
  • Implikasi keamanan
  • Volume besar

Tangkapan layar Rekognition

Pengantar AWS Boto di Python

Saya bukan ahli computer vision

Bukan Ahli Computer Vision

Pengantar AWS Boto di Python

Dokumentasi AWS

Pengantar AWS Boto di Python

DOKUMENTASI BOTO

Pengantar AWS Boto di Python

DOKUMENTASI BOTO

Pengantar AWS Boto di Python

DOKUMENTASI BOTO

Pengantar AWS Boto di Python

Unggah gambar ke S3

Inisialisasi klien S3

s3 = boto3.client(
  's3', region_name='us-east-1', 
  aws_access_key_id=AWS_KEY_ID, aws_secret_access_key=AWS_SECRET
)

Unggah file

s3.upload_file(
  Filename='report.jpg', Key='report.jpg', 
  Bucket='datacamp-img')
Pengantar AWS Boto di Python

Deteksi objek

Inisialisasi klien
rekog = boto3.client(
  'rekognition',
  region_name='us-east-1', 
  aws_access_key_id=AWS_KEY_ID, 
  aws_secret_access_key=AWS_SECRET)

Inisialisasi klien Rekognition

Pengantar AWS Boto di Python

Deteksi objek

Deteksi!
response = rekog.detect_labels(
  Image={'S3Object': {
          'Bucket': 'datacamp-img', 
          'Name': 'report.jpg'
        },

MaxLabels=10, MinConfidence=95 )

Deteksi objek

Pengantar AWS Boto di Python

Respons deteksi label

Pengantar AWS Boto di Python

Respons deteksi label

Pengantar AWS Boto di Python

Respons deteksi label

Pengantar AWS Boto di Python

Respons deteksi label

Pengantar AWS Boto di Python

Respons deteksi label

Pengantar AWS Boto di Python

Deteksi teks

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

Respons deteksi teks

Pengantar AWS Boto di Python

Respons deteksi teks

Pengantar AWS Boto di Python

Respons deteksi teks

Pengantar AWS Boto di Python

Apa yang dilihat Rekognition

Pengantar AWS Boto di Python

Ringkasan

  • Deteksi objek pada gambar
  • Hitung instance
  • Pelajari layanan AWS baru

Rekognition

.detect_labels()

  • Kenali teks pada gambar
  • Deteksi kata vs baris
  • Kapan membangun sendiri

Deteksi teks

.detect_text()

Pengantar AWS Boto di Python

Mari lakukan computer vision!

Pengantar AWS Boto di Python

Preparing Video For Download...