Spaces:
Sleeping
Sleeping
Commit ·
ef0824d
1
Parent(s): 9d42ecb
chore: initialize git hooks and update project configuration files
Browse files
app.py
CHANGED
|
@@ -239,7 +239,6 @@ def draw_patches_on_image(image_arr, positions, x_offset, y_offset, h, w):
|
|
| 239 |
|
| 240 |
# Create the greyed-out ambient background
|
| 241 |
grey_base = Image.fromarray(img).convert("L").convert("RGB")
|
| 242 |
-
grey_np = np.array(grey_base) * 0.4 + np.full_like(grey_np, 160) # Note: broadcasting handles full_like internally safely via float math
|
| 243 |
grey_base_np = (np.array(grey_base).astype(float) * 0.4 + 160).clip(0, 255).astype(np.uint8)
|
| 244 |
|
| 245 |
temp_img = Image.fromarray(grey_base_np)
|
|
|
|
| 239 |
|
| 240 |
# Create the greyed-out ambient background
|
| 241 |
grey_base = Image.fromarray(img).convert("L").convert("RGB")
|
|
|
|
| 242 |
grey_base_np = (np.array(grey_base).astype(float) * 0.4 + 160).clip(0, 255).astype(np.uint8)
|
| 243 |
|
| 244 |
temp_img = Image.fromarray(grey_base_np)
|