codex-model / README.md
Tohru127's picture
Update README.md
b7c4f7f verified

A newer version of the Gradio SDK is available: 6.0.0

Upgrade
metadata
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

git clone <this-space>
cd <this-space>
pip install -r requirements.txt
python app.py