SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma_model_point_detector.h
Go to the documentation of this file.
1 #ifndef _MA_MODEL_POINT_DETECTOR_H_
2 #define _MA_MODEL_POINT_DETECTOR_H_
3 
4 #include <vector>
5 
6 #include "ma_model_base.h"
7 
8 namespace ma::model {
9 
10 class PointDetector : public Model {
11 protected:
15 
17 
18  bool is_nhwc_;
19 
20  std::vector<ma_point_t> results_;
21 
22 protected:
23  ma_err_t preprocess() override;
24 
25 public:
26  PointDetector(Engine* engine, const char* name, ma_model_type_t type);
27  virtual ~PointDetector();
28 
29  const std::vector<ma_point_t>& getResults() const;
30 
31  ma_err_t run(const ma_img_t* img);
32 
33  const void* getInput() override;
34 
35  ma_err_t setConfig(ma_model_cfg_opt_t opt, ...) override;
36 
37  ma_err_t getConfig(ma_model_cfg_opt_t opt, ...) override;
38 };
39 
40 } // namespace ma::model
41 
42 #endif
Definition: ma_model_base.h:14
Definition: ma_engine_base.h:17
Definition: ma_model_point_detector.h:10
const std::vector< ma_point_t > & getResults() const
Definition: ma_model_point_detector.cpp:33
float threshold_score_
Definition: ma_model_point_detector.h:16
ma_err_t run(const ma_img_t *img)
Definition: ma_model_point_detector.cpp:53
PointDetector(Engine *engine, const char *name, ma_model_type_t type)
Definition: ma_model_point_detector.cpp:9
ma_img_t img_
Definition: ma_model_point_detector.h:13
bool is_nhwc_
Definition: ma_model_point_detector.h:18
ma_err_t setConfig(ma_model_cfg_opt_t opt,...) override
Definition: ma_model_point_detector.cpp:65
std::vector< ma_point_t > results_
Definition: ma_model_point_detector.h:20
virtual ~PointDetector()
Definition: ma_model_point_detector.cpp:31
const void * getInput() override
Definition: ma_model_point_detector.cpp:61
ma_err_t getConfig(ma_model_cfg_opt_t opt,...) override
Definition: ma_model_point_detector.cpp:83
ma_tensor_t input_
Definition: ma_model_point_detector.h:12
const ma_img_t * input_img_
Definition: ma_model_point_detector.h:14
ma_err_t preprocess() override
Definition: ma_model_point_detector.cpp:37
ma_model_type_t
Definition: ma_types.h:274
ma_err_t
Definition: ma_types.h:21
ma_model_cfg_opt_t
Definition: ma_types.h:229
Definition: ma_model_classifier.cpp:5
Definition: ma_types.h:124
Definition: ma_types.h:74