Skip to content

Commit 1c0a9cf

Browse files
committed
SDK release v1.53.12
1 parent 3efbb7a commit 1c0a9cf

File tree

10 files changed

+278
-205
lines changed

10 files changed

+278
-205
lines changed

EdgeImpulse.EI-SDK.pdsc

+6-6
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.53.7/</url>
8+
<url>https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.12/</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.53.7" tag="v1.53.7" date="2024-07-05" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.7/EdgeImpulse.EI-SDK.1.53.7.pack">
12+
<release version="1.53.12" tag="v1.53.12" date="2024-07-10" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.12/EdgeImpulse.EI-SDK.1.53.12.pack">
1313
EI-SDK
1414
</release>
15+
<release version="1.53.7" tag="v1.53.7" date="2024-07-05" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.7/EdgeImpulse.EI-SDK.1.53.7.pack">
16+
EI-SDK
17+
</release>
1518
<release version="1.53.5" tag="v1.53.5" date="2024-07-03" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.5/EdgeImpulse.EI-SDK.1.53.5.pack">
1619
EI-SDK
1720
</release>
@@ -98,9 +101,6 @@
98101
</release>
99102
<release version="1.49.3" tag="v1.49.3" date="2024-04-09" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.49.3/EdgeImpulse.EI-SDK.1.49.3.pack">
100103
EI-SDK
101-
</release>
102-
<release version="1.49.0" tag="v1.49.0" date="2024-04-03" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.49.0/EdgeImpulse.EI-SDK.1.49.0.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.53.7">
149+
<component Cclass="EdgeImpulse" Cgroup="SDK" Cversion="1.53.12">
150150
<description>Edge Impulse SDK</description>
151151
<!-- short component description -->
152152
<files>

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-07-05 09:15:15</timestamp>
5+
<timestamp>2024-07-10 16:14:04</timestamp>
66
<pindex>
7-
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.7/" vendor="EdgeImpulse" name="EI-SDK" version="1.53.7"/>
7+
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.12/" vendor="EdgeImpulse" name="EI-SDK" version="1.53.12"/>
88
</pindex>
99
</index>

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

+39-34
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,32 @@
2828

2929
/**
3030
* @defgroup ei_structs Structs
31-
*
31+
*
3232
* Public-facing structs for Edge Impulse C++ SDK.
33-
*
33+
*
3434
* @addtogroup ei_structs
3535
* @{
3636
*/
3737

