MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / valid_boundary

Function valid_boundary

tools/utils/poly_nms.py:64–73  ·  view source on GitHub ↗
(x, with_score=True)

Source from the content-addressed store, hash-verified

62
63
64def valid_boundary(x, with_score=True):
65 num = len(x)
66 if num < 8:
67 return False
68 if num % 2 == 0 and (not with_score):
69 return True
70 if num % 2 == 1 and with_score:
71 return True
72
73 return False
74
75
76def boundary_iou(src, target):

Callers 1

boundary_iouFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected