Sha256: 72c7de7017983eb77dd3e404419d78be3e4fca0a9213b9f7e4d4714f85f851c1

Contents?: true

Size: 496 Bytes

Versions: 1

Compression:

Stored size: 496 Bytes

Contents

require 'aws-sdk'
require 'pp'

class FaceCropper
  class AwsRekognitionFaceDetector
    def initialize(bucket:, image_key:, region:)
      @bucket     = bucket
      @imaget_key = image_key
      @region     = region
    end

    def dcetect!
      rekognition = Aws::Rekognition::Client.new(region: @region)

      rekognition.detect_faces(
        image: {
          s3_object: {
            bucket: @from_bucket,
            name:   @image_key
          }
        }
      )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
face_cropper-0.3.0 lib/face_cropper/aws_rekognition_face_detector.rb