Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,9 @@ def process_image(image, prompt):
|
|
38 |
image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
|
39 |
imageio.imwrite("./data/data.png", image)
|
40 |
# Convert mask to grayscale format
|
41 |
-
mask_image = cv2.cvtColor(np.array(mask_image), cv2.COLOR_RGB2GRAY)
|
42 |
mask_image = mask_image.resize(image.size)
|
|
|
|
|
43 |
|
44 |
# Perform inpainting with LAMA
|
45 |
# input_dict = {"image": image, "mask": mask_image}
|
|
|
38 |
image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
|
39 |
imageio.imwrite("./data/data.png", image)
|
40 |
# Convert mask to grayscale format
|
|
|
41 |
mask_image = mask_image.resize(image.size)
|
42 |
+
mask_image = cv2.cvtColor(np.array(mask_image), cv2.COLOR_RGB2GRAY)
|
43 |
+
|
44 |
|
45 |
# Perform inpainting with LAMA
|
46 |
# input_dict = {"image": image, "mask": mask_image}
|