Spaces:
Sleeping
Sleeping
Highlight 2+6 image requirement on Upload tab
Browse files
app.py
CHANGED
|
@@ -211,10 +211,31 @@ def build_ui(checkpoint: str, config: str, test_root: str) -> Tuple[gr.Blocks, L
|
|
| 211 |
run_example_btn = gr.Button("Run on selected scene", variant="primary")
|
| 212 |
|
| 213 |
with gr.Tab("⬆ Upload your own", id="upload"):
|
| 214 |
-
gr.
|
| 215 |
f"""
|
| 216 |
-
|
| 217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
**What works best:**
|
| 219 |
- Frames from a *single short clip* (a few seconds of footage).
|
| 220 |
- Camera moves around a *mostly-static indoor scene* (matches training distribution).
|
|
@@ -223,20 +244,16 @@ Upload exactly **{NUM_INPUT} context images** and **{NUM_TARGET} target images**
|
|
| 223 |
**Automatic preprocessing:** non-square images are *center-cropped* to a square,
|
| 224 |
then resized to 256×256. EXIF orientation is respected (iPhone photos are
|
| 225 |
auto-rotated). RGBA / grayscale inputs are converted to RGB.
|
| 226 |
-
|
| 227 |
-
**Order matters:** images are read in upload order (drop them
|
| 228 |
-
chronologically). The model uses the context set to reconstruct the scene;
|
| 229 |
-
the target set is only used for the GT comparison and PSNR.
|
| 230 |
"""
|
| 231 |
)
|
| 232 |
with gr.Row():
|
| 233 |
input_upload = gr.File(
|
| 234 |
-
label=f"Context images
|
| 235 |
file_count="multiple",
|
| 236 |
file_types=["image"],
|
| 237 |
)
|
| 238 |
target_upload = gr.File(
|
| 239 |
-
label=f"Target images
|
| 240 |
file_count="multiple",
|
| 241 |
file_types=["image"],
|
| 242 |
)
|
|
|
|
| 211 |
run_example_btn = gr.Button("Run on selected scene", variant="primary")
|
| 212 |
|
| 213 |
with gr.Tab("⬆ Upload your own", id="upload"):
|
| 214 |
+
gr.HTML(
|
| 215 |
f"""
|
| 216 |
+
<div style="padding:14px 18px; margin: 6px 0 12px 0;
|
| 217 |
+
border:2px solid #ff7f00; border-radius:10px;
|
| 218 |
+
background: rgba(255,127,0,0.08);
|
| 219 |
+
font-size: 1.05em; text-align:center;">
|
| 220 |
+
<b>Required:</b>
|
| 221 |
+
exactly
|
| 222 |
+
<span style="display:inline-block; padding:2px 10px; margin:0 4px;
|
| 223 |
+
border-radius:999px; background:#ff7f00; color:white; font-weight:700;">
|
| 224 |
+
{NUM_INPUT} context images
|
| 225 |
+
</span>
|
| 226 |
+
and
|
| 227 |
+
<span style="display:inline-block; padding:2px 10px; margin:0 4px;
|
| 228 |
+
border-radius:999px; background:#ff7f00; color:white; font-weight:700;">
|
| 229 |
+
{NUM_TARGET} target images
|
| 230 |
+
</span>.
|
| 231 |
+
<br/><span style="font-size:0.9em; opacity:0.85;">
|
| 232 |
+
Anything else will be rejected. Drop images in chronological order.
|
| 233 |
+
</span>
|
| 234 |
+
</div>
|
| 235 |
+
"""
|
| 236 |
+
)
|
| 237 |
+
gr.Markdown(
|
| 238 |
+
"""
|
| 239 |
**What works best:**
|
| 240 |
- Frames from a *single short clip* (a few seconds of footage).
|
| 241 |
- Camera moves around a *mostly-static indoor scene* (matches training distribution).
|
|
|
|
| 244 |
**Automatic preprocessing:** non-square images are *center-cropped* to a square,
|
| 245 |
then resized to 256×256. EXIF orientation is respected (iPhone photos are
|
| 246 |
auto-rotated). RGBA / grayscale inputs are converted to RGB.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
"""
|
| 248 |
)
|
| 249 |
with gr.Row():
|
| 250 |
input_upload = gr.File(
|
| 251 |
+
label=f"📥 Context images — drop exactly {NUM_INPUT}",
|
| 252 |
file_count="multiple",
|
| 253 |
file_types=["image"],
|
| 254 |
)
|
| 255 |
target_upload = gr.File(
|
| 256 |
+
label=f"🎯 Target images — drop exactly {NUM_TARGET}",
|
| 257 |
file_count="multiple",
|
| 258 |
file_types=["image"],
|
| 259 |
)
|