#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); }