from PIL import Image
from unet import Unet

def unet_predict(
    image,
    count=False,
    name_classes=["_background_", "Egg white", "yolk", "Germinal disc"],
):
    unet = Unet()
    r_image = unet.detect_image(image, count=count, name_classes=name_classes)
    r_image.show()
    return r_image



image_path = r'D:\Users\Desktop\item\unet-pytorch\VOCdevkit\EGG_white\JPEGImages\fid_20250417_103420_reconstructed.jpg'
image = Image.open(image_path)
unet_predict(image)

    