1 /*
2  * Copyright (C) 2021-2023 Alibaba Group Holding Limited
3  */
4 
5 #ifndef _AI_AGENT_COMMON_H_
6 #define _AI_AGENT_COMMON_H_
7 #include <stdint.h>
8 
9 
10 #ifdef CONFIG_UCLOUD_AI_ENGINE_ENABLE
11 #include "ucloud_ai_common.h"
12 typedef ucloud_ai_result_t ai_result_t;
13 typedef void *ai_config_t;
14 #elif defined(CONFIG_KWS_AI_ENGINE_ENABLE)
15 #include "engine/kws_engine.h"
16 typedef int32_t ai_result_t;
17 typedef kws_engine_config_t ai_config_t;
18 #else
19 typedef void *ai_result_t;
20 typedef void *ai_config_t;
21 #endif
22 
23 typedef enum _ai_model_t {
24     AI_MODEL_COMPARING_FACEBODY,                  // 人脸比对
25     AI_MODEL_GENERATE_HUMAN_ANIME_STYLE,          // 人物动漫化
26     AI_MODEL_RECOGNIZE_EXPRESSION,                // 表情识别
27     AI_MODEL_DETECT_OBJECT,                       // 目标检测
28     AI_MODEL_DETECT_MAIN_BODY,                    // 主体检测
29     AI_MODEL_SEGMENT_COMMON_IMAGE,                // 通用分割
30     AI_MODEL_SEGMENT_FACE,                        // 人脸分割
31     AI_MODEL_RECOGNIZE_IDENTITY_CARD_FACE_SIDE,   // 身份证正面识别
32     AI_MODEL_RECOGNIZE_IDENTITY_CARD_BACK_SIDE,   // 身份证背面识别
33     AI_MODEL_RECOGNIZE_BANK_CARD,                 // 银行卡识别
34     AI_MODEL_RECOGNIZE_CHARACTER,                 // 文本识别
35     AI_MODEL_CLASSIFYING_RUBBISH,                 // 垃圾分类
36     AI_MODEL_DETECT_FRUITS,                       // 水果检测
37     AI_MODEL_ERASE_PERSON,                        // 图像人体擦除
38     AI_MODEL_EXTEND_IMAGE_STYLE,                  // 风格迁移
39     AI_MODEL_KWS,                                 // 语音唤醒
40     AI_MODEL_MAX
41 } ai_model_t;
42 
43 typedef int (*ai_engine_cb_t)(ai_result_t *result);
44 #endif // _AI_AGENT_COMMON_H_
45