Skip to main content

initFromMakeUpJsonStr

Description

Initialize object (obj) created by CreateArgoSDK function by receiving Json string with defined resource and engine settings

initFromMakeUpJsonStr()

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

Object pointer created using CreateArgoSDK function

jsonStrchar*

Json string containing initialization engine and resource information

namechar*

Name

isRecoverybool

Use recovery mode

isSelfCheckbool

Use self-check mode

gpuCountint

GPU count

Engines_per_gpuint[]

Set number of engines per GPU

Return Value

bool: Success or failure

Example

  • GPU usage example
  • Refer to sample 'MakeUp_gpu.json' file for 'MAKE_UP_JSON' JSON data

MAKE_UP_JSON

std::string OBJ_NAME = "Sample";
bool IS_RECOVERY = true;
bool IS_SELF_CHECK = true;
int GPU_COUNT = 1;
Int ENGINES_PER_GPU[1] = {1};
bool isSuccess = initFromMakeUpJsonStr(obj,
(char *)MAKE_UP_JSON.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]
}
}