awsRekognition: Retrieve output from AWS Rekognition

Description Usage Arguments Examples

Description

Retrieve output from AWS Rekognition

Usage

1
2
3
4
5
awsRekognition(imagePath, targetPath = NULL, feature = "detect-labels",
  AWS_ACCESS_KEY_ID = Sys.getenv("AWS_ACCESS_KEY_ID"),
  AWS_SECRET_ACCESS_KEY = Sys.getenv("AWS_SECRET_ACCESS_KEY"),
  AWS_BUCKET = Sys.getenv("AWS_BUCKET"),
  AWS_DEFAULT_REGION = Sys.getenv("AWS_DEFAULT_REGION"))

Arguments

imagePath

path to image

targetPath

target image for the "compare-faces" features

feature

defaults to "detect-labels","detect-faces","compare-faces", "recognize-celebrities","detect-moderation-labels"

AWS_ACCESS_KEY_ID

defauts to Sys.getenv("AWS_ACCESS_KEY_ID")

AWS_SECRET_ACCESS_KEY

defauts to Sys.getenv("AWS_SECRET_ACCESS_KEY")

AWS_BUCKET

defauts to Sys.getenv("AWS_BUCKET")

AWS_DEFAULT_REGION

defauts to Sys.getenv("AWS_DEFAULT_REGION")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
imagePath <- system.file("ImageTests", "chimney_rock.jpg", package="WanderingEye")
awsRekognition(imagePath=imagePath,
               targetPath=NULL,
               feature="detect-labels",
               AWS_ACCESS_KEY_ID=Sys.getenv("AWS_ACCESS_KEY_ID"), 
               AWS_SECRET_ACCESS_KEY=Sys.getenv("AWS_SECRET_ACCESS_KEY"), 
               AWS_BUCKET=Sys.getenv("AWS_BUCKET"), 
               AWS_DEFAULT_REGION=Sys.getenv("AWS_DEFAULT_REGION"))
ImagePath1 <- "http://a.espncdn.com/combiner/i?img=/i/headshots/nba/players/full/1966.png"
ImagePath2 <- "https://cdn-s3.si.com/s3fs-public/teams/basketball/nba/players/214152-300x300.png"
awsRekognition(imagePath=ImagePath1, feature="detect-labels")
awsRekognition(imagePath=ImagePath1, feature="detect-faces")
awsRekognition(imagePath=ImagePath1, feature="recognize-celebrities")
awsRekognition(imagePath=ImagePath1, targetPath=ImagePath2, feature="compare-faces")

mgahan/WanderingEye documentation built on May 22, 2019, 12:38 p.m.