def rect2rbox(self, bboxes):
    '\n        :param bboxes: shape (n, 4) (xmin, ymin, xmax, ymax)\n        :return: dbboxes: shape (n, 5) (x_ctr, y_ctr, w, h, angle)\n        '
    bboxes = paddle.reshape(bboxes, [(- 1), 4])
    num_boxes = paddle.shape(bboxes)[0]
    x_ctr = ((bboxes[:, 2] + bboxes[:, 0]) / 2.0)
    y_ctr = ((bboxes[:, 3] + bboxes[:, 1]) / 2.0)
    edges1 = paddle.abs((bboxes[:, 2] - bboxes[:, 0]))
    edges2 = paddle.abs((bboxes[:, 3] - bboxes[:, 1]))
    rbox_w = paddle.maximum(edges1, edges2)
    rbox_h = paddle.minimum(edges1, edges2)
    inds = (edges1 < edges2)
    inds = paddle.cast(inds, 'int32')
    rboxes_angle = ((inds * np.pi) / 2.0)
    rboxes = paddle.stack((x_ctr, y_ctr, rbox_w, rbox_h, rboxes_angle), axis=1)
    return rboxes
:param bboxes: shape (n, 4) (xmin, ymin, xmax, ymax)
:return: dbboxes: shape (n, 5) (x_ctr, y_ctr, w, h, angle)
def rect2rbox(self, bboxes):
    '\n        :param bboxes: shape (n, 4) (xmin, ymin, xmax, ymax)\n        :return: dbboxes: shape (n, 5) (x_ctr, y_ctr, w, h, angle)\n        '
    bboxes = paddle.reshape(bboxes, [(- 1), 4])
    num_boxes = paddle.shape(bboxes)[0]
    x_ctr = ((bboxes[:, 2] + bboxes[:, 0]) / 2.0)
    y_ctr = ((bboxes[:, 3] + bboxes[:, 1]) / 2.0)
    edges1 = paddle.abs((bboxes[:, 2] - bboxes[:, 0]))
    edges2 = paddle.abs((bboxes[:, 3] - bboxes[:, 1]))
    rbox_w = paddle.maximum(edges1, edges2)
    rbox_h = paddle.minimum(edges1, edges2)
    inds = (edges1 < edges2)
    inds = paddle.cast(inds, 'int32')
    rboxes_angle = ((inds * np.pi) / 2.0)
    rboxes = paddle.stack((x_ctr, y_ctr, rbox_w, rbox_h, rboxes_angle), axis=1)
    return rboxes