Skip to content

Instantly share code, notes, and snippets.

@kashitan
Last active November 9, 2015 06:16
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/85139ffb3e8754d27bfb to your computer and use it in GitHub Desktop.
Save kashitan/85139ffb3e8754d27bfb to your computer and use it in GitHub Desktop.
Detection API実行サンプル(JSON版)
library(httr)
# ネット上の画像の場合はJSONでURLをPOST
res <- POST(url = 'https://api.projectoxford.ai/face/v0/detections',
query = list(analyzesFaceLandmarks=TRUE,
analyzesAge=TRUE,
analyzesGender=TRUE,
analyzesHeadPose=TRUE),
add_headers('Content-Type' = 'application/json',
'Ocp-Apim-Subscription-Key' = '[Subscription key]'),
body = '{ "url":"[画像のURL]" }'
)
content(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment