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