Spaces:
Configuration error
Configuration error
| title: "2D → 3D Reconstruction (GLPN + Open3D)" | |
| emoji: 🏠 | |
| colorFrom: indigo | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 4.29.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| tags: | |
| - depth-estimation | |
| - monocular | |
| - 3d-reconstruction | |
| - open3d | |
| - point-cloud | |
| - mesh | |
| - gradio | |
| - huggingface | |
| # 2D → 3D Reconstruction (GLPN + Open3D) | |
| This Space estimates **monocular depth** from a single RGB image using **GLPN**, builds an **RGB-D point cloud**, and reconstructs a **3D mesh** with Poisson surface reconstruction via **Open3D**. | |
| --- | |
| ## 🚀 How it works | |
| 1. Upload an image. | |
| 2. GLPN (NYU pretrained) → predict relative depth. | |
| 3. Open3D → convert RGB + depth → point cloud. | |
| 4. Poisson reconstruction → mesh (downloadable `.obj` and `.ply`). | |
| 5. Preview depth map, mesh snapshot, and explore the mesh interactively. | |
| --- | |
| ## 📦 Outputs | |
| - **Depth map** (colorized preview) | |
| - **Point cloud (.ply)** | |
| - **Mesh (.obj)** (with Gradio 3D viewer) | |
| - **Mesh preview PNG** (best-effort offscreen render, if available) | |
| --- | |
| ## ⚠️ Notes | |
| - Monocular depth has **no absolute scale** → geometry is up-to-scale only. | |
| - For metric accuracy, swap in stereo, multi-view SfM, or metric depth models (ZoeDepth, Depth Anything v2). | |
| - Works on **CPU or GPU** Spaces. GPU recommended for faster inference. | |
| --- | |
| ## 🛠️ Local Development | |
| ```bash | |
| git clone <this-space> | |
| cd <this-space> | |
| pip install -r requirements.txt | |
| python app.py | |