mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-31 06:40:49 +03:00
test1
This commit is contained in:
@@ -12,46 +12,42 @@
|
||||
|
||||
#include "CImageBasis.h"
|
||||
|
||||
|
||||
class CTfLiteClass
|
||||
{
|
||||
protected:
|
||||
tflite::MicroMutableOpResolver<10> resolver;
|
||||
const tflite::Model* model;
|
||||
tflite::MicroInterpreter* interpreter;
|
||||
TfLiteTensor* output = nullptr;
|
||||
protected:
|
||||
tflite::MicroMutableOpResolver<10> resolver;
|
||||
const tflite::Model *model;
|
||||
tflite::MicroInterpreter *interpreter;
|
||||
TfLiteTensor *output = nullptr;
|
||||
|
||||
int kTensorArenaSize;
|
||||
uint8_t *tensor_arena;
|
||||
int kTensorArenaSize;
|
||||
uint8_t *tensor_arena;
|
||||
|
||||
unsigned char *modelfile = NULL;
|
||||
unsigned char *modelfile = NULL;
|
||||
|
||||
float *input;
|
||||
int input_i;
|
||||
int im_height, im_width, im_channel;
|
||||
|
||||
float* input;
|
||||
int input_i;
|
||||
int im_height, im_width, im_channel;
|
||||
long GetFileSize(std::string filename);
|
||||
bool ReadFileToModel(std::string filename);
|
||||
bool MakeStaticResolver(void);
|
||||
|
||||
long GetFileSize(std::string filename);
|
||||
bool ReadFileToModel(std::string _fn);
|
||||
void MakeStaticResolver();
|
||||
public:
|
||||
CTfLiteClass();
|
||||
~CTfLiteClass();
|
||||
bool LoadModel(std::string filename);
|
||||
bool MakeAllocate(void);
|
||||
bool LoadInputImageBasis(CImageBasis *rs);
|
||||
void Invoke(void);
|
||||
int GetAnzOutPut(bool silent = true);
|
||||
int GetOutClassification(int _von = -1, int _bis = -1);
|
||||
|
||||
public:
|
||||
CTfLiteClass();
|
||||
~CTfLiteClass();
|
||||
bool LoadModel(std::string _fn);
|
||||
bool MakeAllocate();
|
||||
void GetInputTensorSize();
|
||||
bool LoadInputImageBasis(CImageBasis *rs);
|
||||
void Invoke();
|
||||
int GetAnzOutPut(bool silent = true);
|
||||
int GetOutClassification(int _von = -1, int _bis = -1);
|
||||
int GetClassFromImageBasis(CImageBasis *rs);
|
||||
|
||||
int GetClassFromImageBasis(CImageBasis *rs);
|
||||
std::string GetStatusFlow();
|
||||
|
||||
float GetOutputValue(int nr);
|
||||
void GetInputDimension(bool silent);
|
||||
int ReadInputDimenstion(int _dim);
|
||||
float GetOutputValue(int nr);
|
||||
void GetInputDimension(bool silent);
|
||||
int ReadInputDimenstion(int _dim);
|
||||
};
|
||||
|
||||
#endif //CTFLITECLASS_H
|
||||
#endif // CTFLITECLASS_H
|
||||
|
||||
Reference in New Issue
Block a user