SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma_model_yolov8_pose_hailo.h
Go to the documentation of this file.
1 #ifndef _MA_MODEL_YOLOV8_POSE_HAILO_H_
2 #define _MA_MODEL_YOLOV8_POSE_HAILO_H_
3 
5 
6 #if MA_USE_ENGINE_HAILO
7 
8 #include <cstddef>
9 #include <cstdint>
10 #include <utility>
11 #include <vector>
12 
13 #include <xtensor/xtensor.hpp>
14 #include <xtensor/xarray.hpp>
15 
16 namespace ma::model {
17 
18 namespace _internal {
19 
20 struct Triple {
21  std::vector<ma_tensor_t> boxes;
22  xt::xarray<float> scores;
23  std::vector<ma_tensor_t> keypoints;
24 };
25 
26 } // namespace _internal
27 
28 class YoloV8PoseHailo : public PoseDetector {
29 private:
30  std::vector<xt::xarray<double>> centers_;
31  static std::vector<int> strides_;
32  std::vector<int> network_dims_;
33  std::vector<ma_tensor_t> outputs_;
34  _internal::Triple boxes_scores_keypoints_;
35  int32_t route_ = 0;
36 
37 protected:
38  ma_err_t postprocess() override;
39 
40 public:
41  YoloV8PoseHailo(Engine* engine);
42  ~YoloV8PoseHailo();
43 
44  static bool isValid(Engine* engine);
45 
46  static const char* getTag();
47 };
48 
49 } // namespace ma::model
50 
51 #endif
52 
53 #endif // _MA_MODEL_YOLO_H
ma_err_t
Definition: ma_types.h:21
Definition: ma_model_classifier.cpp:5