image_features: Detects image features

Description Usage Arguments Details Value See Also Examples

Description

Given an input image, returns a 2048 dimensional sparse feature vector explaining that image. Useful as a form of feature engineering for image oriented tasks.

Usage

1
image_features(img, local.api = FALSE)

Arguments

img

image data

local.api

logical, whether use local or remote API

Details

* Input can be either grayscale or rgb color and should either be a numpy array or nested list format.

* Input data should be either uint8 0-255 range values or floating point between 0 and 1.

* Large images (i.e. 1024x768+) are much bigger than needed, resizing will be done internally to 64x64 if needed.

* For ideal performance, images should be square aspect ratio but non-square aspect ratios are supported as well.

Value

List with image features

See Also

face_emotion, face_features

Examples

1
2
3
4
5
6
7
img <- matrix(runif(64*64, 0, 1), nrow = 64)
features <- image_features(img)

length(features)
min(unlist(features))
max(unlist(features))
sum(unlist(features))

redmode/indicoio documentation built on May 27, 2019, 4:03 a.m.