MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / box_to_point4

Function box_to_point4

examples/FasterRCNN/common.py:65–77  ·  view source on GitHub ↗

Convert boxes to its corner points. Args: boxes: nx4 Returns: (nx4)x2

(boxes)

Source from the content-addressed store, hash-verified

63
64
65def box_to_point4(boxes):
66 """
67 Convert boxes to its corner points.
68
69 Args:
70 boxes: nx4
71
72 Returns:
73 (nx4)x2
74 """
75 b = boxes[:, [0, 1, 2, 3, 0, 3, 2, 1]]
76 b = b.reshape((-1, 2))
77 return b
78
79
80def point4_to_box(points):

Callers 1

__call__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…