Bake uploads with the DL3DV model
Browse filesUploads used the general model because it scored 0.86 dB higher than
the DL3DV model on held-out frames of an iPhone video. That gap came
from the black rows at the bottom of the frames: with the rows cut the
DL3DV model is ahead (31.4 against 30.8 dB with π³ cameras), and with
refined cameras it is ahead on all four test sets, by 0.7 to 2.4 dB.
All gallery examples are DL3DV bakes, so the general model is no longer
loaded.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
15 unmodified lines1617181920212215 unmodified linesUpload images / a short orbit video → π³ pose estimation + TTB-DVSMreconstruction (one GPU call) → a time-boxed interactive viser viewer.Models (`nvidia/DVSM`): uploads are reconstructed with `DVSM-TTB-p8-general-960p`; the gallery examples were baked with `DVSM-TTB-p8-DL3DV-960p`.## ZeroGPU notesSelect **ZeroGPU** hardware in the Space Settings (it is not set via this15 unmodified lines1617181920212215 unmodified linesUpload images / a short orbit video → π³ pose estimation + TTB-DVSMreconstruction (one GPU call) → a time-boxed interactive viser viewer.Models (`nvidia/DVSM`): uploads are reconstructed with `DVSM-TTB-p8-DL3DV-960p`, the model the gallery examples were baked with.## ZeroGPU notesSelect **ZeroGPU** hardware in the Space Settings (it is not set via this
16 unmodified lines17181920212223242537 unmodified lines6364656667686970717255 unmodified lines12812913013113213313411 unmodified lines14614714814915015115216 unmodified lines"Start / Continue" to fork a new worker and rebuild the viewer from thealready-computed artifact on disk (no re-reconstruction).Models (nvidia/DVSM): uploads are reconstructed with DVSM-TTB-p8-general-960p; thegallery examples were baked with DVSM-TTB-p8-DL3DV-960p. A live session renders anartifact with the model that baked it."""from __future__ import annotations37 unmodified lines# ---------------------------------------------------------------------------# Config# ---------------------------------------------------------------------------# Uploaded images / videos are reconstructed with the general model. The gallery# examples were baked with the DL3DV model. An artifact records the variant that# baked it ("hf_variant") and has to be rendered with that same model.UPLOAD_VARIANT = "DVSM-TTB-p8-general-960p"EXAMPLE_VARIANT = "DVSM-TTB-p8-DL3DV-960p"# How long one held-GPU interactive session lasts before it must be renewed.# Bounded by the per-call duration cap and the user's daily quota55 unmodified lines# Module-level model load: download + keep on CPU (ZeroGPU convention).# Real `.cuda()` happens inside @spaces.GPU workers.# ---------------------------------------------------------------------------print(f"[app] loading {UPLOAD_VARIANT}, {EXAMPLE_VARIANT} + π³ to CPU ...", flush=True)from dvsm.models.DVSM import DecoderViewSynthesisModelfrom viser_app.pi3_estimator import load_pi3_model11 unmodified linesreturn DecoderViewSynthesisModel.from_hf_pretrained(variant).eval()DVSM_MODELS_CPU = {v: _load_dvsm(v) for v in (UPLOAD_VARIANT, EXAMPLE_VARIANT)}PI3_MODEL_CPU = load_pi3_model(flavor="pi3x", device="cpu").eval()print("[app] models ready (CPU)", flush=True)16 unmodified lines17181920212223242537 unmodified lines63646566676869707172737455 unmodified lines13013113213313413513613711 unmodified lines14915015115215315415516 unmodified lines"Start / Continue" to fork a new worker and rebuild the viewer from thealready-computed artifact on disk (no re-reconstruction).Models (nvidia/DVSM): uploads are reconstructed with DVSM-TTB-p8-DL3DV-960p, themodel the gallery examples were baked with. A live session renders an artifactwith the model that baked it."""from __future__ import annotations37 unmodified lines# ---------------------------------------------------------------------------# Config# ---------------------------------------------------------------------------# Uploaded images / videos are reconstructed with the DL3DV model, the one the# gallery examples were baked with (with refined cameras it is 0.7-2.4 dB ahead# of the general model on held-out views). An artifact records the variant that# baked it ("hf_variant") and has to be rendered with that same model; only the# variants named here are loaded.UPLOAD_VARIANT = "DVSM-TTB-p8-DL3DV-960p"EXAMPLE_VARIANT = "DVSM-TTB-p8-DL3DV-960p"# How long one held-GPU interactive session lasts before it must be renewed.# Bounded by the per-call duration cap and the user's daily quota55 unmodified lines# Module-level model load: download + keep on CPU (ZeroGPU convention).# Real `.cuda()` happens inside @spaces.GPU workers.# ---------------------------------------------------------------------------_VARIANTS = tuple(dict.fromkeys((UPLOAD_VARIANT, EXAMPLE_VARIANT)))print(f"[app] loading {', '.join(_VARIANTS)} + π³ to CPU ...", flush=True)from dvsm.models.DVSM import DecoderViewSynthesisModelfrom viser_app.pi3_estimator import load_pi3_model11 unmodified linesreturn DecoderViewSynthesisModel.from_hf_pretrained(variant).eval()DVSM_MODELS_CPU = {v: _load_dvsm(v) for v in _VARIANTS}PI3_MODEL_CPU = load_pi3_model(flavor="pi3x", device="cpu").eval()print("[app] models ready (CPU)", flush=True)
README.md+1-1
app.py+12-9