Skip to main content

Edge Impulse

Edge Impulse streamlines the creation of AI and machine learning models for edge hardware, allowing devices to make decisions and offer insight where data is gathered.

As part of the partnership between Golioth and Edge Impulse, the Golioth Edge Impulse Demo details how the two platforms work well together to stream classification results to the cloud, and collect raw sensor readings for future model training.

Sending Classification Results to LightDB Stream

The following example demonstrates sending classification readings to LightDB Stream as a CBOR payload using class as the path.

Example classification data:

CBOR data displayed as JSON for documentation purposes only.

{
"idle": 0.28515625,
"snake": 0.16796875,
"updown": 0.21875,
"wave": 0.328125
}
filter:
path: "/class"
content_type: application/cbor
steps:
- name: convert-send
transformer:
type: cbor-to-json
version: v1
destination:
type: lightdb-stream
version: v1

Sending Raw Accelerometer Readings to Amazon S3

The example demonstrates sending raw accelerometer readings as binary (octet-stream) data to an Amazon Web Services S3 bucket.

Details on how the device sends raw data to Golioth are available in the firmware example, specifically:

info

Make sure to create secrets named AWS_ACCESS_KEY and AWS_SECRET_KEY with the appropriate credentials. Replace <my-bucket-name> and <my-bucket-region> with values that match your S3 bucket.

filter:
path: "/accel"
steps:
- name: send-s3
destination:
type: aws-s3
version: v1
parameters:
name: <my-bucket-name>
access_key: $AWS_ACCESS_KEY
access_secret: $AWS_SECRET_KEY
region: <my-bucket-region>