Skip to content

Commit 7bec348

Browse files
committed
SDK release v1.66.3
1 parent a02fc80 commit 7bec348

File tree

10 files changed

+221
-87
lines changed

10 files changed

+221
-87
lines changed

EdgeImpulse.EI-SDK.pdsc

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
<name>EI-SDK</name>
66
<license>LICENSE-apache-2.0.txt</license>
77
<description>Edge Impulse SDK</description>
8-
<url>https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.65.0/</url>
8+
<url>https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.66.3/</url>
99
<supportContact>[email protected]</supportContact>
1010
<repository type="git">https://github.com/edgeimpulse/edge-impulse-sdk-pack.git</repository>
1111
<releases>
12-
<release version="1.65.0" tag="v1.65.0" date="2024-12-20" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.65.0/EdgeImpulse.EI-SDK.1.65.0.pack">
12+
<release version="1.66.3" tag="v1.66.3" date="2025-01-03" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.66.3/EdgeImpulse.EI-SDK.1.66.3.pack">
1313
EI-SDK
1414
</release>
15+
<release version="1.65.0" tag="v1.65.0" date="2024-12-20" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.65.0/EdgeImpulse.EI-SDK.1.65.0.pack">
16+
EI-SDK
17+
</release>
1518
<release version="1.64.4" tag="v1.64.4" date="2024-12-19" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.64.4/EdgeImpulse.EI-SDK.1.64.4.pack">
1619
EI-SDK
1720
</release>
@@ -98,9 +101,6 @@
98101
</release>
99102
<release version="1.52.11" tag="v1.52.11" date="2024-06-25" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.52.11/EdgeImpulse.EI-SDK.1.52.11.pack">
100103
EI-SDK
101-
</release>
102-
<release version="1.52.10" tag="v1.52.10" date="2024-06-24" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.52.10/EdgeImpulse.EI-SDK.1.52.10.pack">
103-
EI-SDK
104104
</release>
105105
</releases>
106106
<keywords>
@@ -146,7 +146,7 @@
146146
</packages>
147147
</requirements>
148148
<components>
149-
<component Cclass="EdgeImpulse" Cgroup="SDK" Cversion="1.65.0">
149+
<component Cclass="EdgeImpulse" Cgroup="SDK" Cversion="1.66.3">
150150
<description>Edge Impulse SDK</description>
151151
<!-- short component description -->
152152
<files>
@@ -387,7 +387,6 @@
387387
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/ei_signal_with_range.h"/>
388388
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/ei_fill_result_struct.h"/>
389389
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/ei_model_types.h"/>
390-
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/sdk_version.h"/>
391390
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/ei_classifier_smooth.h"/>
392391
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/ei_signal_with_axes.h"/>
393392
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/anomaly.h"/>
@@ -400,6 +399,7 @@
400399
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/tflite_full.h"/>
401400
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/ethos_linux.h"/>
402401
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/tflite_helper.h"/>
402+
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/aton.h"/>
403403
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/tflite_micro.h"/>
404404
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/tensaiflow.h"/>
405405
<file category="header" name="edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/memryx.h"/>

EdgeImpulse.pidx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<index schemaVersion="1.0.0" xs:noNamespaceSchemaLocation="PackIndex.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
33
<vendor>EdgeImpulse</vendor>
44
<url>https://raw.githubusercontent.com/edgeimpulse/edge-impulse-sdk-pack/main/</url>
5-
<timestamp>2024-12-20 15:34:16</timestamp>
5+
<timestamp>2025-01-03 12:23:57</timestamp>
66
<pindex>
7-
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.65.0/" vendor="EdgeImpulse" name="EI-SDK" version="1.65.0"/>
7+
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.66.3/" vendor="EdgeImpulse" name="EI-SDK" version="1.66.3"/>
88
</pindex>
99
</index>

edgeimpulse/edge-impulse-sdk/classifier/ei_model_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define EI_CLASSIFIER_ONNX_TIDL 11
4444
#define EI_CLASSIFIER_MEMRYX 12
4545
#define EI_CLASSIFIER_ETHOS_LINUX 13
46+
#define EI_CLASSIFIER_ATON 14
4647

4748
#define EI_CLASSIFIER_SENSOR_UNKNOWN -1
4849
#define EI_CLASSIFIER_SENSOR_MICROPHONE 1

edgeimpulse/edge-impulse-sdk/classifier/ei_run_classifier.h

