SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma_model_yolo_world.h
Go to the documentation of this file.
1 #ifndef _MA_MODEL_YOLO_WORLD_H_
2 #define _MA_MODEL_YOLO_WORLD_H_
3 
4 #include <cstddef>
5 #include <cstdint>
6 #include <vector>
7 
8 #include "../ma_types.h"
9 #include "ma_model_detector.h"
10 
11 namespace ma::model {
12 
13 class YoloWorld : public Detector {
14  private:
15  static constexpr size_t num_outputs_ = 6;
16  static constexpr size_t anchor_variants_ = 3;
17 
18  ma_tensor_t outputs_[num_outputs_];
19 
20  std::vector<ma_anchor_stride_t> anchor_strides_;
21  std::vector<std::vector<ma_pt2f_t>> anchor_matrix_;
22 
23  size_t output_scores_ids_[anchor_variants_];
24  size_t output_bboxes_ids_[anchor_variants_];
25 
26  protected:
27  ma_err_t postprocess() override;
28 
30 #ifdef MA_MODEL_POSTPROCESS_FP32_VARIANT
31  ma_err_t postProcessF32();
32 #endif
33 
34  public:
35  YoloWorld(Engine* engine);
36  ~YoloWorld();
37 
38  static bool isValid(Engine* engine);
39 
40  static const char* getTag();
41 };
42 
43 } // namespace ma::model
44 
45 #endif // _MA_MODEL_YOLO_H
Definition: ma_engine_base.h:17
Definition: ma_model_detector.h:12
Definition: ma_model_yolo_world.h:13
ma_err_t postprocess() override
Definition: ma_model_yolo_world.cpp:140
~YoloWorld()
Definition: ma_model_yolo_world.cpp:59
YoloWorld(Engine *engine)
Definition: ma_model_yolo_world.cpp:25
static bool isValid(Engine *engine)
Definition: ma_model_yolo_world.cpp:61
ma_err_t postProcessI8()
Definition: ma_model_yolo_world.cpp:173
static const char * getTag()
Definition: ma_model_yolo_world.cpp:138
ma_err_t
Definition: ma_types.h:21
Definition: ma_model_classifier.cpp:5
Definition: ma_types.h:74