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
  • Upload data from the studio
  • Uploading via the CLI
  • Category
  • Labeling
  • Custom labeling and metadata
  • Other dataset annotation formats
  • Clearing configuration
  • API Key
  • Bounding boxes
  • Upload data from OpenMV datasets
  • Other options
  • Uploading large datasets
  1. Tools
  2. Edge Impulse CLI

Uploader

PreviousSerial daemonNextData forwarder

Last updated 6 months ago

The uploader signs local files and uploads them to the . This is useful to upload existing data samples and entire datasets, or to migrate data between Edge Impulse instances.

The uploader currently handles these types of files:

  • .cbor - Files in the Edge Impulse . The uploader will not resign these files, only upload them.

  • .json - Files in the Edge Impulse . The uploader will not resign these files, only upload them.

  • .csv - Files in the Edge Impulse . If you have configured the "CSV wizard", the settings will be used to parse your CSV files.

  • .wav - Lossless audio files. It's recommended to use the same frequency for all files in your data set, as signal processing output might be dependent on the frequency.

  • .jpg and .png - Image files. It's recommended to use the same ratio for all files in your data set.

  • .mp4 and .avi- Video file. You can then from the studio split this video file into images at a configurable frame per second.

The uploader currently handles these types of :

Need more?

Upload data from the studio

Uploading via the CLI

You can upload files via the Edge Impulse CLI via:

edge-impulse-uploader path/to/a/file.wav

You can upload multiple files in one go via glob patterns:

# Upload any wave files in a single directory
edge-impulse-uploader path/to/many/*.wav
# Another example, upload any wave in any subdirectory
edge-impulse-uploader **/*.wav

Or by specifying the directory:

edge-impulse-uploader --directory {path}

Category

Files are automatically uploaded to the training category, but you can override the category with the --category option. E.g.:

edge-impulse-uploader --category testing path/to/a/file.wav

Or set the category to split to automatically split data between training and testing sets (recommended for a balanced dataset). This is based on the hash of the file, so this is a deterministic process.

Labeling

edge-impulse-uploader --label noise path/to/a/file.wav

Custom labeling and metadata

When a labeling method is not provided, the labels are automatically inferred from the filename through the following regex: ^[a-zA-Z0-9\s-_]+. For example: idle.01 will yield the label idle.

Thus, if you want to use labels (string values) containing float values (e.g. "0.01", "5.02", etc...), automatic labeling won't work.

To bypass this limitation, you can make a JSON file containing your dataset files' info. We also support adding metadata to your samples:

info.labels

{
    "version": 1,
    "files": [{
        "path": "path1.csv",
        "category": "split",
        "label": { "type": "label", "label": "0.5" },
        "metadata": {
            "site_collected": "Amsterdam"
        }
    }, {
        "path": "path2.csv",
        "category": "split",
        "label": { "type": "label", "label": "0.7" },
        "metadata": {
            "site_collected": "Paris"
        }
    }]
}
  • Metadata field is optional

  • To upload unlabeled data use "label": { "type": "unlabeled" }

  • To upload multi-label data use

