MCPcopy Create free account
hub / github.com/davisking/dlib / box_intersection_over_union

Function box_intersection_over_union

dlib/image_processing/box_overlap_testing.h:15–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13// ----------------------------------------------------------------------------------------
14
15 inline double box_intersection_over_union (
16 const drectangle& a,
17 const drectangle& b
18 )
19 {
20 const double inner = a.intersect(b).area();
21 if (inner == 0)
22 return 0;
23 const double outer = a.area() + b.area() - inner;
24 return inner / outer;
25 }
26
27// ----------------------------------------------------------------------------------------
28

Callers 7

find_best_matchMethod · 0.85
tensor_to_lossMethod · 0.85
mainFunction · 0.85

Calls 3

drectangleClass · 0.50
areaMethod · 0.45
intersectMethod · 0.45

Tested by

no test coverage detected