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