The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Using clarifai

Installation

To get the current development version from GitHub:

# install.packages("devtools")
devtools::install_github("soodoku/clarifai")

Load up the lib:

library(clarifai)

Authentication

Start by setting Client ID and secret, which you can get from https://developer.clarifai.com/

secret_id(c("client_id", "secret"))

Next, get the token (the function also sets it):

get_token()

Get Information

Get information about your application:

get_info()
## Status message:  All images in request have completed successfully.

Get Tags

We are now all set. Let’s play. Get tags of a remote image:

Metro North

Metro North

res <- tag_image_urls("https://raw.githubusercontent.com/soodoku/clarifai/master/inst/extdata/metro-north.jpg")
head(res)

Get tags for a local image:

path <- system.file("inst/extdata/", package = "clarifai")
filep <- paste0(path, "/metro-north.jpg")
tag_images(filep)

Provide feedback about tags for an image, including suggesting new tags, suggesting that some tags be removed etc.

Provide Feedback

feedback(file_path="path_to_image", feedback_type="add_tags", feedback_value="suggested_tag")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.