--- title: GLPN Single-View Depth β†’ Point Cloud β†’ Mesh emoji: 🧱 colorFrom: indigo colorTo: purple sdk: gradio sdk_version: 4.44.1 app_file: app.py python_version: "3.10" pinned: true models: - vinvino02/glpn-nyu tags: - depth-estimation - 3d-reconstruction - point-cloud - mesh - open3d - trimesh - transformers - gradio - single-view - computer-vision --- # Single-View Depth β†’ Point Cloud β†’ Mesh (GLPN + Open3D) This Space predicts depth from a single RGB image using **GLPN (NYU)**, back-projects to a point cloud, reconstructs a mesh (Ball Pivoting with Poisson fallback), and exports `PLY` and `GLB`. ## How to use 1. Upload one RGB image (indoor works best). 2. Click **Run**. 3. Inspect **Input vs Depth**, **Mesh Preview** (if available), and the **Interactive 3D (GLB)** viewer. 4. Download artifacts from the **Downloads** panel. ## Outputs - `input_vs_depth.png` – side-by-side original and depth (meters, contrast-clipped) - `point_cloud.ply` – colorized point cloud - `mesh.ply` – triangle mesh - `mesh.glb` – mesh for web viewers, Gradio `Model3D`, and downstream tools - `mesh_preview.png` – headless snapshot (may be absent in some environments) ## Notes - **OpenMP warnings fixed** by setting safe thread env vars at the top of `app.py`. - GPU is optional. The app auto-selects CUDA if available. - If GLB doesn’t render: check **Logs / Status**. The exporter is skipped if the mesh is empty. - For crisper meshes, try higher-texture images with clear geometry and lighting.