Spaces:
Running
on
Zero
Running
on
Zero
return inputs
Browse files
app.py
CHANGED
@@ -284,12 +284,14 @@ def infer(
|
|
284 |
)
|
285 |
)
|
286 |
|
287 |
-
room_image_cropped = room_image.crop(
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
|
|
293 |
room_image_padded, room_image_padded_size = pad(
|
294 |
room_image_cropped,
|
295 |
(max_dimension, max_dimension),
|
@@ -311,12 +313,14 @@ def infer(
|
|
311 |
ImageFilter.GaussianBlur(radius=kernel_size_blur)
|
312 |
)
|
313 |
|
314 |
-
room_mask_cropped = room_mask_blurred.crop(
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
|
|
|
|
320 |
room_mask_padded, _ = pad(
|
321 |
room_mask_cropped,
|
322 |
(max_dimension, max_dimension),
|
@@ -372,6 +376,9 @@ def infer(
|
|
372 |
)["images"]
|
373 |
|
374 |
final_images = []
|
|
|
|
|
|
|
375 |
for image in results_images:
|
376 |
final_image = room_image.copy()
|
377 |
|
|
|
284 |
)
|
285 |
)
|
286 |
|
287 |
+
room_image_cropped = room_image.crop(
|
288 |
+
(
|
289 |
+
mask_bbox_x_min,
|
290 |
+
mask_bbox_y_min,
|
291 |
+
mask_bbox_x_max,
|
292 |
+
mask_bbox_y_max,
|
293 |
+
)
|
294 |
+
)
|
295 |
room_image_padded, room_image_padded_size = pad(
|
296 |
room_image_cropped,
|
297 |
(max_dimension, max_dimension),
|
|
|
313 |
ImageFilter.GaussianBlur(radius=kernel_size_blur)
|
314 |
)
|
315 |
|
316 |
+
room_mask_cropped = room_mask_blurred.crop(
|
317 |
+
(
|
318 |
+
mask_bbox_x_min,
|
319 |
+
mask_bbox_y_min,
|
320 |
+
mask_bbox_x_max,
|
321 |
+
mask_bbox_y_max,
|
322 |
+
)
|
323 |
+
)
|
324 |
room_mask_padded, _ = pad(
|
325 |
room_mask_cropped,
|
326 |
(max_dimension, max_dimension),
|
|
|
376 |
)["images"]
|
377 |
|
378 |
final_images = []
|
379 |
+
final_images.append(image)
|
380 |
+
final_images.append(mask)
|
381 |
+
|
382 |
for image in results_images:
|
383 |
final_image = room_image.copy()
|
384 |
|