def METHOD_NAME(file: str):
    with open(file, "rb") as f:
        data = f.read()
    img = Image(data, mime_type=MIMEType.PNG)
    _, res = predict_mask_rcnn({"image": img}, {"index": 0})
    bbox = res["bbox"]
    _img = PILImage.open(file)
    draw = ImageDraw.ImageDraw(_img)
    for box in bbox:
        x, y, w, h = box["bbox"]
        color = (
            random.randint(0, 255),
            random.randint(0, 255),
            random.randint(0, 255),
        )
        draw.rectangle((x, y, x + w, y + h), outline=color)
    return _img, bbox