PosturePerfection
inference_core.h
Go to the documentation of this file.
1 
22 #ifndef SRC_INFERENCE_CORE_H_
23 #define SRC_INFERENCE_CORE_H_
24 
25 #include <interpreter_builder.h>
26 #include <stdint.h>
27 
28 #include <memory>
29 
31 #include "pre_processor.h"
32 
38 namespace Inference {
39 
51  private:
52  size_t model_input_width;
53  size_t model_input_height;
54  size_t model_input_size;
55  uint8_t model_input_channels = 3;
56  std::unique_ptr<tflite::Interpreter> interpreter;
57  tflite::StderrReporter error_reporter;
58  std::unique_ptr<tflite::FlatBufferModel> model;
59 
60  Coordinate pixel_coord_to_Coordinate(uint32_t x, uint32_t y,
61  float confidence);
62 
63  public:
71  InferenceCore(const char* model_filename, size_t model_input_width,
72  size_t model_input_height);
73 
83 };
84 } // namespace Inference
85 
86 #endif // SRC_INFERENCE_CORE_H_
A wrapper to make running inference easier.
Definition: inference_core.h:50
InferenceCore(const char *model_filename, size_t model_input_width, size_t model_input_height)
Construct a new Inference Core object.
Definition: inference_core.cpp:33
InferenceResults run(PreProcessing::PreProcessedImage preprocessed_image)
Run a pre-processed image through the loaded model.
Definition: inference_core.cpp:66
Data structures used in communicating between different parts of the system.
Uses TensorFlow Lite to perform pose estimation on a given image frame to detect noteworthy joints.
Definition: inference_core.cpp:31
Interface for pre processing the input image before passing to Inference::InferenceCore
Indicates position and confidence in positioning of a body part node.
Definition: intermediate_structures.h:183
Results of running the model for all body parts.
Definition: intermediate_structures.h:199
A structure of the pre processed image.
Definition: intermediate_structures.h:85