Skip to content

Instantly share code, notes, and snippets.

@kashitan
Last active November 9, 2015 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kashitan/fef7df3466b46be0c1d1 to your computer and use it in GitHub Desktop.
Save kashitan/fef7df3466b46be0c1d1 to your computer and use it in GitHub Desktop.
Detection API実行サンプル
library(httr)
img <- upload_file([画像ファイルのパス])
res <- POST(url = 'https://api.projectoxford.ai/face/v0/detections',
query = list(analyzesFaceLandmarks=FALSE,
analyzesAge=TRUE,
analyzesGender=TRUE,
analyzesHeadPose=FALSE),
add_headers('Content-Type' = 'application/octet-stream',
'Ocp-Apim-Subscription-Key' = '[Subscription key]'),
body = img
)
content(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment