def METHOD_NAME(
    img: np.ndarray,
    ort_session: ort.InferenceSession,
    alpha_matting: bool = False,
    alpha_matting_foreground_threshold: int = 240,
    alpha_matting_background_threshold: int = 10,
    alpha_matting_erode_size: int = 10,
    post_process_mask: bool = False,
) -> Tuple[np.ndarray, np.ndarray]:
    # Flip channels to RGB mode and convert to PIL Image
    img = (img * 255).astype(np.uint8)
    _, _, c = get_h_w_c(img)
    if c == 3:
        img = cvtColor(img, COLOR_BGR2RGB)
    elif c == 4:
        img = cvtColor(img, COLOR_BGRA2RGB)
    pimg = Image.fromarray(img)
    session = new_session(ort_session)
    masks = session.predict(pimg)
    cutouts = []
    assert len(masks) > 0, "Model failed to generate masks"
    for mask in masks:
        if post_process_mask:
            mask = Image.fromarray(post_process(np.array(mask)))
        if alpha_matting:
            try:
                cutout = alpha_matting_cutout(
                    pimg,
                    mask,
                    alpha_matting_foreground_threshold,
                    alpha_matting_background_threshold,
                    alpha_matting_erode_size,
                )
            except ValueError:
                cutout = naive_cutout(pimg, mask)
        else:
            cutout = naive_cutout(pimg, mask)
        cutouts.append(cutout)
    cutout = pimg
    if len(cutouts) > 0:
        cutout = get_concat_v_multi(cutouts)
    return cvtColor(normalize(np.asarray(cutout)), COLOR_RGBA2BGRA), normalize(np.asarray(mask))  # type: ignore  pylint: disable=undefined-loop-variable