(coordinate, with_label=True)
return np.array(boxes, dtype=np.float32)
:param coordinate: format [x_c, y_c, w, h, theta]
    :return: format [x1, y1, x2, y2, x3, y3, x4, y4]
:param coordinate: format [x_c, y_c, w, h, theta]
    :return: format [x1, y1, x2, y2, x3, y3, x4, y4]
: param coordinate : format [ x_c y_c w h theta ] : return : format [ x1 y1 x2 y2 x3 y3 x4 y4 ]
def forward_convert(coordinate, with_label=True):
    """
    :param coordinate: format [x_c, y_c, w, h, theta]
    :return: format [x1, y1, x2, y2, x3, y3, x4, y4]
    """

    boxes = []
    if with_label:
        for rect in coordinate:
            box = cv2.boxPoints(((rect[0], rect[1]), (rect[2], rect[3]), rect[4]))
            box = np.reshape(box, [-1, ])
            boxes.append([box[0], box[1], box[2], box[3], box[4], box[5], box[6], box[7], rect[5]])
    else:
        for rect in coordinate:
            box = cv2.boxPoints(((rect[0], rect[1]), (rect[2], rect[3]), rect[4]))
            box = np.reshape(box, [-1, ])
            boxes.append([box[0], box[1], box[2], box[3], box[4], box[5], box[6], box[7]])

    return np.array(boxes, dtype=np.float32)
def forward_convert ( coordinate , with_label = True ) : boxes = [ ] if with_label : for rect in coordinate : box = cv2 . boxPoints ( ( ( rect [ 0 ] , rect [ 1 ] ) , ( rect [ 2 ] , rect [ 3 ] ) , rect [ 4 ] ) ) box = np . reshape ( box , [ - 1 , ] ) boxes . append ( [ box [ 0 ] , box [ 1 ] , box [ 2 ] , box [ 3 ] , box [ 4 ] , box [ 5 ] , box [ 6 ] , box [ 7 ] , rect [ 5 ] ] ) else : for rect in coordinate : box = cv2 . boxPoints ( ( ( rect [ 0 ] , rect [ 1 ] ) , ( rect [ 2 ] , rect [ 3 ] ) , rect [ 4 ] ) ) box = np . reshape ( box , [ - 1 , ] ) boxes . append ( [ box [ 0 ] , box [ 1 ] , box [ 2 ] , box [ 3 ] , box [ 4 ] , box [ 5 ] , box [ 6 ] , box [ 7 ] ] ) return np . array ( boxes , dtype = np . float32 )