edgeimpulse / edge-impulse-cli Goto Github PK
View Code? Open in Web Editor NEWCommand line interface tools for Edge Impulse
License: Apache License 2.0
Command line interface tools for Edge Impulse
License: Apache License 2.0
after trying install several versions of node and libs, try to compile edge-impulse-cli from source but with the same problem:
the request-promise package is deprecated and severe error gives error in exec of cli
an alternative updated to old request lib??
thanks in advance
j
Current set up:
Arduino Uno with Gyroscope and Accelerometer printing to the serial. Baud Rate 115200. Frequency set at 50Hz
Macbook running Big Sur OS
When I run edge-impulse-data-forwarder
I get this error:
[SER] Detecting data frequency...
[SER] Failed to get information off device No valid sensor readings received from device. Note that the data forwarder can only auto-detect frequencies >2Hz. You can override the frequency via --frequency
When I run edge-impulse-data-forwarder --frequency 50
I get the same error
When I run edge-impulse-data-forwarder --frequency 1
this runs and I get this message:
[SER] Detected data frequency: 21.6Hz
[SER] Sampling frequency seems to have changed (was 50Hz, but is now 21.6Hz), re-configuring device.
[SER] Detecting data frequency...
[SER] Detected data frequency: 50Hz
? 6 sensor axes detected (example values: [13292,7764,3552,-3216,-72,-113]). Wha
t do you want to call them? Separate the names with ',': a_x,a_y,a_z,g_x,g_y,g_z
[SER] Overriding frequency to 1Hz (via --frequency)
So I can currently only run the program if I override the frequency to 1hz. Is this a limitation with my setup or a problem in the frequency detection of Edge Impulse?
Thanks!
btw my arduino code looks like this
#include <Wire.h>
const int MPU = 0x68;
int16_t AcX, AcY, AcZ, Tmp, GyX, GyY, GyZ;
#define CONVERT_G_TO_MS2 9.80665f
#define FREQUENCY_HZ 50
#define INTERVAL_MS (1000 / (FREQUENCY_HZ + 1))
static unsigned long last_interval_ms = 0;
void setup() {
Wire.begin();
Wire.beginTransmission(MPU);
Wire.write(0x6B);
Wire.write(0);
Wire.endTransmission(true);
Serial.begin(115200);
}
void loop() {
if (millis() > last_interval_ms + INTERVAL_MS) {
last_interval_ms = millis();
Wire.beginTransmission(MPU);
Wire.write(0x3B);
Wire.endTransmission(false);
Wire.requestFrom(MPU, 12, true);
AcX = Wire.read() << 8 | Wire.read();
AcY = Wire.read() << 8 | Wire.read();
AcZ = Wire.read() << 8 | Wire.read();
GyX = Wire.read() << 8 | Wire.read();
GyY = Wire.read() << 8 | Wire.read();
GyZ = Wire.read() << 8 | Wire.read();
// Accelerometer
Serial.print(AcX);
Serial.print(",");
Serial.print(AcY);
Serial.print(",");
Serial.print(AcZ);
Serial.print(",");
// Gyroscope
Serial.print(GyX);
Serial.print(",");
Serial.print(GyY);
Serial.print(",");
Serial.println(GyZ);
}
}
Describe what should happen
According to the CLI documentation, uploaded sample files can be named as LABEL.NAME.XYZ
where:
LABEL
is the label that should be assigned to the sampleNAME
is a custom name assigned by the user and,XYZ
is one of the supported file extensionsOnce uploaded, the names of the files are displayed LABEL.NAME.XYZ.HASH
, where HASH
is a unique string added during upload, which ensures no files have duplicate names
Describe what happens instead of the expected behaviour
When uploading via the EI Studio GUI, everything works as expected. However, when uploading via the edge-impulse-uploader
CLI, the NAME
part of the file is omitted. This prevents the sample from being identified as the user intended. In the example below, the original name of the sample uploaded via edge-impulse-uploader
was NO.s13256.png
Suggest one or more fixes/reasons for the issue
Seems like a minor regex or string formatting issue
Provide a link to a test/example, or a set of steps to follow
F1,F2
0,1
label.name1.csv
label.name2.csv
edge-impulse-uploader
commandnpm installation fails under newer M1 archs:
npm ERR! code 1 npm ERR! path /opt/homebrew/lib/node_modules/edge-impulse-cli/node_modules/sharp npm ERR! command failed npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o npm ERR! LIBTOOL-STATIC Release/nothing.a npm ERR! TOUCH Release/obj.target/libvips-cpp.stamp npm ERR! CXX(target) Release/obj.target/sharp/src/common.o npm ERR! info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-darwin-arm64v8.tar.brnpm ERR! ERR! sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8
...vips8 not found
Issue from a forum thread: https://forum.edgeimpulse.com/t/cli-data-forwarder-frequency-off-by-one/2293
I just had a look at the source code here:
edge-impulse-cli/cli/data-forwarder.ts
Line 590 in 840c0ea
I do not see anything that could increase the frequency by 1 except maybe the let l = lines[1];
Trying to execute the following command on a Raspberry Pi...
edge-impulse-linux-runner --download modelfile.eim
...results in an "unsupported architecture" error that seems to contradict itself:
[RUN] Failed to run impulse Error: Unsupported architecture "aarch64", only armv7l or aarch64 supported for now
at RunnerDownloader.getDownloadType (/usr/lib/node_modules/edge-impulse-linux/build/cli/linux/runner-downloader.js:31:27)
at async RunnerDownloader.getLastDeploymentVersion (/usr/lib/node_modules/edge-impulse-linux/build/cli/linux/runner-downloader.js:55:28)
at async /usr/lib/node_modules/edge-impulse-linux/build/cli/linux/runner.js:123:31
Hi ,
I have been using Edge Impulse CLI on my Ubuntu VM which works greatly. But yesterday I tried out the same on my Windows host machine and it turns out that there are some errors in the guide for installing Edge Impulse CLI. "$" is only used in Linux/Unix based systems. In Windows machines it shows errors. Here's the one below.
Can I do a pull request to change the same in the Readme for this repo for solving the error ?
(tensorflow) [11:03:39] carl@Carls-MacBook-Pro ~/Downloads/ei-reference-objdet-traffic-cam-object-detection_mobilenetv2ssd edge-impulse-blocks init
Edge Impulse Blocks v1.14.13
? In which organization do you want to create this block? Carl
Attaching block to organization 'Carl'
? Choose a type of block Machine learning block
? Choose an option Create a new block
? Enter the name of your block mobilenetv2ssd_retest
? Enter the description of your block testing
? What type of data does this model operate on? Object Detection
? What's the last layer of this object detection model? MobileNet SSD
Your new block 'mobilenetv2ssd_retest' has been created in '/Users/carl/Downloads/ei-reference-objdet-traffic-cam-object-detection_mobilenetv2ssd'.
When you have finished building your transferLearning block, run 'edge-impulse-blocks push' to update the block in Edge Impulse.
(tensorflow) [11:07:22] carl@Carls-MacBook-Pro ~/Downloads/ei-reference-objdet-traffic-cam-object-detection_mobilenetv2ssd edge-impulse-blocks push
Edge Impulse Blocks v1.14.13
Unable to add the block to your organization: invalid input value for enum studio.organization_transfer_learning_blocks_object_detection_last_lay: "mobilenet_ssd"
Fixed it by changing mobilenet_ssd
to mobilenet-ssd
in .ei-block-config
It would be really helpful if edge-impulse-blocks init
detected a ei-block-config.json file in the repo and pulled the details from here rather than having to go through the interactive steps.
Hi,
i get this error.
root@Ubuntu:~/Downloads# eta-flash-tool --firmware-path eta-compute-ecm3532-ai-sensor.bin
[ETA] Connecting to /dev/ttyUSB0...
[ETA] Connected, restarting into bootloader...
[ETA] Not in bootloader mode yet... Restarting into bootloader at baud rate 460800...
Failed to restart into the bootloader. Press the RESET button on your AI Sensor
(the LEDs should be blinking) and run this application again.
root@Ubuntu:~/Downloads#
i took care of required installation. POR button reset also does not help. my board is not detected on dashboard.
might be nicer aesthetically if edge-impulse-config.json
is a ~/.edge-impulse-config.json
file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.