Getting started with EIM artifacts
To download and use an EIM artifact, you will need to first install the Edge Impulse CLI tool suite by following these instructions. From there, use the edge-impulse-linux-runner tool to download the .eim file (named modelfile.eim):--clean
argument:

Download EIM file from Edge Impulse Studio
.eim
file or call the executable directly. For example:
--print-info
argument to either the .eim
file or to edge-impulse-linux-runner
:
EIM artifact overview
The EIM file runs as a native Linux application. JSON data is passed to and from the EIM program using Unix-like sockets or standard input/output (stdio). The high-level architecture and data flow is shown below.
EIM artifact overview
Troubleshooting
Wrong OS bits
If you encounter the following error message when trying to run a .eim file, it likely means the .eim file was compiled for the incorrect system architecture:x86
) or a 64-bit CPU (e.g. x86_64
or aarch64
).
Next, check your operating system bit width:
32
for 32 bits or 64
for 64 bits. When you use the runner tool to download an .eim file, it will provide the Edge Impulse servers information about your hardware architecture. If you are using a 64-bit CPU, you will receive an .eim file compiled for 64-bit systems. Such an executable will not run on 32-bit operating systems.
To correct this, make sure that you are running a 32-bit OS on 32-bit hardware or a 64-bit OS on 64-bit hardware only.
Advanced Usage
If you would like to modify, debug, or interface with EIM artifacts on a lower level, these notes should help you get started.JSON protocol
JSON frames are used to pass data to and from the EIM executable running on your system. They can be transferred via Unix-like sockets (what edge-impulse-linux-runner uses) or standard input/output (stdio). Example frames are given below. An example dataflow of how such JSON messages are passed between the runner and EIM executable is shown below:
EIM JSON data flow

EIM JSON data flow with error condition
Runner to EIM JSON examples
Basic “hello” frame:EIM to runner JSON examples
Model info: To print this information pass the--print-info
argument.