Skip to content

Commit

Permalink
SDK release v1.54.4
Browse files Browse the repository at this point in the history
  • Loading branch information
francovaro committed Jul 24, 2024
1 parent c3a105e commit 23a4f73
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
12 changes: 6 additions & 6 deletions EdgeImpulse.EI-SDK.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
<name>EI-SDK</name>
<license>LICENSE-apache-2.0.txt</license>
<description>Edge Impulse SDK</description>
<url>https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.1/</url>
<url>https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.4/</url>
<supportContact>[email protected]</supportContact>
<repository type="git">https://github.com/edgeimpulse/edge-impulse-sdk-pack.git</repository>
<releases>
<release version="1.54.1" tag="v1.54.1" date="2024-07-18" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.1/EdgeImpulse.EI-SDK.1.54.1.pack">
<release version="1.54.4" tag="v1.54.4" date="2024-07-24" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.4/EdgeImpulse.EI-SDK.1.54.4.pack">
EI-SDK
</release>
<release version="1.54.1" tag="v1.54.1" date="2024-07-18" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.1/EdgeImpulse.EI-SDK.1.54.1.pack">
EI-SDK
</release>
<release version="1.53.14" tag="v1.53.14" date="2024-07-17" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.53.14/EdgeImpulse.EI-SDK.1.53.14.pack">
EI-SDK
</release>
Expand Down Expand Up @@ -98,9 +101,6 @@
</release>
<release version="1.49.11" tag="v1.49.11" date="2024-04-22" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.49.11/EdgeImpulse.EI-SDK.1.49.11.pack">
EI-SDK
</release>
<release version="1.49.9" tag="v1.49.9" date="2024-04-17" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.49.9/EdgeImpulse.EI-SDK.1.49.9.pack">
EI-SDK
</release>
</releases>
<keywords>
Expand Down Expand Up @@ -146,7 +146,7 @@
</packages>
</requirements>
<components>
<component Cclass="EdgeImpulse" Cgroup="SDK" Cversion="1.54.1">
<component Cclass="EdgeImpulse" Cgroup="SDK" Cversion="1.54.4">
<description>Edge Impulse SDK</description>
<!-- short component description -->
<files>
Expand Down
4 changes: 2 additions & 2 deletions EdgeImpulse.pidx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<index schemaVersion="1.0.0" xs:noNamespaceSchemaLocation="PackIndex.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
<vendor>EdgeImpulse</vendor>
<url>https://raw.githubusercontent.com/edgeimpulse/edge-impulse-sdk-pack/main/</url>
<timestamp>2024-07-18 14:42:06</timestamp>
<timestamp>2024-07-24 12:24:56</timestamp>
<pindex>
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.1/" vendor="EdgeImpulse" name="EI-SDK" version="1.54.1"/>
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.4/" vendor="EdgeImpulse" name="EI-SDK" version="1.54.4"/>
</pindex>
</index>
20 changes: 11 additions & 9 deletions edgeimpulse/edge-impulse-sdk/classifier/ei_model_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ typedef struct {
extract_fn_t extract_fn;
void *config;
uint8_t *axes;
size_t axes_size;
uint8_t axes_size;
int version; // future proof, can easily add to this struct now
DspHandle* (*factory)(void* config, float sampling_freq); // nullptr means no state
// v1 ends here
Expand All @@ -126,7 +126,7 @@ typedef struct {
void *config;
int image_scaling;
const uint32_t* input_block_ids;
const uint32_t input_block_ids_size;
const uint8_t input_block_ids_size;
uint32_t output_features_count;
} ei_learning_block_t;

Expand Down Expand Up @@ -208,7 +208,9 @@ typedef struct ei_impulse {
uint32_t project_id;
const char *project_owner;
const char *project_name;
uint32_t deploy_version;
uint16_t impulse_id;
const char *impulse_name;
uint16_t deploy_version;

/* DSP details */
uint32_t nn_input_frame_size;
Expand All @@ -220,7 +222,7 @@ typedef struct ei_impulse {
uint32_t input_frames;
float interval_ms;
float frequency;
size_t dsp_blocks_size;
uint8_t dsp_blocks_size;
ei_model_dsp_t *dsp_blocks;

/* object detection */
Expand All @@ -229,20 +231,20 @@ typedef struct ei_impulse {
uint32_t tflite_output_features_count;

/* learning blocks */
const size_t learning_blocks_size;
const uint8_t learning_blocks_size;
const ei_learning_block_t *learning_blocks;

/* inference parameters */
uint32_t inferencing_engine;
uint8_t inferencing_engine;

/* sensors and on-device inference */
uint32_t sensor;
uint8_t sensor;
const char *fusion_string;
uint32_t slice_size;
uint32_t slices_per_model_window;
uint8_t slices_per_model_window;

/* output details */
uint16_t has_anomaly;
uint8_t has_anomaly;
uint16_t label_count;
const ei_model_performance_calibration_t calibration;
const char **categories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ int printTensorInfo(Ort::Session *session, std::vector<const char *> *input_node
Ort::TypeInfo type_info = (*session).GetInputTypeInfo(0);
auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
std::vector<int64_t> input_node_dims = tensor_info.GetShape();
ei_printf("LOG_INFO: number of inputs:%d \n", num_input_nodes);
ei_printf("LOG_INFO: number of outputs: %d\n", num_output_nodes);
ei_printf("LOG_INFO: number of inputs: %d\n", (int)num_input_nodes);
ei_printf("LOG_INFO: number of outputs: %d\n", (int)num_output_nodes);
ei_printf("LOG_INFO: input(0) name: %s\n", (*input_node_names)[0]);

Ort::TypeInfo type_info_out = (*session).GetOutputTypeInfo(0);
auto tensor_info_out = type_info_out.GetTensorTypeAndShapeInfo();
std::vector<int64_t> output_node_dims = tensor_info_out.GetShape();
/* iterate over all input nodes */
for (int i = 0; i < num_input_nodes; i++)
for (int i = 0; i < (int)num_input_nodes; i++)
{
/* print input node names */
ei_printf("LOG_INFO: Input %d : name=%s\n", i, (*input_node_names)[i]);
Expand All @@ -110,7 +110,7 @@ int printTensorInfo(Ort::Session *session, std::vector<const char *> *input_node
return EI_IMPULSE_ONNX_ERROR;
}

for (int i = 0; i < num_output_nodes; i++)
for (int i = 0; i < (int)num_output_nodes; i++)
{
/* print output node names */
ei_printf("LOG_INFO: Output %d : name=%s\n", i, (*output_node_names)[i]);
Expand All @@ -124,7 +124,7 @@ int printTensorInfo(Ort::Session *session, std::vector<const char *> *input_node
/* print output shapes/dims */
output_node_dims = tensor_info.GetShape();
ei_printf("LOG_INFO: Output %d : num_dims=%zu\n", i, output_node_dims.size());
for (int j = 0; j < output_node_dims.size(); j++)
for (int j = 0; j < (int)output_node_dims.size(); j++)
{
ei_printf("LOG_INFO: Output %d : dim %d=%jd\n", i, j, output_node_dims[j]);
}
Expand Down Expand Up @@ -243,11 +243,11 @@ static EI_IMPULSE_ERROR inference_onnx_setup(
/* output information */
size_t num_output_nodes = session->GetOutputCount();
std::vector<const char *> output_node_names(num_output_nodes);
for (int i = 0; i < num_output_nodes; i++)
for (int i = 0; i < (int)num_output_nodes; i++)
{
output_node_names[i] = session->GetOutputName(i, allocator);
}
for (int i = 0; i < num_input_nodes; i++)
for (int i = 0; i < (int)num_input_nodes; i++)
{
input_node_names[i] = session->GetInputName(i, allocator);
}
Expand Down Expand Up @@ -296,7 +296,7 @@ static EI_IMPULSE_ERROR inference_onnx_setup(
*binding_ptr = binding;
binding->BindInput(input_node_names[0], (*input_tensors)[0]);

for(int idx=0; idx < num_output_nodes; idx++)
for(int idx=0; idx < (int)num_output_nodes; idx++)
{
auto node_dims = output_tensors_warm_up[idx].GetTypeInfo().GetTensorTypeAndShapeInfo().GetShape();
size_t tensor_size = 1;
Expand Down

0 comments on commit 23a4f73

Please sign in to comment.