summaryrefslogtreecommitdiff
path: root/source/use_case/img_class/include
diff options
context:
space:
mode:
authorRichard Burton <richard.burton@arm.com>2022-04-13 11:58:28 +0100
committerRichard Burton <richard.burton@arm.com>2022-04-13 11:58:28 +0100
commite6398cd54642a6a420b14003ad62309448dd724e (patch)
tree8c72ae7fcc7badb4ae161d07ef63eda38f6ff65e /source/use_case/img_class/include
parent7e56d8f55c770204deaa2de644990828b9ff083b (diff)
downloadml-embedded-evaluation-kit-e6398cd54642a6a420b14003ad62309448dd724e.tar.gz
MLECO-3075: Add KWS use case API
Removed some of the templates for feature calculation that we are unlikely to ever use. We might be able to refactor the feature caching and feature calculator code in the future to better integrate it with with PreProcess API. Signed-off-by: Richard Burton <richard.burton@arm.com> Change-Id: Ic0c0c581c71e2553d41ff72cd1ed3b3efa64fa92
Diffstat (limited to 'source/use_case/img_class/include')
-rw-r--r--source/use_case/img_class/include/ImgClassProcessing.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/use_case/img_class/include/ImgClassProcessing.hpp b/source/use_case/img_class/include/ImgClassProcessing.hpp
index 5a59b5f..59db4a5 100644
--- a/source/use_case/img_class/include/ImgClassProcessing.hpp
+++ b/source/use_case/img_class/include/ImgClassProcessing.hpp
@@ -32,8 +32,19 @@ namespace app {
class ImgClassPreProcess : public BasePreProcess {
public:
+ /**
+ * @brief Constructor
+ * @param[in] model Pointer to the the Image classification Model object.
+ **/
explicit ImgClassPreProcess(Model* model);
+ /**
+ * @brief Should perform pre-processing of 'raw' input image data and load it into
+ * TFLite Micro input tensors ready for inference
+ * @param[in] input Pointer to the data that pre-processing will work on.
+ * @param[in] inputSize Size of the input data.
+ * @return true if successful, false otherwise.
+ **/
bool DoPreProcess(const void* input, size_t inputSize) override;
};
@@ -50,10 +61,22 @@ namespace app {
std::vector<ClassificationResult>& m_results;
public:
+ /**
+ * @brief Constructor
+ * @param[in] classifier Classifier object used to get top N results from classification.
+ * @param[in] model Pointer to the the Image classification Model object.
+ * @param[in] labels Vector of string labels to identify each output of the model.
+ * @param[in] results Vector of classification results to store decoded outputs.
+ **/
ImgClassPostProcess(Classifier& classifier, Model* model,
const std::vector<std::string>& labels,
std::vector<ClassificationResult>& results);
+ /**
+ * @brief Should perform post-processing of the result of inference then populate
+ * populate classification result data for any later use.
+ * @return true if successful, false otherwise.
+ **/
bool DoPostProcess() override;
};