-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathk210.c
35 lines (28 loc) · 1.06 KB
/
k210.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <rt_ai.h>
#include <backend_k210_kpu.h>
#include <rt_ai_facelandmark_model.h>
#include <kpu.h>
extern unsigned char facelandmark_kmodel[];
/* based on k210 */
#define RT_AI_FACELANDMARK_INFO { \
RT_AI_FACELANDMARK_IN_NUM, \
RT_AI_FACELANDMARK_OUT_NUM, \
RT_AI_FACELANDMARK_IN_SIZE_BYTES, \
RT_AI_FACELANDMARK_OUT_SIZE_BYTES, \
RT_AI_FACELANDMARK_WORK_BUFFER_BYTES, \
ALLOC_INPUT_BUFFER_FLAG \
}
#define RT_AI_FACELANDMARK_HANDLE { \
.info = RT_AI_FACELANDMARK_INFO \
}
#define RT_K210_AI_FACELANDMARK { \
.parent = RT_AI_FACELANDMARK_HANDLE, \
.model = facelandmark_kmodel, \
.dmac = DMAC_CHANNEL5, \
}
static struct k210_kpu rt_k210_ai_facelandmark = RT_K210_AI_FACELANDMARK;
static int rt_k210_ai_facelandmark_init(){
rt_ai_register(RT_AI_T(&rt_k210_ai_facelandmark),RT_AI_FACELANDMARK_MODEL_NAME,0,backend_k210_kpu,&rt_k210_ai_facelandmark);
return 0;
}
INIT_APP_EXPORT(rt_k210_ai_facelandmark_init);