| 64 | void* detect_class, void* detect_score, void* detect_boxes, dpp_param* param); |
| 65 | |
| 66 | static inline float intersection_area(const struct Dpp_Box a, const struct Dpp_Box b) |
| 67 | { |
| 68 | if(a.x0 > b.x1 || a.x1 < b.x0 || a.y0 > b.y1 || a.y1 < b.y0) |
| 69 | { |
| 70 | // no intersection |
| 71 | return 0.f; |
| 72 | } |
| 73 | |
| 74 | float inter_width = DPP_MIN(a.x1, b.x1) - DPP_MAX(a.x0, b.x0); |
| 75 | float inter_height = DPP_MIN(a.y1, b.y1) - DPP_MAX(a.y0, b.y0); |
| 76 | |
| 77 | return inter_width * inter_height; |
| 78 | } |
| 79 | |
| 80 | static inline void nms_sorted_bboxes(const struct Dpp_Box* boxes, int boxes_size, int* picked, int* picked_size, |
| 81 | float nms_threshold) |
no outgoing calls
no test coverage detected