Spaces:
Sleeping
Sleeping
dreamlessx commited on
Commit ·
dc32c69
1
Parent(s): b55ddea
Fix image distortion: preserve aspect ratio, remove stretched side-by-side
Browse files
app.py
CHANGED
|
@@ -254,9 +254,7 @@ def process_image(image_rgb, procedure, intensity):
|
|
| 254 |
f"Processing time: {elapsed:.2f}s\n"
|
| 255 |
f"Mode: TPS (CPU)"
|
| 256 |
)
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
return wireframe_rgb, mask_vis, composited_rgb, side_by_side, info
|
| 260 |
|
| 261 |
except Exception as exc:
|
| 262 |
logger.error("Processing failed: %s\n%s", exc, traceback.format_exc())
|
|
@@ -483,7 +481,7 @@ with gr.Blocks(
|
|
| 483 |
out_mask = gr.Image(label="Surgical Mask", height=256)
|
| 484 |
with gr.Row():
|
| 485 |
out_result = gr.Image(label="Predicted Result", height=256)
|
| 486 |
-
out_sidebyside = gr.Image(label="
|
| 487 |
|
| 488 |
# -- Example images --
|
| 489 |
if EXAMPLE_IMAGES:
|
|
|
|
| 254 |
f"Processing time: {elapsed:.2f}s\n"
|
| 255 |
f"Mode: TPS (CPU)"
|
| 256 |
)
|
| 257 |
+
return wireframe_rgb, mask_vis, composited_rgb, image_rgb_512, info
|
|
|
|
|
|
|
| 258 |
|
| 259 |
except Exception as exc:
|
| 260 |
logger.error("Processing failed: %s\n%s", exc, traceback.format_exc())
|
|
|
|
| 481 |
out_mask = gr.Image(label="Surgical Mask", height=256)
|
| 482 |
with gr.Row():
|
| 483 |
out_result = gr.Image(label="Predicted Result", height=256)
|
| 484 |
+
out_sidebyside = gr.Image(label="Original", height=256)
|
| 485 |
|
| 486 |
# -- Example images --
|
| 487 |
if EXAMPLE_IMAGES:
|