summaryrefslogtreecommitdiff
path: root/source/application/main/include/UseCaseCommonUtils.hpp
diff options
context:
space:
mode:
authorRichard Burton <richard.burton@arm.com>2022-04-22 16:14:57 +0100
committerRichard Burton <richard.burton@arm.com>2022-04-22 16:14:57 +0100
commitb40ecf8522052809d2351677a96195d69e4d0c16 (patch)
tree8647dfdae7bcae0ec6d9564ba7a971819fdda431 /source/application/main/include/UseCaseCommonUtils.hpp
parentc291144b7f08c21d08cdaf79cc64dc420ca70070 (diff)
downloadml-embedded-evaluation-kit-b40ecf8522052809d2351677a96195d69e4d0c16.tar.gz
MLECO-3174: Minor refactoring to implemented use case APIS
Looks large but it is mainly just many small adjustments Removed the inference runner code as it wasn't used Fixes to doc strings Consistent naming e.g. Asr/Kws instead of ASR/KWS Signed-off-by: Richard Burton <richard.burton@arm.com> Change-Id: I43b620b5c51d7910a29a63b509ac4d8a82c3a8fc
Diffstat (limited to 'source/application/main/include/UseCaseCommonUtils.hpp')
-rw-r--r--source/application/main/include/UseCaseCommonUtils.hpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/source/application/main/include/UseCaseCommonUtils.hpp b/source/application/main/include/UseCaseCommonUtils.hpp
index f79f6ed..9b6d550 100644
--- a/source/application/main/include/UseCaseCommonUtils.hpp
+++ b/source/application/main/include/UseCaseCommonUtils.hpp
@@ -24,7 +24,6 @@
#include "UseCaseHandler.hpp" /* Handlers for different user options. */
#include "Classifier.hpp" /* Classifier. */
#include "InputFiles.hpp"
-#include "BaseProcessing.hpp"
void DisplayCommonMenu();
@@ -108,67 +107,6 @@ namespace app {
**/
bool ListFilesHandler(ApplicationContext& ctx);
- /**
- * @brief Use case runner class that will handle calling pre-processing,
- * inference and post-processing.
- * After constructing an instance of this class the user can call
- * PreProcess(), RunInference() and PostProcess() to perform inference.
- */
- class UseCaseRunner {
-
- private:
- BasePreProcess* m_preProcess;
- BasePostProcess* m_postProcess;
- Model* m_model;
-
- public:
- explicit UseCaseRunner(BasePreProcess* preprocess, BasePostProcess* postprocess, Model* model)
- : m_preProcess{preprocess},
- m_postProcess{postprocess},
- m_model{model}
- {};
-
- /**
- * @brief Runs pre-processing as defined by PreProcess object within the runner.
- * Templated for the input data type.
- * @param[in] inputData Pointer to the data that inference will be performed on.
- * @param[in] inputSize Size of the input data that inference will be performed on.
- * @return true if successful, false otherwise.
- **/
- template<typename T>
- bool PreProcess(T* inputData, size_t inputSize) {
- if (!this->m_preProcess->DoPreProcess(inputData, inputSize)) {
- printf_err("Pre-processing failed.");
- return false;
- }
- return true;
- }
-
- /**
- * @brief Runs inference with the Model object within the runner.
- * @return true if successful, false otherwise.
- **/
- bool RunInference() {
- if (!this->m_model->RunInference()) {
- printf_err("Inference failed.");
- return false;
- }
- return true;
- }
-
- /**
- * @brief Runs post-processing as defined by PostProcess object within the runner.
- * @return true if successful, false otherwise.
- **/
- bool PostProcess() {
- if (!this->m_postProcess->DoPostProcess()) {
- printf_err("Post-processing failed.");
- return false;
- }
- return true;
- }
- };
-
} /* namespace app */
} /* namespace arm */