+6-13
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#define _EDGE_IMPULSE_RUN_CLASSIFIER_H_
2020

2121
#include "ei_model_types.h"
22-
#include "sdk_version.h"
2322
#include "model-parameters/model_metadata.h"
2423

2524
#include "ei_run_dsp.h"
@@ -61,21 +60,14 @@
6160
#include "edge-impulse-sdk/classifier/inferencing_engines/memryx.h"
6261
#elif EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ETHOS_LINUX
6362
#include "edge-impulse-sdk/classifier/inferencing_engines/ethos_linux.h"
63+
#elif EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ATON
64+
#include "edge-impulse-sdk/classifier/inferencing_engines/aton.h"
6465
#elif EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_NONE
6566
// noop
6667
#else
6768
#error "Unknown inferencing engine"
6869
#endif
6970

70-
// strictly require sdk version and studio version macros to match
71-
#if EI_SDK_VERSION_MAJOR != EI_STUDIO_VERSION_MAJOR || EI_SDK_VERSION_MINOR != EI_STUDIO_VERSION_MINOR || EI_SDK_VERSION_PATCH != EI_STUDIO_VERSION_PATCH
72-
#if EI_SDK_VERSION_MAJOR == 0
73-
#pragma message "SDK version not set."
74-
#else
75-
#error "Version mismatch between edge-impulse-sdk and the model (model-parameters and tflite-model). Make sure you use the same version for both. Advised to download the deployment files again from Edge Impulse."
76-
#endif
77-
#endif
78-
7971
// This file has an implicit dependency on ei_run_dsp.h, so must come after that include!
8072
#include "model-parameters/model_variables.h"
8173

@@ -246,7 +238,7 @@ extern "C" EI_IMPULSE_ERROR process_impulse(ei_impulse_handle_t *handle,
246238
return EI_IMPULSE_INFERENCE_ERROR;
247239
}
248240

249-
#if (EI_CLASSIFIER_QUANTIZATION_ENABLED == 1 && (EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TFLITE || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TENSAIFLOW || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ONNX_TIDL)) || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_DRPAI
241+
#if (EI_CLASSIFIER_QUANTIZATION_ENABLED == 1 && (EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TFLITE || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TENSAIFLOW || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ONNX_TIDL) || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_DRPAI || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ATON)
250242
// Shortcut for quantized image models
251243
ei_learning_block_t block = handle->impulse->learning_blocks[0];
252244
if (can_run_classifier_image_quantized(handle->impulse, block) == EI_IMPULSE_OK) {
@@ -605,7 +597,8 @@ __attribute__((unused)) static EI_IMPULSE_ERROR can_run_classifier_image_quantiz
605597
if (impulse->inferencing_engine != EI_CLASSIFIER_TFLITE
606598
&& impulse->inferencing_engine != EI_CLASSIFIER_TENSAIFLOW
607599
&& impulse->inferencing_engine != EI_CLASSIFIER_DRPAI
608-
&& impulse->inferencing_engine != EI_CLASSIFIER_ONNX_TIDL) // check later
600+
&& impulse->inferencing_engine != EI_CLASSIFIER_ONNX_TIDL
601+
&& impulse->inferencing_engine != EI_CLASSIFIER_ATON) // check later
609602
{
610603
return EI_IMPULSE_UNSUPPORTED_INFERENCING_ENGINE;
611604
}
@@ -634,7 +627,7 @@ __attribute__((unused)) static EI_IMPULSE_ERROR can_run_classifier_image_quantiz
634627
return EI_IMPULSE_OK;
635628
}
636629

637-
#if EI_CLASSIFIER_QUANTIZATION_ENABLED == 1 && (EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TFLITE || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TENSAIFLOW || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_DRPAI || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ONNX_TIDL)
630+
#if EI_CLASSIFIER_QUANTIZATION_ENABLED == 1 && (EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TFLITE || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_TENSAIFLOW || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_DRPAI || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ONNX_TIDL || EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ATON)
638631

