LogoLogo
HomeDocsAPIProjectsForum
  • Getting Started
    • For beginners
    • For ML practitioners
    • For embedded engineers
  • Frequently asked questions
  • Tutorials
    • End-to-end tutorials
      • Continuous motion recognition
      • Responding to your voice
      • Recognize sounds from audio
      • Adding sight to your sensors
        • Collecting image data from the Studio
        • Collecting image data with your mobile phone
        • Collecting image data with the OpenMV Cam H7 Plus
      • Object detection
        • Detect objects using MobileNet SSD
        • Detect objects with FOMO
      • Sensor fusion
      • Sensor fusion using Embeddings
      • Processing PPG input with HR/HRV Features Block
      • Industrial Anomaly Detection on Arduino® Opta® PLC
    • Advanced inferencing
      • Continuous audio sampling
      • Multi-impulse
      • Count objects using FOMO
    • API examples
      • Running jobs using the API
      • Python API Bindings Example
      • Customize the EON Tuner
      • Ingest multi-labeled data using the API
      • Trigger connected board data sampling
    • ML & data engineering
      • EI Python SDK
        • Using the Edge Impulse Python SDK with TensorFlow and Keras
        • Using the Edge Impulse Python SDK to run EON Tuner
        • Using the Edge Impulse Python SDK with Hugging Face
        • Using the Edge Impulse Python SDK with Weights & Biases
        • Using the Edge Impulse Python SDK with SageMaker Studio
        • Using the Edge Impulse Python SDK to upload and download data
      • Label image data using GPT-4o
      • Label audio data using your existing models
      • Generate synthetic datasets
        • Generate image datasets using Dall·E
        • Generate keyword spotting datasets
        • Generate physics simulation datasets
        • Generate audio datasets using Eleven Labs
      • FOMO self-attention
    • Lifecycle Management
      • CI/CD with GitHub Actions
      • OTA Model Updates
        • with Nordic Thingy53 and the Edge Impulse APP
      • Data Aquisition from S3 Object Store - Golioth on AI
    • Expert network projects
  • Edge Impulse Studio
    • Organization hub
      • Users
      • Data campaigns
      • Data
      • Data transformation
      • Upload portals
      • Custom blocks
        • Transformation blocks
        • Deployment blocks
          • Deployment metadata spec
      • Health Reference Design
        • Synchronizing clinical data with a bucket
        • Validating clinical data
        • Querying clinical data
        • Transforming clinical data
        • Buildling data pipelines
    • Project dashboard
      • Select AI Hardware
    • Devices
    • Data acquisition
      • Uploader
      • Data explorer
      • Data sources
      • Synthetic data
      • Labeling queue
      • AI labeling
      • CSV Wizard (Time-series)
      • Multi-label (Time-series)
      • Tabular data (Pre-processed & Non-time-series)
      • Metadata
      • Auto-labeler [Deprecated]
    • Impulse design & Experiments
    • Bring your own model (BYOM)
    • Processing blocks
      • Raw data
      • Flatten
      • Image
      • Spectral features
      • Spectrogram
      • Audio MFE
      • Audio MFCC
      • Audio Syntiant
      • IMU Syntiant
      • HR/HRV features
      • Building custom processing blocks
        • Hosting custom DSP blocks
      • Feature explorer
    • Learning blocks
      • Classification (Keras)
      • Anomaly detection (K-means)
      • Anomaly detection (GMM)
      • Visual anomaly detection (FOMO-AD)
      • Regression (Keras)
      • Transfer learning (Images)
      • Transfer learning (Keyword Spotting)
      • Object detection (Images)
        • MobileNetV2 SSD FPN
        • FOMO: Object detection for constrained devices
      • NVIDIA TAO (Object detection & Images)
      • Classical ML
      • Community learn blocks
      • Expert Mode
      • Custom learning blocks
    • EON Tuner
      • Search space
    • Retrain model
    • Live classification
    • Model testing
    • Performance calibration
    • Deployment
      • EON Compiler
      • Custom deployment blocks
    • Versioning
  • Tools
    • API and SDK references
    • Edge Impulse CLI
      • Installation
      • Serial daemon
      • Uploader
      • Data forwarder
      • Impulse runner
      • Blocks
      • Himax flash tool
    • Edge Impulse for Linux
      • Linux Node.js SDK
      • Linux Go SDK
      • Linux C++ SDK
      • Linux Python SDK
      • Flex delegates
    • Edge Impulse Python SDK
  • Run inference
    • C++ library
      • As a generic C++ library
      • On your desktop computer
      • On your Zephyr-based Nordic Semiconductor development board
    • Linux EIM Executable
    • WebAssembly
      • Through WebAssembly (Node.js)
      • Through WebAssembly (browser)
    • Docker container
    • Edge Impulse firmwares
  • Edge AI Hardware
    • Overview
    • MCU
      • Nordic Semi nRF52840 DK
      • Nordic Semi nRF5340 DK
      • Nordic Semi nRF9160 DK
      • Nordic Semi nRF9161 DK
      • Nordic Semi nRF9151 DK
      • Nordic Semi nRF7002 DK
      • Nordic Semi Thingy:53
      • Nordic Semi Thingy:91
    • CPU
      • macOS
      • Linux x86_64
    • Mobile Phone
    • Porting Guide
  • Integrations
    • Arduino Machine Learning Tools
    • NVIDIA Omniverse
    • Embedded IDEs - Open-CMSIS
    • Scailable
    • Weights & Biases
  • Pre-built datasets
    • Continuous gestures
    • Running faucet
    • Keyword spotting
    • LiteRT (Tensorflow Lite) reference models
  • Tips & Tricks
    • Increasing model performance
    • Data augmentation
    • Inference performance metrics
    • Optimize compute time
    • Adding parameters to custom blocks
    • Combine Impulses
  • Concepts
    • Glossary
    • Data Engineering
      • Audio Feature Extraction
      • Motion Feature Extraction
    • ML Concepts
      • Neural Networks
        • Layers
        • Activation Functions
        • Loss Functions
        • Optimizers
          • Learned Optimizer (VeLO)
        • Epochs
      • Evaluation Metrics
    • Edge AI
      • Introduction to edge AI
      • What is edge computing?
      • What is machine learning (ML)?
      • What is edge AI?
      • How to choose an edge AI device
      • Edge AI lifecycle
      • What is edge MLOps?
      • What is Edge Impulse?
      • Case study: Izoelektro smart grid monitoring
      • Test and certification
    • What is embedded ML, anyway?
    • What is edge machine learning (edge ML)?