"label": {
    "type": "multi-label",
    "labels": [
        {
            "label": "noise",
            "startIndex": 0,
            "endIndex": 5000
        },
        {
            "label": "nominal_mode",
            "startIndex": 5001
            "endIndex": 60000 
        },
        {
            "label": "defect",
            "startIndex": 60001
            "endIndex": 60200 
        }
    ],

And then use:

edge-impulse-uploader --info-file info.labels

Other dataset annotation formats

(available since Edge Impulse CLI v1.21)

You can upload directories of data in a range of different formats:

edge-impulse-uploader --directory {path}
edge-impulse-uploader --directory {path} --dataset-format {name}

Clearing configuration

To clear the configuration, run:

edge-impulse-uploader --clean

This resets the uploader configuration and will prompt you to log in again.

API Key

You can use an API key to authenticate with:

edge-impulse-uploader --api-key ei_...

Note that this resets the uploader configuration and automatically configures the uploader's account and project.

Bounding boxes

{
    "version": 1,
    "type": "bounding-box-labels",
    "boundingBoxes": {
        "mypicture.jpg": [{
            "label": "jan",
            "x": 119,
            "y": 64,
            "width": 206,
            "height": 291
        }, {
            "label": "sami",
            "x": 377,
            "y": 270,
            "width": 158,
            "height": 165
        }]
    }
}

You can have multiple keys under the boundingBoxes object, one for each file name. If you have data in multiple folders, you can create a bounding_boxes.labels in each folder.

You don't need to upload bounding_boxes.labels

When uploading one or more images, we check whether a labels file is present in the same folder, and automatically attach the bounding boxes to the image.

So you can just do:

edge-impulse-uploader yourimage.jpg

or

edge-impulse-uploader *

Let the Studio do the work for you!

Unsure about the structure of the bounding boxes file? Label some data in the studio, then export this data by selecting Dashboard > Export. The bounding_boxes.labels file will be included in the exported archive.

Upload data from OpenMV datasets

The uploader data in the OpenMV dataset format. Pass in the option --format-openmv and pass the folder of your dataset in to automatically upload data. Data is automatically split between testing and training sets. E.g.:

$ edge-impulse-uploader --format-openmv path/to/your-openmv-dataset

Other options

  • --silent - omits information on startup. Still prints progress information.

  • --dev - lists development servers, use in conjunction with --clean.

  • --hmac-key <key> - set the HMAC key, only used for files that need to be signed such as wav files.

  • --concurrency <count> - number of files to uploaded in parallel (default: 20).

  • --progress-start-ix <index> - when set, the progress index will start at this number. Useful to split up large uploads in multiple commands while the user still sees this as one command.

  • --progress-end-ix <index> - when set, the progress index will end at this number. Useful to split up large uploads in multiple commands while the user still sees this as one command.

  • --progress-interval <interval> - when set, the uploader will not print an update for every line, but every interval period (in ms.).

  • --allow-duplicates - to avoid pollution of your dataset with duplicates, the hash of a file is checked before uploading against known files in your dataset. Enable this flag to skip this check.

Uploading large datasets

When using command line wildcards to upload large datasets you may encounter an error similar to this one:

edge-impulse-uploader *.wav
zsh: argument list too long: edge-impulse-uploader

This happens if the number of .wav files exceeds the total number of arguments allowed for a single command on your shell. You can easily work around this shell limitation by using the find command to call the uploader for manageable batches of files:

find . -name "*.wav" -print0 | xargs -0 edge-impulse-uploader

You can include any necessary flags by appending them to the xargs portion, for example if you wish to specify a category:

find training -name "*.wav" -print0 | xargs -0 edge-impulse-uploader --category training

If none of these above choices are suitable for your project, you can also have a look at the Transformation blocks to parse your data samples to create a dataset supported by Edge Impulse. See

You can also upload data directly from the studio, see . Go to the Data acquisition page, and click the 'upload' icon. You can select files or folders, the category and the label directly from here.

The first time you'll be prompted for a server, and your login credentials (see for more information).

A label is automatically inferred from the file name, see the . You can override this with the --label option. E.g.:

By default, we try to automatically detect your dataset annotation format from the . If we cannot detect it, the uploader will output the list of formats. You can then use:

In July 2023, we added support for many other . Below is an example of the default Edge Impulse object detection format.

If you want to upload data for , the uploader can label the data for you as it uploads it. To do this, all you need is to create a bounding_boxes.labels file in the same folder as your image files. The contents of this file are formatted as JSON with the following structure:

Building your Transformation Blocks
Studio uploader
Edge Impulse Daemon
Ingestion service documentation
object detection
ingestion service
Data Acquisition format
Data Acquisition format
Comma Separated Values (CSV) format
dataset annotation formats
Unlabeled
Edge Impulse exporter format
Edge Impulse object detection dataset
COCO JSON
Open Images CSV
Pascal VOC XML
Plain CSV
YOLO TXT
supported ones
image dataset annotation formats