639632
/**
640633
* Special function to run the classifier on images, only works on TFLite models (either interpreter, EON, tensaiflow, drpai, tidl, memryx)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/*
2+
* Copyright (c) 2024 EdgeImpulse Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing,
10+
* software distributed under the License is distributed on an "AS
11+
* IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language
13+
* governing permissions and limitations under the License.
14+
*
15+
* SPDX-License-Identifier: Apache-2.0
16+
*/
17+
18+
#ifndef _EI_CLASSIFIER_INFERENCING_ENGINE_ATON_H
19+
20+
#if (EI_CLASSIFIER_INFERENCING_ENGINE == EI_CLASSIFIER_ATON)
21+
22+
/* Include ----------------------------------------------------------------- */
23+
#include "edge-impulse-sdk/tensorflow/lite/kernels/custom/tree_ensemble_classifier.h"
24+
#include "edge-impulse-sdk/classifier/ei_fill_result_struct.h"
25+
#include "edge-impulse-sdk/classifier/ei_model_types.h"
26+
#include "edge-impulse-sdk/classifier/ei_run_dsp.h"
27+
#include "edge-impulse-sdk/porting/ei_logging.h"
28+
29+
#include "ll_aton_runtime.h"
30+
#include "app_config.h"
31+
32+
/* Private variables ------------------------------------------------------- */
33+
static uint8_t *nn_in;
34+
static uint8_t *nn_out;
35+
36+
static const LL_Buffer_InfoTypeDef *nn_in_info;
37+
static const LL_Buffer_InfoTypeDef *nn_out_info;
38+
39+
LL_ATON_DECLARE_NAMED_NN_INSTANCE_AND_INTERFACE(Default);
40+
41+
42+
EI_IMPULSE_ERROR run_nn_inference_image_quantized(
43+
const ei_impulse_t *impulse,
44+
signal_t *signal,
45+
ei_impulse_result_t *result,
46+
void *config_ptr,
47+
bool debug = false)
48+
{
49+
EI_IMPULSE_ERROR fill_res = EI_IMPULSE_OK;
50+
extern uint8_t *global_camera_buffer;
51+
extern uint8_t *snapshot_buf;
52+
// this needs to be changed for multi-model, multi-impulse
53+
static bool first_run = true;
54+
55+
uint64_t ctx_start_us = ei_read_timer_us();
56+
57+
#if DATA_OUT_FORMAT_FLOAT32
58+
static float32_t *nn_out;
59+
#else
60+
static uint8_t *nn_out;
61+
#endif
62+
static uint32_t nn_out_len;
63+
64+
if(first_run == true) {
65+
66+
nn_in_info = LL_ATON_Input_Buffers_Info_Default();
67+
nn_out_info = LL_ATON_Output_Buffers_Info_Default();
68+
69+
nn_in = (uint8_t *) nn_in_info[0].addr_start.p;
70+
uint32_t nn_in_len = LL_Buffer_len(&nn_in_info[0]);
71+
nn_out = (uint8_t *) nn_out_info[0].addr_start.p;
72+
73+
74+
#if DATA_OUT_FORMAT_FLOAT32
75+
nn_out = (float32_t *) nn_out_info[0].addr_start.p;
76+
#else
77+
nn_out = (uint8_t *) nn_out_info[0].addr_start.p;
78+
#endif
79+
nn_out_len = LL_Buffer_len(&nn_out_info[0]);
80+
81+
first_run = false;
82+
}
83+
84+
memcpy(nn_in, snapshot_buf, impulse->input_width * impulse->input_height * 3);
85+
#ifdef USE_DCACHE
86+
SCB_CleanInvalidateDCache_by_Addr(nn_in, impulse->input_width * impulse->input_height * 3);
87+
#endif
88+
89+
LL_ATON_RT_Main(&NN_Instance_Default);
90+
91+
#ifdef USE_DCACHE
92+
SCB_CleanInvalidateDCache_by_Addr(nn_out, nn_out_len);
93+
#endif
94+
95+
ei_learning_block_config_tflite_graph_t *block_config = (ei_learning_block_config_tflite_graph_t *)impulse->learning_blocks[0].config;
96+
if (block_config->classification_mode == EI_CLASSIFIER_CLASSIFICATION_MODE_OBJECT_DETECTION) {
97+
switch (block_config->object_detection_last_layer) {
98+
99+
case EI_CLASSIFIER_LAST_LAYER_YOLOV5:
100+
#if MODEL_OUTPUT_IS_FLOAT
101+
fill_res = fill_result_struct_f32_yolov5(
102+
ei_default_impulse.impulse,
103+
&result,
104+
6, // hard coded for now
105+
(float *)&data,//output.data.uint8,
106+
// output.params.zero_point,
107+
// output.params.scale,
108+
ei_default_impulse.impulse->tflite_output_features_count);
109+
#else
110+
fill_res = fill_result_struct_quantized_yolov5(
111+
impulse,
112+
block_config,
113+
result,
114+
6, // hard coded for now
115+
(uint8_t *)nn_out,
116+
nn_out_info[0].offset[0],
117+
nn_out_info[0].scale[0],
118+
nn_out_len);
119+
#endif
120+
break;
121+
122+
case EI_CLASSIFIER_LAST_LAYER_FOMO:
123+
fill_res = fill_result_struct_i8_fomo(
124+
impulse,
125+
block_config,
126+
result,
127+
(int8_t *)nn_out,
128+
nn_out_info[0].offset[0],
129+
nn_out_info[0].scale[0],
130+
impulse->fomo_output_size,
131+
impulse->fomo_output_size);
132+
break;
133+
134+
default:
135+
ei_printf("ERR: Unsupported object detection last layer (%d)\n",
136+
block_config->object_detection_last_layer);
137+
fill_res = EI_IMPULSE_UNSUPPORTED_INFERENCING_ENGINE;
138+
break;
139+
}
140+
141+
}
142+
143+
result->timing.classification_us = ei_read_timer_us() - ctx_start_us;
144+
145+
return fill_res;
146+
}
147+
148+
149+
/**
150+
* @brief Do neural network inferencing over the processed feature matrix
151+
*
152+
* @param fmatrix Processed matrix
153+
* @param result Output classifier results
154+
* @param[in] debug Debug output enable
155+
*
156+
* @return The ei impulse error.
157+
*/
158+
EI_IMPULSE_ERROR run_nn_inference(
159+
const ei_impulse_t *impulse,
160+
ei_feature_t *fmatrix,
161+
uint32_t learn_block_index,
162+
uint32_t* input_block_ids,
163+
uint32_t input_block_ids_size,
164+
ei_impulse_result_t *result,
165+
void *config_ptr,
166+
bool debug = false)
167+
{
168+
169+
170+
return EI_IMPULSE_OK;
171+
}
172+
173+
#endif // EI_CLASSIFIER_INFERENCING_ENGINE
174+
#endif // _EI_CLASSIFIER_INFERENCING_ENGINE_ATON_H

