-
Notifications
You must be signed in to change notification settings - Fork 20
/
bboxParser.h~
83 lines (71 loc) · 2.47 KB
/
bboxParser.h~
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef BBOX_PARSER_H
#define BBOX_PARSER_H
#include <vector>
// cub for sort
#include "regionLayer.h"
void sortScoresPerImage_gpu(
const int nBatch,
const int nItemsPerImage,
void * unsorted_scores,
void * unsorted_bbox_indices,
void * sorted_scores,
void * sorted_bbox_indices,
void * workspace,
const size_t maxSizeofWorkspaceInByte,
cudaStream_t stream);
void splitOutputData_gpu(
const int nBatch, // batch
const int nClasses,
const int nBboxesPerLoc, // #box
const int coords, // x,y,w,h
const int l0_w,
const int l0_h,
const int nCells,
const bool background, // use background conf or not
const bool only_objectness, // no class conf
const float thres,
const float* predictions,
const float* biases,
float* probes,
box* bboxes,
cudaStream_t stream);
void correct_region_boxes_gpu(
const int nBatch, // batch
const int nClasses,
const int nBboxesPerLoc, // #box
const int nCells,
const int image_w,
const int image_h,
const int net_input_w,
const int net_input_h,
box* bboxes,
cudaStream_t stream);
void sortScoresPerClass_gpu(
const int nBatch,
const int nClasses,
const int nBboxesPerLoc,
const void * probes,
void * sorted_boxIdx,
void * workspace,
const size_t maxSizeofWorkspaceInByte,
cudaStream_t stream);
void allClassNMS_gpu(
const int nBatch, //batch
const int nClasses,
const int nBboxesPerLoc,
const int w,
const int h,
const float nms_threshold,
void * bboxes,
void * probes,
void * afterNMS_probes,
void * indexes,
void * afterNMS_indexes,
cudaStream_t stream);
size_t getWorkspaceSizeInByte(
const int nBatch,
const int nClasses,
const int nBboxesPerLoc,
const int w,
const int h);
#endif