The Edge Impulse structured labels acquisition format, structured_labels.labels, provides a simple and intuitive way to store files and associated labels when you want to upload multi-label samples using the Data Ingestion API. The structure and organization are designed to provide clear, index-based labeling for various segments of a data file.
Associated tutorialFor a better understanding, view the Ingest structured label data tutorial.

File structure

The file follows a JSON format, with the following structure:
  • version: Indicates the version of the label format.
  • type: Specifies the type of labeling method - use structured-labels.
  • structuredLabels: This is an object that maps file names to arrays of labels. Where each key represents the name of a file, and its value is an array of objects, each containing:
    • startIndex and endIndex (milliseconds): These keys define the start and end of the segment within the file that the label applies to, allowing for precise segmentation of data. Note that no missing values are allowed. e.g. the next segment after "endIndex": 300 needs to be "startIndex": 301
    • label: A string that represents the label assigned to the range between startIndex and endIndex.

File example

{
    "version": 1,
    "type": "structured-labels",
    "structuredLabels": {
        "sample.3.json": [{
            "startIndex": 0,
            "endIndex": 300,
            "label": "first_label"
        }, {
            "startIndex": 301,
            "endIndex": 621,
            "label": "second_label"
        }]
    }
}