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

Function intersection_area

executor/operator/ref/kernel/dpp/ref_dpp_kernel.h:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 void* detect_class, void* detect_score, void* detect_boxes, dpp_param* param);
65
66static 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
80static inline void nms_sorted_bboxes(const struct Dpp_Box* boxes, int boxes_size, int* picked, int* picked_size,
81 float nms_threshold)

Callers 3

nms_sorted_bboxesFunction · 0.70
nms_sorted_bboxesMethod · 0.50
nms_sorted_bboxesMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected