Image Features

imageFeatures.predict(data, [params])
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

import io.indico.Indico;
import io.indico.api.IndicoResult;
import io.indico.api.BatchIndicoResult;

// single example
Indico indico = new Indico("YOUR_API_KEY");
IndicoResult single = indico.imageFeatures.predict(
    "<IMAGE>"
);
Double result = single.getImageFeatures();
System.out.println(result);

// batch example
String[] example = {
    "<IMAGE>", 
    "<IMAGE>"
};
BatchIndicoResult multiple = indico.imageFeatures.predict(example);
List results = multiple.getImageFeatures();
System.out.println(results);