def forward(self, head_out, rois, im_shape, scale_factor):
    '\n        Decode the bbox and do NMS if needed. \n\n        Args:\n            head_out (tuple): bbox_pred and cls_prob of bbox_head output.\n            rois (tuple): roi and rois_num of rpn_head output.\n            im_shape (Tensor): The shape of the input image.\n            scale_factor (Tensor): The scale factor of the input image.\n        Returns:\n            bbox_pred (Tensor): The output prediction with shape [N, 6], including\n                labels, scores and bboxes. The size of bboxes are corresponding\n                to the input image, the bboxes may be used in other branch.\n            bbox_num (Tensor): The number of prediction boxes of each batch with\n                shape [1], and is N.\n        '
    if (self.nms is not None):
        (bboxes, score) = self.decode(head_out, rois, im_shape, scale_factor)
        (bbox_pred, bbox_num, _) = self.nms(bboxes, score, self.num_classes)
    else:
        (bbox_pred, bbox_num) = self.decode(head_out, rois, im_shape, scale_factor)
    return (bbox_pred, bbox_num)
Decode the bbox and do NMS if needed. 

Args:
    head_out (tuple): bbox_pred and cls_prob of bbox_head output.
    rois (tuple): roi and rois_num of rpn_head output.
    im_shape (Tensor): The shape of the input image.
    scale_factor (Tensor): The scale factor of the input image.
Returns:
    bbox_pred (Tensor): The output prediction with shape [N, 6], including
        labels, scores and bboxes. The size of bboxes are corresponding
        to the input image, the bboxes may be used in other branch.
    bbox_num (Tensor): The number of prediction boxes of each batch with
        shape [1], and is N.
def forward(self, head_out, rois, im_shape, scale_factor):
    '\n        Decode the bbox and do NMS if needed. \n\n        Args:\n            head_out (tuple): bbox_pred and cls_prob of bbox_head output.\n            rois (tuple): roi and rois_num of rpn_head output.\n            im_shape (Tensor): The shape of the input image.\n            scale_factor (Tensor): The scale factor of the input image.\n        Returns:\n            bbox_pred (Tensor): The output prediction with shape [N, 6], including\n                labels, scores and bboxes. The size of bboxes are corresponding\n                to the input image, the bboxes may be used in other branch.\n            bbox_num (Tensor): The number of prediction boxes of each batch with\n                shape [1], and is N.\n        '
    if (self.nms is not None):
        (bboxes, score) = self.decode(head_out, rois, im_shape, scale_factor)
        (bbox_pred, bbox_num, _) = self.nms(bboxes, score, self.num_classes)
    else:
        (bbox_pred, bbox_num) = self.decode(head_out, rois, im_shape, scale_factor)
    return (bbox_pred, bbox_num)