class_docstr: Convert rbbox format to poly format.
class_docstr_tok: ["Convert","rbbox","format","to","poly","format","."]
code: def apply(self, sample, context=None):
      assert "gt_rbox" in sample
      assert sample["gt_rbox"].shape[1] == 5
      rboxes = sample["gt_rbox"]
      polys = rbox2poly_np(rboxes)
      sample["gt_poly"] = polys
      xmin, ymin = polys[:, 0::2].min(1), polys[:, 1::2].min(1)
      xmax, ymax = polys[:, 0::2].max(1), polys[:, 1::2].max(1)
      sample["gt_bbox"] = np.stack([xmin, ymin, xmin, ymin], axis=1)
      return sample
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  from numbers import Number, Integral
  import cv2
  import numpy
  import math
  import copy
  from .operators import register_op, BaseOperator
  from ppdet.modeling.rbox_utils import poly2rbox_le135_np, poly2rbox_oc_np, rbox2poly_np
  from ppdet.utils.logger import setup_logger
  from ppdet.utils.compact import imagedraw_textsize_c
label_desc: Use image node_id 2 for calling the Rbox2Poly obj's underlying member method code with example usage: obj.apply(sample, context) and returns: sample