From 23a4f73615009ec3aaf565b764310cefe0f53f9e Mon Sep 17 00:00:00 2001 From: francovaro Date: Wed, 24 Jul 2024 12:25:49 +0200 Subject: [PATCH] SDK release v1.54.4 --- EdgeImpulse.EI-SDK.pdsc | 12 +++++------ EdgeImpulse.pidx | 4 ++-- .../classifier/ei_model_types.h | 20 ++++++++++--------- .../inferencing_engines/onnx_tidl.h | 16 +++++++-------- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/EdgeImpulse.EI-SDK.pdsc b/EdgeImpulse.EI-SDK.pdsc index 11aa920..b401b55 100644 --- a/EdgeImpulse.EI-SDK.pdsc +++ b/EdgeImpulse.EI-SDK.pdsc @@ -5,13 +5,16 @@ EI-SDK LICENSE-apache-2.0.txt Edge Impulse SDK - https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.1/ + https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.54.4/ hello@edgeimpulse.com https://github.com/edgeimpulse/edge-impulse-sdk-pack.git - + EI-SDK + + EI-SDK + EI-SDK @@ -98,9 +101,6 @@ EI-SDK - - - EI-SDK @@ -146,7 +146,7 @@ - + Edge Impulse SDK diff --git a/EdgeImpulse.pidx b/EdgeImpulse.pidx index 3c873d0..2f4e788 100644 --- a/EdgeImpulse.pidx +++ b/EdgeImpulse.pidx @@ -2,8 +2,8 @@ EdgeImpulse https://raw.githubusercontent.com/edgeimpulse/edge-impulse-sdk-pack/main/ - 2024-07-18 14:42:06 + 2024-07-24 12:24:56 - + diff --git a/edgeimpulse/edge-impulse-sdk/classifier/ei_model_types.h b/edgeimpulse/edge-impulse-sdk/classifier/ei_model_types.h index 4c36205..e181cd8 100644 --- a/edgeimpulse/edge-impulse-sdk/classifier/ei_model_types.h +++ b/edgeimpulse/edge-impulse-sdk/classifier/ei_model_types.h @@ -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 @@ -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; @@ -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; @@ -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 */ @@ -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; diff --git a/edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/onnx_tidl.h b/edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/onnx_tidl.h index acc3e12..133a272 100644 --- a/edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/onnx_tidl.h +++ b/edgeimpulse/edge-impulse-sdk/classifier/inferencing_engines/onnx_tidl.h @@ -77,15 +77,15 @@ int printTensorInfo(Ort::Session *session, std::vector *input_node Ort::TypeInfo type_info = (*session).GetInputTypeInfo(0); auto tensor_info = type_info.GetTensorTypeAndShapeInfo(); std::vector 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 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]); @@ -110,7 +110,7 @@ int printTensorInfo(Ort::Session *session, std::vector *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]); @@ -124,7 +124,7 @@ int printTensorInfo(Ort::Session *session, std::vector *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]); } @@ -243,11 +243,11 @@ static EI_IMPULSE_ERROR inference_onnx_setup( /* output information */ size_t num_output_nodes = session->GetOutputCount(); std::vector 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); } @@ -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;