Spaces:
Running on Zero
Running on Zero
Commit History
-
Mask PCL sky by probability + cache-note in Output Formatβ Running
Switching the PCL sky filter from "depth >= MAX_DEPTH" to the sky probability mask (sigmoid'd sky logits stitched to ERP via cubemap_to_erp, threshold 0.3). The depth-saturation filter caught the sky core but left a halo: pixels in the smoothstep transition (sky_prob in roughly 0.15β0.45) get blended intermediate depths that survive the threshold and look like a dome at the sky boundary. Falls back to the depth threshold if the sky head is absent. Also note in the Output Format radio's info text that switching formats reuses the cached result and doesn't re-run inference (the cache hit path was already there; just surfacing it to users).7f6b755 -
Drop sky pixels from the point cloud (far-clamp filter)β
Sky was being kept in the point cloud as a far-field shell: the sky-fill saturates sky pixels at the (post-scale) MAX_DEPTH ceiling, but the PC keep mask was just (depth > 0) & edge_mask, so those points stayed. Add `sky_keep = depth < 0.99 * pager.MAX_DEPTH` to the mask β mirrors the filter already in PaGeR/generate_point_cloud.py. Works for indoor and outdoor (the sky always lands at >= MAX_DEPTH regardless of log_scale).71c982f
-
Show all examples on one page (examples_per_page = count)β
There are 10 example panoramas but examples_per_page was 8, so the gallery paginated into two pages even though they fit. Tie it to the example count so they all show on one page (and it stays correct as examples change).a7eb1f7 -
Point clouds replace maps (gradio bump); nudge colorbar up/rightβ
Point clouds were rendering *below* the maps instead of replacing them: the format toggle hides map_group via gr.update(visible=False), but gradio 6.0.2 (the Space's pinned sdk_version) has a regression where a visibility update shows a block but never hides it β so the maps stayed and the clouds stacked underneath. The main PaGeR repo "works" only because it runs an unpinned, newer gradio locally. Verified with a headless-Chrome + Playwright toggle test: 6.0.2 leaves both visible; 6.15.1 hides correctly and the clouds take the maps' place. Bump sdk_version 6.0.2 -> 6.15.1. Also nudge the metric-depth colorbar up and to the right (margin-top + a small translateX), keeping the "Depth [m]" title. Verified it stays fully on-screen down to 1280px width.61f1bd9 -
Fix output layout: equal-size maps, colorbar docked right (no overlap)β
The depth map rendered wider than the normals map and the colorbar overlapped the depth image, because the colorbar was absolutely positioned and the maps were sized independently. Two Gradio-6 quirks made the previous CSS ineffective: a gr.Group's elem_id isn't applied to its element, and the group carries a panel background that showed through as a stray grey strip. Restructure the output area: - Stack both maps in a single column so they're always the same width. - Put the colorbar in its own slim, non-growing column to their right (no absolute positioning, no overlap). - Use a gr.Column (elem_id works) instead of a gr.Group for the container and strip panel chrome so no background strip leaks beside the normals map. Verified by rendering the exact layout + CSS in real Gradio 6.0.2 via headless Chrome (dark theme, 1600/2000px): maps equal, bar right of the depth map, no overlap, no stray panel.6074f23 -
Fix off-screen depth colorbar: dock it in a reserved gutterβ
The metric colorbar was positioned at `left: 100%` of the depth wrapper β i.e. just past the right edge of the output column. That only fits when the window leaves margin there; the Space renders full-width, so the column is flush to the page edge and the bar fell off-screen on the right. Reserve a 128px gutter on the right of the depth map (`padding-right`) and dock the bar inside it with `right: 0`, so it sits beside the map at any viewport width. Match the normals map's width (`#normals-wrapper`) to the gutter-reduced depth map so the two panels stay aligned. Verified across 900/1280/1600px via a headless-Chrome render of the layout.a934392 -
Fix ZeroGPU startup: disable Xet, run inference behind @spaces.GPUβ
The Space moved to ZeroGPU (zero-a10g), which broke startup in three ways: - The HF Xet downloader can't write its cache inside the ZeroGPU sandbox ("Permission denied (os error 13)"), crashing when open_clip pulled the CLIP classifier weights at runtime. Force the classic HTTP downloader (HF_HUB_DISABLE_XET=1, set before huggingface_hub is imported) and also preload the CLIP repo at build time. - GPU work must run inside a @spaces.GPU window. Wrap _run_inference in @spaces.GPU(duration=120), import the spaces scheduler (no-op fallback for local/non-ZeroGPU dev), and guard the CUDA cleanup for when no device is attached. - The CLIP classifier ran a text-encoder forward pass in its constructor; on ZeroGPU a forward at import time has no GPU. Defer the centroid computation to first use (inside the GPU window) and keep only the weight load eager. Also align suggested_hardware with the deployed zero-a10g.aeea5fe
-
Trim demo to Space-essentials and refresh example panoramasβ
- Drop unused code paths from app.py (isolated-cluster removal, logger setup, MODEL_TO_REPO alias table) β the Space only ever runs the unified prs-eth/PaGeR checkpoint. - Strip src/utils/utils.py and src/utils/geometry_utils.py down to the helpers app.py actually imports. - Swap the example set for the eleven panoramas shipped in the main PaGeR repo (church / eth / library / medieval kitchen / quattro canti / zurich street corner / zurich tree intersection / etc.); drop the legacy alice / fish_eagle_hill / library.png / little_paris / etc.08fff05 -
Revert "Move demo example panoramas under assets/examples/"β
This reverts commit d13e4f358c1c343a003153e5a4c516cf8035b7ef.307b067 -
Move demo example panoramas under assets/examples/β
Consolidates the demo examples and (downstream) teaser image under a single assets/ root for the GitHub release repo. Updates EXAMPLES_DIR in app.py to match.2f535a3 -
Swap Places365 scene classifier for zero-shot CLIP ViT-B/32β
Replaces the perspective-view Places365-ResNet18 indoor/outdoor classifier with an OpenAI CLIP ViT-B/32 classifier (via open_clip) that scores the 4 equatorial cubemap faces against two text-prompt centroids. The cubemap is already built by the depth pipeline, so the router adds no extra projection cost. Also pulls in the latest SPDX headers from the upstream release.47efa14
-
rename io_classifier β scene_classifierβ
The "IO" name was a Places365 carry-over (their IO_places365.txt label file marks each category as Indoor/Outdoor). In Python "IO" reads as input/output by default and obscures what the module actually does. ``scene_classifier`` matches the existing ``--scene_mode`` flag and the ``_resolve_scene`` helper in app.py. The internal references to the upstream IO_places365.txt resource are kept intact.fad77c8 -
collapse --model + --checkpoint_path into a single --checkpoint flagβ
Accepts a short alias (pager / pager-metric-depth / pager-normals), a HuggingFace Hub repo id, or a local directory. Defaults to ``pager``, which resolves to prs-eth/PaGeR.3e6dc6c -
add the pager emoji to the demo title for consistencyβ
Matches the π prefix used in the GitHub README, the Space frontmatter emoji and the three model cards.4aaf666 -
fix: inject custom CSS via gr.HTML(<style>) instead of Blocks(css=)β
Gradio 6.0.2 removed/broke the ``Blocks(css=...)`` kwarg β it now falls through to ``BlockContext.__init__`` and crashes with ``TypeError: BlockContext.__init__() got an unexpected keyword 'css'``, which is what the live Space hit on first boot. Injecting the same stylesheet via a top-level ``gr.HTML('<style>...</style>')`` works across every 5.x/6.x release.998298c -
switch demo to the unified DA3-based PaGeR checkpointβ
- replace Marigold-style one-step diffusion app + pager with the feed-forward DA3-Giant build from PaGeR-release - vendor src/depth_anything_3/ for the backbone, sky head, dual scale heads (auto-routed by a Places365 classifier) - point preload_from_hub + models at the unified prs-eth/PaGeR repo - trim requirements to what app.py actually imports (drops diffusers, transformers, wandb, tqdm) and keep gradio 6.0.23de34d4
-
fix
0fafb9e -
fixed log scaling, use indoor instead of plain model
3caa38b
-
getting rid of some req
0ea0b3f
-
xformers issue fixed
9464f84 -
fix
7c4943a -
xformers removed
4567e8b -
Save work before migration
25abb1d