R Package for Image Recogntion using the Microsoft's Cognitive Services API. Microsoft's Cognitive Services were previously named "Project Oxford"
See the the R/shiny demo
and blog post
Microsoft changed their API and API key structure. Please let me know if parts of the package do not work anymore.
#install.packages("devtools")
require(devtools)
install_github("flovv/Roxford")
- Visit www.projectoxford.ai/
- sign in
- go to account settings --> my subscriptions
Every API (Face, Emotion, Vision, Video, ...) has a seperate API key. Hence, to use different functions you need to provide the "correct" key.
require(Roxford)
facekey = '' #look it up on your subscription site
## using local images
getFaceResponse("out/snap00169.png", facekey)
## or providing a url to a remote local image
getFaceResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", facekey)
emotionkey = '' # different key
getEmotionResponse("out/snap00169.png", emotionkey)
getEmotionResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", emotionKey)
visionkey = '' # different key
getVisionResponse("out/snap00169.png", visionkey)
getVisionResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", visionkey)
visionkey = '' # different key
getDescriptionResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", visionkey)
getTaggingResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", visionkey)
getTaggingResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", visionkey)
## can be used to classify with domain specific models provided by Microsoft.
# run getDomainModels(visionkey) first to get a list with available models
getDomainModelResponseURL("http://sizlingpeople.com/wp-content/uploads/2015/10/Kim-Kardashian-2015-21.jpg", visionkey, 'celebreties')
There are always to function to access one API endpoint. xyzURL(url,...) to provide a url as a string and just xyz(localImage,...) to provide a string to a local image.