forked from madhawav/YOLO3-4-Py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pydarknet.pxd
64 lines (46 loc) · 1.36 KB
/
pydarknet.pxd
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# distutils: language = "c++"
import numpy as np
cimport numpy as np
cdef extern from "bridge.h":
cdef int CV_8UC3
cdef cppclass Mat:
Mat() except +
void create(int, int, int)
void* data
int rows
int cols
int channels()
void deallocate()
void release()
ctypedef struct box:
float x, y, w, h
ctypedef struct detection:
box bbox
int classes
float *prob
float *mask
float objectness
int sort_class
cdef struct network:
pass
ctypedef struct metadata:
int classes
char** names
ctypedef struct image:
int w
int h
int c
float *data
float *network_predict_image(network *net, image im)
int getCV_8UC3()
image get_darknet_image(const Mat &input)
network* load_network(char* config, char* weights, int p)
metadata get_metadata(char *file)
void free_network(network* net)
void free_detections(detection *dets, int n)
void do_nms_obj(detection *dets, int total, int classes, float thresh)
void show_image(image img, char* title, int ms)
void free_image(image img)
detection *get_network_boxes(network *net, int w, int h, float thresh, float hier, int *map, int relative, int *num)
IF USE_GPU == 1:
void cuda_set_device(int n)