Classify an image

Classify an image

Test out a trained impulse (using a posted image).

POSThttps://studio.edgeimpulse.com/v1/api/{projectId}/classify/image
Path parameters
projectId*integer

Project ID

Query parameters
Body
image*string (binary)
Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

resultobject

Classification value per label. For a neural network this will be the confidence, for anomalies the anomaly score.

boundingBoxesarray of BoundingBoxWithScore (object)
Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/classify/image', {
    method: 'POST',
    headers: {
      "Content-Type": "multipart/form-data"
    },
    body: JSON.stringify({
      "image": "binary"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text",
  "boundingBoxes": [
    {
      "label": "text",
      "x": 0,
      "y": 0,
      "width": 0,
      "height": 0,
      "score": 0
    }
  ]
}

Last updated