Image Features

image_features(data, {[api_key]: String, [cloud]: String, [version]: Integer})
Convert images into meaningful feature vectors.
Extracts abstract image features for use as inputs to learning algorithms.

Current Version: 3

Arguments

data – refer to img format guide – required
[api_key] – String – optional – your indico API key
[cloud] – String – optional – your private cloud subdomain
[v or version] – Integer (defaults to 3) – optional – the version of the model to use (2, or 3; see output for more information)

Output

List of 4096 numbers (floats). Each number corresponds to the strength of that feature in the feature vector. Version 3 is the highest quality and has the lowest error rate. Version 1 has been deprecated.

# single output
[
    0.004583298490803539,
    0.0022990592931235367,
    0.0007262553487194683,
    ... 2042 features omitted ...,
    0.03889081635783809,
    0.0016173627610188248,
    0.0006673354405158707
]

# batch output
[
    [
        0.004583298490803539,
        0.0022990592931235367,
        0.0007262553487194683,
        ... 2042 features omitted ...,
        0.03889081635783809,
        0.0016173627610188248,
        0.0006673354405158707
    ], 
    [
        0.004583298490803539,
        0.0022990592931235367,
        0.0007262553487194683,
        ... 2042 features omitted ...,
        0.03889081635783809,
        0.0016173627610188248,
        0.0006673354405158707
    ]
]

Example

require 'indico'
Indico.api_key =  'YOUR_API_KEY'

# single example
Indico.image_features("<IMAGE>")

# batch example
Indico.image_features([
    "<IMAGE>",
    "<IMAGE>"
])