Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
431 B
2
Indexable
Never
import numpy as np
from PIL import Image

im_num = "2"

image_path = "../FSC147/images_384_VarV2/" + im_num + ".jpg"
mask_path = "../FSC147/gt_density_map_adaptive_384_VarV2/" + im_num + ".npy"

image = Image.open(image_path)
mask = np.load(mask_path)

input_img = {
    "image": np.array(image),
    "mask": mask[..., 0].astype(np.uint8)
}

exec(open('app.py').read())

result = debug(input_img)
print(result)