SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma::Model Class Referenceabstract

#include <ma_model_base.h>

Inheritance diagram for ma::Model:
Collaboration diagram for ma::Model:

Public Member Functions

 Model (Engine *engine, const char *name, uint16_t type)
 
virtual ~Model ()
 
const ma_perf_t getPerf () const
 
const char * getName () const
 
ma_model_type_t getType () const
 
ma_input_type_t getInputType () const
 
ma_output_type_t getOutputType () const
 
virtual const void * getInput ()=0
 
virtual ma_err_t setConfig (ma_model_cfg_opt_t opt,...)=0
 
virtual ma_err_t getConfig (ma_model_cfg_opt_t opt,...)=0
 
void setPreprocessDone (std::function< void(void *)> func)
 
void setPostprocessDone (std::function< void(void *)> func)
 
void setRunDone (std::function< void(void *)> func)
 
void setUserCtx (void *ctx)
 

Protected Member Functions

virtual ma_err_t preprocess ()=0
 
virtual ma_err_t postprocess ()=0
 
ma_err_t underlyingRun ()
 

Protected Attributes

Enginep_engine_
 
const char * p_name_
 

Constructor & Destructor Documentation

◆ Model()

ma::Model::Model ( Engine engine,
const char *  name,
uint16_t  type 
)

◆ ~Model()

ma::Model::~Model ( )
virtual

Member Function Documentation

◆ getConfig()

virtual ma_err_t ma::Model::getConfig ( ma_model_cfg_opt_t  opt,
  ... 
)
pure virtual

◆ getInput()

virtual const void* ma::Model::getInput ( )
pure virtual

◆ getInputType()

ma_input_type_t ma::Model::getInputType ( ) const

◆ getName()

const char * ma::Model::getName ( ) const

◆ getOutputType()

ma_output_type_t ma::Model::getOutputType ( ) const

◆ getPerf()

const ma_perf_t ma::Model::getPerf ( ) const

◆ getType()

ma_model_type_t ma::Model::getType ( ) const
Here is the caller graph for this function:

◆ postprocess()

virtual ma_err_t ma::Model::postprocess ( )
protectedpure virtual

Implemented in ma::model::YoloV8Pose, ma::model::YoloV8, ma::model::YoloV5, ma::model::YoloWorld, ma::model::Yolo11Seg, ma::model::Yolo11Pose, ma::model::Yolo11, ma::model::PFLD, ma::model::NvidiaDet, ma::model::FOMO, and ma::model::Classifier.

Here is the caller graph for this function:

◆ preprocess()

virtual ma_err_t ma::Model::preprocess ( )
protectedpure virtual

Implemented in ma::model::Segmenter, ma::model::PoseDetector, ma::model::PointDetector, ma::model::Detector, and ma::model::Classifier.

Here is the caller graph for this function:

◆ setConfig()

virtual ma_err_t ma::Model::setConfig ( ma_model_cfg_opt_t  opt,
  ... 
)
pure virtual

◆ setPostprocessDone()

void ma::Model::setPostprocessDone ( std::function< void(void *)>  func)

◆ setPreprocessDone()

void ma::Model::setPreprocessDone ( std::function< void(void *)>  func)

◆ setRunDone()

void ma::Model::setRunDone ( std::function< void(void *)>  func)

◆ setUserCtx()

void ma::Model::setUserCtx ( void *  ctx)

◆ underlyingRun()

ma_err_t ma::Model::underlyingRun ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ p_engine_

Engine* ma::Model::p_engine_
protected

◆ p_name_

const char* ma::Model::p_name_
protected