def __call__(self, mask_out, bboxes, bbox_num, origin_shape):
    '\n        Decode the mask_out and paste the mask to the origin image.\n\n        Args:\n            mask_out (Tensor): mask_head output with shape [N, 28, 28].\n            bbox_pred (Tensor): The output bboxes with shape [N, 6] after decode\n                and NMS, including labels, scores and bboxes.\n            bbox_num (Tensor): The number of prediction boxes of each batch with\n                shape [1], and is N.\n            origin_shape (Tensor): The origin shape of the input image, the tensor\n                shape is [N, 2], and each row is [h, w].\n        Returns:\n            pred_result (Tensor): The final prediction mask results with shape\n                [N, h, w] in binary mask style.\n        '
    num_mask = mask_out.shape[0]
    origin_shape = paddle.cast(origin_shape, 'int32')
    pred_result = paddle.zeros([num_mask, origin_shape[0][0], origin_shape[0][1]], dtype='int32')
    if ((bbox_num == 1) and (bboxes[0][0] == (- 1))):
        return pred_result
    pred_result = []
    for i in range(bboxes.shape[0]):
        (im_h, im_w) = (origin_shape[i][0], origin_shape[i][1])
        pred_mask = self.paste_mask(mask_out[i], bboxes[i:(i + 1), 2:], im_h, im_w)
        pred_mask = (pred_mask >= self.binary_thresh)
        pred_mask = paddle.cast(pred_mask, 'int32')
        pred_result.append(pred_mask)
    pred_result = paddle.concat(pred_result)
    return pred_result
Decode the mask_out and paste the mask to the origin image.

Args:
    mask_out (Tensor): mask_head output with shape [N, 28, 28].
    bbox_pred (Tensor): The output bboxes with shape [N, 6] after decode
        and NMS, including labels, scores and bboxes.
    bbox_num (Tensor): The number of prediction boxes of each batch with
        shape [1], and is N.
    origin_shape (Tensor): The origin shape of the input image, the tensor
        shape is [N, 2], and each row is [h, w].
Returns:
    pred_result (Tensor): The final prediction mask results with shape
        [N, h, w] in binary mask style.
def __call__(self, mask_out, bboxes, bbox_num, origin_shape):
    '\n        Decode the mask_out and paste the mask to the origin image.\n\n        Args:\n            mask_out (Tensor): mask_head output with shape [N, 28, 28].\n            bbox_pred (Tensor): The output bboxes with shape [N, 6] after decode\n                and NMS, including labels, scores and bboxes.\n            bbox_num (Tensor): The number of prediction boxes of each batch with\n                shape [1], and is N.\n            origin_shape (Tensor): The origin shape of the input image, the tensor\n                shape is [N, 2], and each row is [h, w].\n        Returns:\n            pred_result (Tensor): The final prediction mask results with shape\n                [N, h, w] in binary mask style.\n        '
    num_mask = mask_out.shape[0]
    origin_shape = paddle.cast(origin_shape, 'int32')
    pred_result = paddle.zeros([num_mask, origin_shape[0][0], origin_shape[0][1]], dtype='int32')
    if ((bbox_num == 1) and (bboxes[0][0] == (- 1))):
        return pred_result
    pred_result = []
    for i in range(bboxes.shape[0]):
        (im_h, im_w) = (origin_shape[i][0], origin_shape[i][1])
        pred_mask = self.paste_mask(mask_out[i], bboxes[i:(i + 1), 2:], im_h, im_w)
        pred_mask = (pred_mask >= self.binary_thresh)
        pred_mask = paddle.cast(pred_mask, 'int32')
        pred_result.append(pred_mask)
    pred_result = paddle.concat(pred_result)
    return pred_result