def xywhr2xyrs(self, xywhr):
    xywhr = paddle.reshape(xywhr, [(- 1), 5])
    xy = xywhr[:, :2]
    wh = paddle.clip(xywhr[:, 2:4], min=1e-07, max=10000000.0)
    r = xywhr[:, 4]
    cos_r = paddle.cos(r)
    sin_r = paddle.sin(r)
    R = paddle.stack((cos_r, (- sin_r), sin_r, cos_r), axis=(- 1)).reshape([(- 1), 2, 2])
    S = (0.5 * paddle.nn.functional.diag_embed(wh))
    return (xy, R, S)
def xywhr2xyrs(self, xywhr):
    xywhr = paddle.reshape(xywhr, [(- 1), 5])
    xy = xywhr[:, :2]
    wh = paddle.clip(xywhr[:, 2:4], min=1e-07, max=10000000.0)
    r = xywhr[:, 4]
    cos_r = paddle.cos(r)
    sin_r = paddle.sin(r)
    R = paddle.stack((cos_r, (- sin_r), sin_r, cos_r), axis=(- 1)).reshape([(- 1), 2, 2])
    S = (0.5 * paddle.nn.functional.diag_embed(wh))
    return (xy, R, S)