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
41
| #ifndef _sdk_yolo_h_
| #define _sdk_yolo_h_
|
| #include <vector>
| #include <string>
|
| struct _cObjInfo;
| struct _cIMAGE;
|
| struct image_t;
|
| class Detector;
|
| namespace csdk_wrap{
| class sdkyolo{
| public:
| sdkyolo();
| ~sdkyolo();
| public:
| void* init_yolo(const char *cfg, const char *weights, const char *name, const int gi);
| int yolo_detect(void *handle, const cIMAGE *img, const float thrsh, const bool use_mean, void **objs, int *objCount);
| const char* yolo_obj_name_by_type(const int typ);
|
| private:
| int buffer_to_image(const unsigned char *data, const int w, const int h, const int color_channel);
| void objects_names_from_file(std::string filename);
| private:
| std::vector<std::string> names_;
| std::vector<Detector*> detors_;
|
| cObjInfo *objInfo_;
| int objCount_;
| // image_t
| image_t *image_;
| int width_;
| int height_;
| int channel_;
| };
| }
|
| #endif
|
|