Skip to content

Commit

Permalink
SDK release v1.47.2
Browse files Browse the repository at this point in the history
  • Loading branch information
francovaro committed Mar 12, 2024
1 parent 2ec61a0 commit b41ff93
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
9 changes: 6 additions & 3 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.47.0/</url>
<url>https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.47.2/</url>
<supportContact>[email protected]</supportContact>
<repository type="git">https://github.com/edgeimpulse/edge-impulse-sdk-pack.git</repository>
<releases>
<release version="1.47.0" tag="v1.47.0" date="2024-03-08" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.47.0/EdgeImpulse.EI-SDK.1.47.0.pack">
<release version="1.47.2" tag="v1.47.2" date="2024-03-12" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.47.2/EdgeImpulse.EI-SDK.1.47.2.pack">
EI-SDK
</release>
<release version="1.47.0" tag="v1.47.0" date="2024-03-08" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.47.0/EdgeImpulse.EI-SDK.1.47.0.pack">
EI-SDK
</release>
<release version="1.46.6" tag="v1.46.6" date="2024-03-06" url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.46.6/EdgeImpulse.EI-SDK.1.46.6.pack">
EI-SDK
</release>
Expand Down Expand Up @@ -80,7 +83,7 @@
</packages>
</requirements>
<components>
<component Cclass="EdgeImpulse" Cgroup="SDK" Cversion="1.47.0">
<component Cclass="EdgeImpulse" Cgroup="SDK" Cversion="1.47.2">
<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-03-08 09:13:21</timestamp>
<timestamp>2024-03-12 12:26:06</timestamp>
<pindex>
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.47.0/" vendor="EdgeImpulse" name="EI-SDK" version="1.47.0"/>
<pdsc url="https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.47.2/" vendor="EdgeImpulse" name="EI-SDK" version="1.47.2"/>
</pindex>
</index>
10 changes: 10 additions & 0 deletions edgeimpulse/edge-impulse-sdk/classifier/ei_run_dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,11 @@ __attribute__((unused)) int extract_image_features_quantized(signal_t *signal, m
g = (g - torch_mean[1]) / torch_std[1];
b = (b - torch_mean[2]) / torch_std[2];
}
else if (image_scaling == EI_CLASSIFIER_IMAGE_SCALING_MIN128_127) {
r -= 128.0f;
g -= 128.0f;
b -= 128.0f;
}

output_matrix->buffer[output_ix++] = static_cast<int8_t>(round(r / scale) + zero_point);
output_matrix->buffer[output_ix++] = static_cast<int8_t>(round(g / scale) + zero_point);
Expand Down Expand Up @@ -1289,6 +1294,11 @@ __attribute__((unused)) int extract_image_features_quantized(signal_t *signal, m
g = (g - torch_mean[1]) / torch_std[1];
b = (b - torch_mean[2]) / torch_std[2];
}
else if (image_scaling == EI_CLASSIFIER_IMAGE_SCALING_MIN128_127) {
r -= 128.0f;
g -= 128.0f;
b -= 128.0f;
}

// ITU-R 601-2 luma transform
// see: https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.convert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,15 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
} // namespace

TfLiteRegistration* Register_TREE_ENSEMBLE_CLASSIFIER() {

static TfLiteRegistration r = {
tree_ensemble_classifier::Init, nullptr,
tree_ensemble_classifier::Prepare, tree_ensemble_classifier::Eval};
tree_ensemble_classifier::Init,
nullptr,
tree_ensemble_classifier::Prepare,
tree_ensemble_classifier::Eval,
/*profiling_string=*/nullptr,
/*builtin_code=*/0,
/*custom_name=*/nullptr,
/*version=*/0};
return &r;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ TfLiteStatus InitializeTfLiteTensorFromFlatbuffer(

result->data.data = GetFlatbufferTensorBuffer(flatbuffer_tensor, buffers);
// this is useful for debugging
#if EI_LOG_LEVEL && EI_LOG_LEVEL >= 4
#if defined(EI_LOG_LEVEL) && (EI_LOG_LEVEL >= 4)
result->name = flatbuffer_tensor.name()->c_str();
#endif
// TODO(petewarden): Some of these paths aren't getting enough testing
Expand Down

0 comments on commit b41ff93

Please sign in to comment.