edgeimpulse/edge-impulse-sdk/classifier/sdk_version.h

-42
This file was deleted.

edgeimpulse/edge-impulse-sdk/dsp/config.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
// clang-format off
3535
#ifndef EIDSP_USE_CMSIS_DSP // __ARM_ARCH_PROFILE is a predefine of arm-gcc. __TARGET_* is armcc
36-
#if defined(__MBED__) || __ARM_ARCH_PROFILE == 'M' || defined(__TARGET_CPU_CORTEX_M0) || defined(__TARGET_CPU_CORTEX_M0PLUS) || defined(__TARGET_CPU_CORTEX_M3) || defined(__TARGET_CPU_CORTEX_M4) || defined(__TARGET_CPU_CORTEX_M7) || defined(USE_HAL_DRIVER) || defined(ARDUINO_NRF52_ADAFRUIT)
36+
#if (defined(__MBED__) || __ARM_ARCH_PROFILE == 'M' || defined(__TARGET_CPU_CORTEX_M0) || defined(__TARGET_CPU_CORTEX_M0PLUS) || defined(__TARGET_CPU_CORTEX_M3) || defined(__TARGET_CPU_CORTEX_M4) || defined(__TARGET_CPU_CORTEX_M7) || defined(USE_HAL_DRIVER) || defined(ARDUINO_NRF52_ADAFRUIT)) && !defined(EI_PORTING_STM32_CUBEAI)
3737
// Mbed OS versions before 5.7 are not based on CMSIS5, disable CMSIS-DSP and CMSIS-NN instructions
3838
#if defined(__MBED__)
3939
#include "mbed_version.h"

edgeimpulse/edge-impulse-sdk/dsp/numpy.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
#define __has_include 1
2626
#endif // __has_include
2727

28+
// Arduino build defines abs as a macro. That is invalid C++, and breaks
29+
// libc++'s <complex> header, undefine it.
30+
#ifdef abs
31+
#undef abs
32+
#endif
33+
2834
#include <stdint.h>
2935
#include <string.h>
3036
#include <stddef.h>

0 commit comments

Comments
 (0)