MCPcopy Create free account
hub / github.com/OAID/Tengine / bbox_tranform_inv

Function bbox_tranform_inv

executor/operator/common/rpn.cpp:135–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void bbox_tranform_inv(float* m_box, float* local_anchors, int height, int width, int channel, int num_anchors)
136{
137 int step = height * width;
138 float* a = m_box;
139 float* b = local_anchors;
140 int c_4 = channel / 4;
141 for(int i = 0; i < c_4; ++i)
142 {
143 _axpy_(2 * step, b + (i * 4 + 0) * step, b + (i * 4 + 2) * step);
144 _add_one(2 * step, b + (i * 4 + 2) * step);
145 _axpy_half(2 * step, b + (i * 4 + 2) * step, b + (i * 4 + 0) * step);
146
147 _mul(2 * step, b + (i * 4 + 2) * step, a + (i * 4 + 0) * step, a + (i * 4 + 0) * step);
148 _add(2 * step, b + (i * 4 + 0) * step, a + (i * 4 + 0) * step, a + (i * 4 + 0) * step);
149
150 _exp(2 * step, a + (i * 4 + 2) * step, a + (i * 4 + 2) * step);
151 _mul(2 * step, b + (i * 4 + 2) * step, a + (i * 4 + 2) * step, a + (i * 4 + 2) * step);
152 }
153}
154
155void filter_boxs(std::vector<SBox>& boxes, float* box, float* score, int min_size, int src_scale, int src_w, int src_h,
156 int feat_w, int feat_h, int num_anchors, int feat_c)

Callers 1

RunMethod · 0.70

Calls 6

_axpy_Function · 0.85
_add_oneFunction · 0.85
_axpy_halfFunction · 0.85
_mulFunction · 0.85
_addFunction · 0.85
_expFunction · 0.85

Tested by

no test coverage detected