Skip to main content

CreateFromMakeUpJsonStr

Description

API that creates and initializes 'ArgoEngineApi' object by receiving Json string with defined resource and engine settings

CreateFromMakeUpJsonStr()

bool CreateFromMakeUpJsonStr(void** obj, char* licensePath, char* engineLibDirPath, char* jsonStr, char* name, bool isRecovery, bool isSelfCheck, int gpuCount, int engines_per_gpu[])
Parameters
Name Type Description
objvoid**

Pointer to pointer for passing pointer after creating 'ArgoEngineApi' object

licensePathchar*

License file

engineLibDirPathchar*

Path where engine module libraries are located

jsonStrchar*

Json containing initialization engine and resource information

namechar*

Name

isRecoverybool

Use recovery mode

isSelfCheckbool

Use self-check mode

gpuCountint

GPU count

Engines_per_gpuint[]

Number of engines per GPU

Return Value

bool: Success or failure

Example

  • GPU usage example
  • Use '../libs/GPU/modulelibs' library, refer to sample 'MakeUp_gpu.json' file for 'MAKE_UP_JSON' JSON data

modulelibs

std::string LICENSE_PATH = "../assets/sample.250630.license";
std::string ENGINE_LIB_PATH = "../libs/GPU/modulelibs";
std::string OBJ_NAME = "Sample";
bool IS_RECOVERY = true;
bool IS_SELF_CHECK = true;
int GPU_COUNT = 1;
Int ENGINES_PER_GPU[1] = {1};
Std::string IMR_MODEL_DATA_PATH = "../assets/all_module.24.12.03.gpu.imr";
void *obj = nullptr;
bool isSuccess = CreateFromImrModelFile(&obj,
(char *)LICENSE_PATH.c_str(),
(char *)ENGINE_LIB_PATH.c_str(),
(char *)IMR_MODEL_DATA_PATH.c_str(),
(char *)OBJ_NAME.c_str(),
IS_RECOVERY,
IS_SELF_CHECK,
GPU_COUNT,
ENGINES_PER_GPU);

MakeUp_gpu.json

{
"TEXT_DETECTION": {
"IS_DEFAULT": false,
"IS_OPEN_API": false,
"MODEL_DATA_PATH": "../assets/all_module.24.11.05.gpu.TEXT_DETECTION.smr",
"DEPENDS_ON": [],
"SELECTIVE_ON": [],
"COUNT": [2]
},
"TEXT_RECOGNITION": {
"IS_DEFAULT": true,
"IS_OPEN_API": true,
"MODEL_DATA_PATH": "../assets/all_module.24.11.05.gpu.TEXT_RECOGNITION.smr",
"DEPENDS_ON": [
"TEXT_DETECTION"
],
"SELECTIVE_ON": [],
"COUNT": [1]
}
}