Image Features

imageFeatures(data, {[apiKey]: String, [privateCloud]: 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
[apiKey] – String – optional – your indico API key
[privateCloud] – 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

var indico = require('indico.io');
indico.apiKey =  'YOUR_API_KEY';

var response = function(res) { console.log(res); }
var logError = function(err) { console.log(err); }
  
// single example
indico.imageFeatures("<IMAGE>")
  .then(response)
  .catch(logError);

// batch example
var batchInput = [
    "<IMAGE>",
    "<IMAGE>"
];
indico.imageFeatures(batchInput)
  .then(response)
  .catch(logError);