class_docstr: FCOSR Head, refer to https://arxiv.org/abs/2111.10780 for details 
class_docstr_tok: ["FCOSR","Head",",","refer","to","https",":","\/\/arxiv.org\/abs\/2111.10780","for","details"]
docstr: convert (x, y, w, h, angle) to (x1, y1, x2, y2, x3, y3, x4, y4)
  
  Args:
      pred_bboxes (Tensor): [B, N, 5]
  
  Returns:
      polys (Tensor): [B, N, 8]
docstr_tok: ["convert","(","x",",","y",",","w",",","h",",","angle",")","to","(","x1",",","y1",",","x2",",","y2",",","x3",",","y3",",","x4",",","y4",")","Args",":","pred_bboxes","(","Tensor",")",":","[","B",",","N",",","5","]","Returns",":","polys","(","Tensor",")",":","[","B",",","N",",","8","]"]
code: def _box2corners(self, pred_bboxes):
      """convert (x, y, w, h, angle) to (x1, y1, x2, y2, x3, y3, x4, y4)
  
      Args:
          pred_bboxes (Tensor): [B, N, 5]
  
      Returns:
          polys (Tensor): [B, N, 8]
      """
      x, y, w, h, angle = paddle.split(pred_bboxes, 5, axis=-1)
      cos_a_half = paddle.cos(angle) * 0.5
      sin_a_half = paddle.sin(angle) * 0.5
      w_x = cos_a_half * w
      w_y = sin_a_half * w
      h_x = -sin_a_half * h
      h_y = cos_a_half * h
      return paddle.concat(
          [
              x + w_x + h_x,
              y + w_y + h_y,
              x - w_x + h_x,
              y - w_y + h_y,
              x - w_x - h_x,
              y - w_y - h_y,
              x + w_x - h_x,
              y + w_y - h_y,
          ],
          axis=-1,
      )
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from .fcos_head import ScaleReg
  from ..initializer import bias_init_with_prob, constant_, normal_
  from ..ops import get_act_fn, anchor_generator
  from ..rbox_utils import box2corners
  from ..losses import ProbIoULoss
  import numpy
label_desc: Use image node_id 9 for calling the FCOSRHead obj's underlying member method code with example usage: obj._box2corners(pred_bboxes) and returns: paddle