summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRichard Burton <richard.burton@arm.com>2022-12-01 12:31:23 +0000
committerRichard Burton <richard.burton@arm.com>2022-12-01 12:31:23 +0000
commit71f282e8dc7284431cd6d0305370cc8e450d4463 (patch)
treeb1e74e4df1990da4061e477e628485022142ffe0 /source
parentf32a86a6969508d7a156decbed0bfc9466ad92fa (diff)
downloadml-embedded-evaluation-kit-71f282e8dc7284431cd6d0305370cc8e450d4463.tar.gz
MLECO-3620 MLECO-3619: Update to 22.11 dependencies22.11-rc122.11
* CMSIS-NN is now a seperate dependency * Added inclusive language commitment * TensorFlow Lite Micro dependency is moved ahead of 22.11 to fix compilation issue Change-Id: I60e3311ff7da2ce064cbcdca054a86bdd1f620d8
Diffstat (limited to 'source')
-rw-r--r--source/application/api/common/include/Model.hpp1
-rw-r--r--source/application/api/common/include/TensorFlowLiteMicro.hpp6
-rw-r--r--source/application/api/common/source/Model.cc18
-rw-r--r--source/use_case/object_detection/src/UseCaseHandler.cc4
-rw-r--r--source/use_case/vww/src/UseCaseHandler.cc2
5 files changed, 12 insertions, 19 deletions
diff --git a/source/application/api/common/include/Model.hpp b/source/application/api/common/include/Model.hpp
index 8b64f10..ed2b4c1 100644
--- a/source/application/api/common/include/Model.hpp
+++ b/source/application/api/common/include/Model.hpp
@@ -133,7 +133,6 @@ namespace app {
size_t GetActivationBufferSize();
private:
- tflite::ErrorReporter* m_pErrorReporter{nullptr}; /* Pointer to the error reporter. */
const tflite::Model* m_pModel{nullptr}; /* Tflite model pointer. */
tflite::MicroInterpreter* m_pInterpreter{nullptr}; /* Tflite interpreter. */
tflite::MicroAllocator* m_pAllocator{nullptr}; /* Tflite micro allocator. */
diff --git a/source/application/api/common/include/TensorFlowLiteMicro.hpp b/source/application/api/common/include/TensorFlowLiteMicro.hpp
index 9826dfa..944ed4a 100644
--- a/source/application/api/common/include/TensorFlowLiteMicro.hpp
+++ b/source/application/api/common/include/TensorFlowLiteMicro.hpp
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,7 +30,6 @@
#pragma clang diagnostic ignored "-Wunused-parameter"
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
#include "tensorflow/lite/micro/micro_interpreter.h"
- #include "tensorflow/lite/micro/micro_error_reporter.h"
#include "tensorflow/lite/micro/all_ops_resolver.h"
#pragma clang diagnostic pop
#elif defined(__GNUC__)
@@ -38,18 +37,17 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
#include "tensorflow/lite/micro/micro_interpreter.h"
- #include "tensorflow/lite/micro/micro_error_reporter.h"
#include "tensorflow/lite/micro/all_ops_resolver.h"
#pragma GCC diagnostic pop
#else
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
#include "tensorflow/lite/micro/micro_interpreter.h"
- #include "tensorflow/lite/micro/micro_error_reporter.h"
#include "tensorflow/lite/micro/all_ops_resolver.h"
#endif
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/micro/kernels/micro_ops.h"
+#include "tensorflow/lite/micro/tflite_bridge/op_resolver_bridge.h"
#include "tensorflow/lite/schema/schema_generated.h"
#include "tensorflow/lite/schema/schema_utils.h"
diff --git a/source/application/api/common/source/Model.cc b/source/application/api/common/source/Model.cc
index 1dbef1d..8467d71 100644
--- a/source/application/api/common/source/Model.cc
+++ b/source/application/api/common/source/Model.cc
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,9 +31,7 @@ arm::app::Model::~Model()
arm::app::Model::Model() :
m_inited (false),
m_type(kTfLiteNoType)
-{
- this->m_pErrorReporter = tflite::GetMicroErrorReporter();
-}
+{}
bool arm::app::Model::Init(uint8_t* tensorArenaAddr,
uint32_t tensorArenaSize,
@@ -50,8 +48,8 @@ bool arm::app::Model::Init(uint8_t* tensorArenaAddr,
this->m_pModel = ::tflite::GetModel(nnModelAddr);
if (this->m_pModel->version() != TFLITE_SCHEMA_VERSION) {
- this->m_pErrorReporter->Report(
- "[ERROR] model's schema version %d is not equal "
+ printf_err(
+ "Model's schema version %d is not equal "
"to supported version %d.",
this->m_pModel->version(), TFLITE_SCHEMA_VERSION);
return false;
@@ -79,8 +77,7 @@ bool arm::app::Model::Init(uint8_t* tensorArenaAddr,
this->m_pAllocator = tflite::MicroAllocator::Create(
tensorArenaAddr,
- tensorArenaSize,
- this->m_pErrorReporter);
+ tensorArenaSize);
if (!this->m_pAllocator) {
printf_err("Failed to create allocator\n");
@@ -93,7 +90,7 @@ bool arm::app::Model::Init(uint8_t* tensorArenaAddr,
this->m_pInterpreter = new ::tflite::MicroInterpreter(
this->m_pModel, this->GetOpResolver(),
- this->m_pAllocator, this->m_pErrorReporter);
+ this->m_pAllocator);
if (!this->m_pInterpreter) {
printf_err("Failed to allocate interpreter\n");
@@ -211,8 +208,7 @@ void arm::app::Model::LogInterpreterInfo()
const tflite::OperatorCode* opcode = opcodes->Get(op->opcode_index());
const TfLiteRegistration* reg = nullptr;
- tflite::GetRegistrationFromOpCode(opcode, this->GetOpResolver(),
- this->m_pErrorReporter, &reg);
+ tflite::GetRegistrationFromOpCode(opcode, this->GetOpResolver(), &reg);
std::string opName;
if (reg) {
diff --git a/source/use_case/object_detection/src/UseCaseHandler.cc b/source/use_case/object_detection/src/UseCaseHandler.cc
index 5f012b6..084059e 100644
--- a/source/use_case/object_detection/src/UseCaseHandler.cc
+++ b/source/use_case/object_detection/src/UseCaseHandler.cc
@@ -58,8 +58,8 @@ namespace app {
constexpr uint32_t dataPsnImgStartX = 10;
constexpr uint32_t dataPsnImgStartY = 35;
- constexpr uint32_t dataPsnTxtInfStartX = 150;
- constexpr uint32_t dataPsnTxtInfStartY = 40;
+ constexpr uint32_t dataPsnTxtInfStartX = 20;
+ constexpr uint32_t dataPsnTxtInfStartY = 28;
hal_lcd_clear(COLOR_BLACK);
diff --git a/source/use_case/vww/src/UseCaseHandler.cc b/source/use_case/vww/src/UseCaseHandler.cc
index 411b868..e2e48d1 100644
--- a/source/use_case/vww/src/UseCaseHandler.cc
+++ b/source/use_case/vww/src/UseCaseHandler.cc
@@ -45,7 +45,7 @@ namespace app {
constexpr uint32_t dataPsnImgStartY = 35;
constexpr uint32_t dataPsnTxtInfStartX = 150;
- constexpr uint32_t dataPsnTxtInfStartY = 70;
+ constexpr uint32_t dataPsnTxtInfStartY = 40;
if (!model.IsInited()) {
printf_err("Model is not initialised! Terminating processing.\n");