Powered by GitBook
On this page
  • AI labeling actions
  • AI labeling blocks
  • Configuration
  • Select an AI labeling block
  • Add multiple AI labeling blocks
  • Filter which data to label
  • Preview
  • Set metadata (optional)
  • Run the labeling process
  • Examples
  • Bounding box labeling with OWL-ViT
  • Bounding box re-Labeling with GPT-4o
  • Image labeling with GPT-4o
  • Image labeling with pretrained models
  • Audio labeling with AudioSet
  • Custom AI labeling blocks
  • Interface
  • Push to Edge Impulse
  • Preview mode
  • Troubleshooting
  1. Edge Impulse Studio
  2. Data acquisition

AI labeling

PreviousLabeling queueNextCSV Wizard (Time-series)

Last updated 6 months ago

The AI labeling feature is an extensible way of integrating existing AI models into your workflow and using them to automatically label your datasets. This can be achieved through leveraging ready-made blocks provided by Edge Impulse or developing custom ones to meet your specific needs. Whether you’re labeling images, bounding boxes, or audio samples, these AI labeling blocks are sure to save you time and improve your consistency.

AI labeling actions

To exit an AI labeling action configuration and return to the overview page, you can click on the < button found to the left of the block configuration title (AI Labeling - Step 1) or click the AI labeling tab.

You can create multiple AI labeling actions that contain one or more AI labeling blocks, each with different prompts, parameters and filters. From the AI labeling actions overview page you can add new actions, delete existing ones, access their configurations, or run them directly.

AI labeling blocks

There are several AI labeling blocks that have been developed by Edge Impulse and are available for your use. These are listed below with links to their associated code in public GitHub repositories:

