def convert_segmentation_bbox(bbox: dict, page: dict) -> dict:
    """
    Convert bounding box from the segmentation result to the scale of the characters bboxes of the document.

    :param bbox: Bounding box from the segmentation result
    :param page: Page information
    :return: Converted bounding box.
    """
    original_size = page['original_size']
    image_size = page['size']
    factor_y = original_size[1] / image_size[1]
    factor_x = original_size[0] / image_size[0]
    height = image_size[1]

    temp_y0 = (height - bbox['y0']) * factor_y
    temp_y1 = (height - bbox['y1']) * factor_y
    bbox['y0'] = temp_y1
    bbox['y1'] = temp_y0
    bbox['x0'] = bbox['x0'] * factor_x
    bbox['x1'] = bbox['x1'] * factor_x

    return bbox