Learn R Programming

clarifai (version 0.2)

tag_images: Tag Images on the Computer

Description

Tag Images on the Computer

Usage

tag_images(file_paths = NULL, meta = FALSE, simplify = TRUE)

Arguments

file_paths
a vactor of paths to image file(s) for which you want tags
meta
Boolean that toggles whether or not you want the entire object.
simplify
Boolean that toggles whether or not you want a simplified data frame with each label and associated probability in a separate row. Default is TRUE. The entire object returned by the API contains a lot of meta data. By default a simplified data.frame

Value

  • If meta is TRUE, a named list of length 4 with following elements is returned: status_code OK or not status_msg Successful or not meta Named list of 1 containing another list named tag Sublist tag has three elements: timestamp, model and config results is a data.frame of length 6 and 1 row. Column names are: docid, status_code, status_msg, local_id and a data.frame named tag which has a data.frame result which contains two columns: labels and probabilities If meta is FALSE and simplify is TRUE, a data.frame with three columns: file_paths, labels and probs returned If meta is FALSE and simplify is FALSE, a data.frame with two columns carrying a vector of labels, vector of probs is returned for each image

References

https://developer.clarifai.com/

See Also

tag_image_urls

Examples

Run this code
tag_images(file_paths="path_to_image")

Run the code above in your browser using DataLab