Configuration

To begin, proceed to the Data acquisition view and ensure you have data samples in the Dataset tab. Then, continue to the AI labeling tab.

Click on an existing AI labeling action to enter the configuration view for that action. If you do not yet have an AI labeling action, you can create one using the + Add new label action button.

Select an AI labeling block

The first step is to select an AI labeling block that you would like to use. By default, blocks that are not compatible with your data modality or labeling objective are greyed out. Once you have selected an AI labeling block, the parameters specific to that block are presented.

Some blocks require an API key to interact with other providers, such as OpenAI or Hugging Face. You can set your API key directly in the AI labeling block configuration panel the first time you use the block. The key you enter will be stored in Secrets. Once created, the key value will no longer be visible anywhere in the platform.

To manage your secrets if you are an Enterprise customer, go to your organization and select the Secrets menu item. If you are not an Enterprise customer, secrets can be accessed through the settings in your developer profile. Click on your avatar and go to your Account settings -> Secrets:

Add multiple AI labeling blocks

You can chain several AI labeling blocks together to create an AI labeling action with multiple steps. For example, you can first use a zero-shot object detector to automatically detect high-level objects within an image then follow this with a step to re-label the bounding boxes with more precise labels or remove them entirely.

To add multiple AI labeling blocks, click on the button at the bottom of the block configuration panel to add an extra step.

Filter which data to label

Preview

Tip: If you want to change the number of data samples or the number of columns shown in the preview, click on the view settings icon. Changing the number of columns can be useful for object detection use cases where your objects are small and you want to see larger images.

Before running the AI labeling action on your entire dataset, we recommend to preview the label results on a small subset of your dataset. This will help you to validate your prompt and parameters so that you can iterate faster.

When clicking on the Label preview data button, the changes are staged but not directly applied.

Set metadata (optional)

You can add metadata such as ai-labeled: true, labeling-source: GPT-4o or labeled-on: Nov 2024 that will be set after running the AI labeling action. This is particularly useful if you plan to add more data samples over time and need to filter out your already-labeled samples.

Run the labeling process

Once you are satisfied with your configuration, click on the Label all data button. This will run the AI labeling action and apply the labeling updates to your dataset.

Examples

Bounding box labeling with OWL-ViT

A zero-shot object detector that uses OWL-ViT to label objects with bounding boxes. For complex objects, pair with "Bounding box re-labeling with GPT-4o" to refine labels.

Bounding box re-Labeling with GPT-4o

OpenAI API key needed

Take existing bounding boxes (e.g. from a zero-shot object detector) and use GPT-4o to re-label or remove them as needed. This can be configured as a two step process in a single AI labeling action.

Image labeling with GPT-4o

OpenAI API key needed

Use GPT-4o to apply a single label to images. Customize prompts to return a single label, for example “Is there a person in this picture? Answer with 'yes' or 'no'.”

Image labeling with pretrained models

Audio labeling with AudioSet

Hugging Face API key needed

Custom AI labeling blocks

Only available with Edge Impulse Enterprise Plans

Interface

Inputs

The parameters defined in your parameters.json file will be passed into your block as command line arguments. For example, a parameter named other-label will be passed to your block as --other-label <value>.

In addition to the parameters defined by you, the following arguments will be automatically passed to your AI labeling block.

Argument
Description

--data-ids-file <file>

Always passed. Provides an ids.json file that lists the data sample IDs to operate on as integers.

--proposed-actions <job-id>

One note is that secrets will be passed as environment variables. Additional required environment variables can be defined using requiredEnvVariables in the block info section of the parameters.json file. These can then be set within your organization by editing the block in the AI labeling section found under custom blocks for your organization.

{
    "version": 1,
    "type": "ai-action",
    "info": {
        "name": "<block-name>",
        "description": "<block-description>",
        "requiredEnvVariables": [
            "<required-env-var-1>",
            "<required-env-var-2>"
        ],
        "operatesOn": [
            "<data-type>"
        ]
    },
    "parameters": [
        { ... },
        { ... }
    ]
}

<data-type> options:

images_object_detection | images_single_label | audio | other

{
    "ids": [id1, id2, ..., idn]
}

