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
36
37
38
39
40
| #ifdef __cplusplus
| extern "C"{
| #endif
|
| #include "cyolo.h"
|
| #ifdef __cplusplus
| }
| #endif
|
| #include "csrc/yolo.h"
|
| #include "csrc/struct.h"
|
| #include "csrc/yolo.cpp"
|
|
| void* init(const char *cfg, const char *weights, const char *name, const int gpu){
| return cppyolo::init(cfg, weights, name, gpu);
| }
|
| void release(void *handle){
| if (handle){
| cppyolo::release(handle);
| }
| }
|
| int detect(void *handle,
| const void *data, const int w, const int h, const int c,
| const float thrsh, const int use_mean,
| void **objInfos, int *objCount){
|
| cIMAGE img{(unsigned char*)data, w, h, c};
| return cppyolo::detect(handle, &img, thrsh, use_mean, objInfos, objCount);
| }
|
| const char* obj_name_by_type(const int typ){
|
| return cppyolo::obj_name_by_type(typ);
| }
|
|