Image Features

POST https://apiv2.indico.io/imagefeatures/[batch]?version=[version]
Convert images into meaningful feature vectors.
Extracts abstract image features for use as inputs to learning algorithms.

Current Version: 3

Private cloud endpoint

POST https://[cloud].indico.domains/imagefeatures/[batch]/?version=[version]

Arguments

data – refer to img format guide – required
[v or version] – Integer (defaults to 3) – optional – the version of the model to use (2, or 3; see output for more information)

For an example of how to pass keyword arguments to the indico API in a post request, see the example below.

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

// Single Example
fetch('https://apiv2.indico.io/imagefeatures', {
  method: 'POST',
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    data: '<IMAGE>'
  })
})
  .then(r => r.json())
  .then(response => {
    console.log(response);
  })
  .catch(err => console.log(err));

// Batch Example
fetch('https://apiv2.indico.io/imagefeatures/batch', {
  method: 'POST',
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    data: [
      '<IMAGE>',
      '<IMAGE>'
    ]
  })
})
  .then(r => r.json())
  .then(response => {
    console.log(response);
  })
  .catch(err => console.log(err));