Outputs

There are no required outputs from the AI labeling block. In general, all changes are applied inside the block itself using API calls.

Push to Edge Impulse

  1. Initialize and push the block:

    edge-impulse-blocks init
    
    ? Choose a type of block
    Transformation block
    Synthetic data block
    ❯ AI labeling block
    Deployment block
    DSP block
    Machine learning block
    $ edge-impulse-blocks push
  2. Your AI labeling block is available in your organization. To run the block, open or create a project belonging to your organization and go to Data acquisition > AI labeling and create an AI labeling action that uses your block.

Preview mode

AI labeling blocks can run in 'preview' mode (triggered when you click Label preview data within an AI labeling action configuration). The changes are staged but not directly applied.

For preview mode, the --propose-actions <job-id> flag and argument are passed into your block. When you see this flag you should not apply changes directly to the data samples (e.g. via raw_data_api.set_sample_bounding_boxes or raw_data_api.set_sample_structured_labels) but rather use the raw_data_api.set_sample_proposed_changes API call.

if args.propose_actions:
    raw_data_api.set_sample_proposed_changes(project_id=project_id, sample_id=sample.id, set_sample_proposed_changes_request={
        'jobId': args.propose_actions,
        'proposedChanges': {
            'structuredLabels': structured_labels,
            'metadata': new_metadata
        }
    })
else:
    raw_data_api.set_sample_structured_labels(
        project_id, sample.id, set_sample_structured_labels_request={
            'structuredLabels': structured_labels
        }
    )
    raw_data_api.set_sample_metadata(project_id=project_id, sample_id=sample.id, set_sample_metadata_request={
        'metadata': new_metadata
    })
if (proposeActionsJobId) {
      await api.rawData.setSampleProposedChanges(project.id, sample.id, {
          jobId: proposeActionsJobId,
          proposedChanges: {
              boundingBoxes: newBbs,
          },
      });
  }
else {
      await api.rawData.setSampleBoundingBoxes(project.id, sample.id, {
          boundingBoxes: newBbs,
      });
}

Troubleshooting

If none of the blocks from Edge Impulse fit your needs, you can modify them or develop from scratch to create a custom AI labeling block. This allows you to integrate your own models or prompts for unique project requirements. See the example below.

If you have a suggestion for an AI labeling block that you would like to see Edge Impulse develop, please let us know in our .

Select which data items in your dataset you want to label. You can use the attached to your data samples to define your own labeling strategy.

Use a model from an existing Edge Impulse project to label images (classification or object detection). You can also upload your pretrained models to Edge Impulse using the .

Label audio samples with multiple labels per sample using an Audio Spectrogram Transformer (AST) model trained on AudioSet. Use only AudioSet labels (see for reference).

Try our FREE today.

AI labeling blocks follow the structure. Please refer to that documentation for further details. Inputs and outputs for the block are defined below.

Passed only when the user wants to preview label changes. If passed, changes should be staged and not directly applied. Provides a job ID as an integer. See .

After cloning and modifying an existing AI labeling block or developing one from scratch, you can publish the block to your organization to make it available to everyone in your organization. Initialize the block and push it to your organization using the edge-impulse-blocks tool within the :

Update parameters.json to update the name and description of your block. See example above in the custom blocks section.

No common issues have been identified thus far. If you encounter an issue, please reach out on the or, if you are an Enterprise customer, to your Solutions engineer.

Bounding Box Labeling with OWL-ViT
Bounding Box Re-Labeling with GPT-4o
Image Labeling with GPT-4o
Image Labeling with Pretrained Models
Audio Labeling with AudioSet
forum
metadata
BYOM (Bring Your Own Model) feature
AudioSet Dataset
Enterprise Trial
Transformation blocks
Edge Impulse CLI
forum
Custom AI labeling blocks
Interface
preview mode
AI labeling actions overview page
AI labeling block configuration
AI labeling blocks
Manage secrets in a developer profile
Selecting data to run the AI labeling action on
AI labeling block OWL-ViT
AI labeling bounding box relabeling
AI labeling images with GPT-4o
AI labeling using your own models
AI labeling with AudioSet
change view icon