Spaces:
Running
on
Zero
Running
on
Zero
update blend
Browse files
app.py
CHANGED
@@ -4509,7 +4509,7 @@ with demo:
|
|
4509 |
ncut_image = ncut_image.resize(original_image.shape[:2][::-1], Image.LANCZOS)
|
4510 |
ncut_image = np.array(ncut_image)
|
4511 |
from ncut_pytorch import convert_to_lab_color
|
4512 |
-
ncut_image = convert_to_lab_color(ncut_image)
|
4513 |
blend_image = 0.5 * original_image + 0.5 * ncut_image
|
4514 |
blend_image = blend_image.astype(np.uint8)
|
4515 |
ncut_images[i] = Image.fromarray(blend_image)
|
|
|
4509 |
ncut_image = ncut_image.resize(original_image.shape[:2][::-1], Image.LANCZOS)
|
4510 |
ncut_image = np.array(ncut_image)
|
4511 |
from ncut_pytorch import convert_to_lab_color
|
4512 |
+
ncut_image = convert_to_lab_color(ncut_image/255) * 255
|
4513 |
blend_image = 0.5 * original_image + 0.5 * ncut_image
|
4514 |
blend_image = blend_image.astype(np.uint8)
|
4515 |
ncut_images[i] = Image.fromarray(blend_image)
|