3838
/**
3939
* @brief Holds the output of inference, anomaly results, and timing information.
40-
*
40+
*
4141
* `ei_impulse_result_t` holds the output of `run_classifier()`. If object detection is
4242
* enabled, then the output results is a
4343
* pointer to an array of bounding boxes of size `bounding_boxes_count`, as given by
4444
* [ei_impulse_result_bounding_box_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_bounding_box_t).
4545
* Otherwise, results are stored as an array of classification scores, as given by
4646
* [ei_impulse_result_classification_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_classification_t).
47-
*
47+
*
4848
* If anomaly detection is enabled (e.g. `EI_CLASSIFIER_HAS_ANOMALY == 1`), then the
4949
* anomaly score will be stored as a floating point value in `anomaly`.
50-
*
51-
* Timing information is stored in an
50+
*
51+
* Timing information is stored in an
5252
* [ei_impulse_result_timing_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_timing_t)
5353
* struct.
54-
*
54+
*
5555
* **Source**: [classifier/ei_classifier_types.h](https://github.com/edgeimpulse/inferencing-sdk-cpp/blob/master/classifier/ei_classifier_types.h)
56-
*
56+
*
5757
* **Example**: [standalone inferencing main.cpp](https://github.com/edgeimpulse/example-standalone-inferencing/blob/master/source/main.cpp)
5858
*/
5959
typedef struct {
@@ -70,16 +70,16 @@ typedef struct {
7070

7171
/**
7272
* @brief Holds the output of visual anomaly detection (FOMO-AD)
73-
*
73+
*
7474
* If visual anomaly detection is enabled (e.g. `EI_CLASSIFIER_HAS_VISUAL_ANOMALY ==
75-
* 1`), then the output results will be a pointer to an array of grid cells of size
76-
* `visual_ad_count`, as given by
75+
* 1`), then the output results will be a pointer to an array of grid cells of size
76+
* `visual_ad_count`, as given by
7777
* [ei_impulse_result_bounding_box_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_bounding_box_t).
78-
*
78+
*
7979
* The visual anomaly detection result is stored in `visual_ad_result`, which contains the mean and max values of the grid cells.
80-
*
80+
*
8181
* **Source**: [classifier/ei_classifier_types.h](https://github.com/edgeimpulse/inferencing-sdk-cpp/blob/master/classifier/ei_classifier_types.h)
82-
*
82+
*
8383
* **Example**: [standalone inferencing main.cpp](https://github.com/edgeimpulse/example-standalone-inferencing/blob/master/source/main.cpp)
8484
*/
8585
typedef struct {
@@ -96,7 +96,7 @@ typedef struct {
9696

9797
/**
9898
* @brief Holds information for a single bounding box.
99-
*
99+
*
100100
* If object detection is enabled (i.e. `EI_CLASSIFIER_OBJECT_DETECTION == 1`), then
101101
* inference results will be one or more bounding boxes. The bounding boxes with the
102102
* highest confidence scores (assuming those scores are equal to or greater than
@@ -105,20 +105,20 @@ typedef struct {
105105
* least `EI_CLASSIFIER_OBJECT_DETECTION_COUNT`. The exact number of bounding boxes
106106
* is stored in `bounding_boxes_count` field of [ei_impulse_result_t]/C++ Inference
107107
* SDK Library/structs/ei_impulse_result_t.md).
108-
*
109-
* A bounding box is a rectangle that ideally surrounds the identified object. The
108+
*
109+
* A bounding box is a rectangle that ideally surrounds the identified object. The
110110
* (`x`, `y`) coordinates in the struct identify the top-left corner of the box.
111111
* `label` is the predicted class with the highest confidence score. `value` is the
112112
* confidence score between [0.0..1.0] of the given `label`.
113-
*
113+
*
114114
* **Source**: [classifier/ei_classifier_types.h](https://github.com/edgeimpulse/inferencing-sdk-cpp/blob/master/classifier/ei_classifier_types.h)
115-
*
115+
*
116116
* **Example**: [standalone inferencing main.cpp](https://github.com/edgeimpulse/example-standalone-inferencing/blob/master/source/main.cpp)
117117
*/
118118
typedef struct {
119119
/**
120-
* Pointer to a character array describing the associated class of the given
121-
* bounding box. Taken from one of the elements of
120+
* Pointer to a character array describing the associated class of the given
121+
* bounding box. Taken from one of the elements of
122122
* `ei_classifier_inferencing_categories[]`.
123123
*/
124124
const char *label;
@@ -151,19 +151,19 @@ typedef struct {
151151

152152
/**
153153
* @brief Holds timing information about the processing (DSP) and inference blocks.
154-
*
154+
*
155155
* Records timing information during the execution of the preprocessing (DSP) and
156156
* inference blocks. Can be used to determine if inference will meet timing requirements
157157
* on your particular platform.
158-
*
158+
*
159159
* **Source**: [classifier/ei_classifier_types.h](https://github.com/edgeimpulse/inferencing-sdk-cpp/blob/master/classifier/ei_classifier_types.h)
160-
*
160+
*
161161
* **Example**: [standalone inferencing main.cpp](https://github.com/edgeimpulse/example-standalone-inferencing/blob/master/source/main.cpp)
162162
*/
163163
typedef struct {
164164
/**
165165
* If using `run_impulse()` to perform sampling and inference, it is the amount of
166-
* time (in milliseconds) it took to fetch raw samples. Not used for
166+
* time (in milliseconds) it took to fetch raw samples. Not used for
167167
* `run_classifier()`.
168168
*/
169169
int sampling;
@@ -203,23 +203,23 @@ typedef struct {
203203

204204
/**
205205
* @brief Holds the output of inference, anomaly results, and timing information.
206-
*
206+
*
207207
* `ei_impulse_result_t` holds the output of `run_classifier()`. If object detection is
208208
* enabled (e.g. `EI_CLASSIFIER_OBJECT_DETECTION == 1`), then the output results is a
209209
* pointer to an array of bounding boxes of size `bounding_boxes_count`, as given by
210-
* [ei_impulse_result_bounding_box_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_bounding_box_t).
210+
* [ei_impulse_result_bounding_box_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_bounding_box_t).
211211
* Otherwise, results are stored as an array of classification scores, as given by
212212
* [ei_impulse_result_classification_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_classification_t).
213-
*
213+
*
214214
* If anomaly detection is enabled (e.g. `EI_CLASSIFIER_HAS_ANOMALY == 1`), then the
215215
* anomaly score will be stored as a floating point value in `anomaly`.
216-
*
217-
* Timing information is stored in an
218-
* [ei_impulse_result_timing_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_timing_t)
216+
*
217+
* Timing information is stored in an
218+
* [ei_impulse_result_timing_t](https://docs.edgeimpulse.com/reference/ei_impulse_result_timing_t)
219219
* struct.
220-
*
220+
*
221221
* **Source**: [classifier/ei_classifier_types.h](https://github.com/edgeimpulse/inferencing-sdk-cpp/blob/master/classifier/ei_classifier_types.h)
222-
*
222+
*
223223
* **Example**: [standalone inferencing main.cpp](https://github.com/edgeimpulse/example-standalone-inferencing/blob/master/source/main.cpp)
224224
*/
225225
typedef struct {
@@ -238,13 +238,18 @@ typedef struct {
238238
* Array of classification results. If object detection is enabled, this will be
239239
* empty.
240240
*/
241+
#ifdef EI_DSP_RESULT_OVERRIDE
242+
// For CI only. We will create the array to hold results
243+
ei_impulse_result_classification_t* classification;
244+
#else
241245
#if EI_CLASSIFIER_LABEL_COUNT == 0
242246
// EI_CLASSIFIER_LABEL_COUNT can be 0 for anomaly only models
243247
// to prevent compiler warnings/errors, we need to have at least one element
244248
ei_impulse_result_classification_t classification[1];
245249
#else
246250
ei_impulse_result_classification_t classification[EI_CLASSIFIER_LABEL_COUNT];
247-
#endif
251+
#endif // EI_CLASSIFIER_LABEL_COUNT == 0
252+
#endif // EI_DSP_RESULT_OVERRIDE else
248253

249254
/**
250255
* Anomaly score. If anomaly detection is not enabled, this will be 0. A higher

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -374,15 +374,24 @@ __attribute__((unused)) static EI_IMPULSE_ERROR fill_result_struct_f32(const ei_
374374
ei_impulse_result_t *result,
375375
float *data,
376376
bool debug) {
377-
for (uint32_t ix = 0; ix < impulse->label_count; ix++) {
377+
#ifdef EI_DSP_RESULT_OVERRIDE
378+
uint32_t stop_count = EI_DSP_RESULT_OVERRIDE;
379+
#else
380+
uint32_t stop_count = impulse->label_count;
381+
#endif
382+
for (uint32_t ix = 0; ix < stop_count; ix++) {
383+
378384
float value = data[ix];
379385

380386
if (debug) {
381387
ei_printf("%s:\t", impulse->categories[ix]);
382388
ei_printf_float(value);
383389
ei_printf("\n");
384390
}
391+
// For testing purposes, we will have more values than labels
392+
#ifndef EI_DSP_RESULT_OVERRIDE
385393
result->classification[ix].label = impulse->categories[ix];
394+
#endif
386395
result->classification[ix].value = value;
387396
}
388397

0 commit comments

Comments
 (0)