This project converts a single 2D image into a 3D point cloud using monocular depth estimation powered by the GLPN deep learning model. The 3D scene is then visualized using Open3D.
This Python-based system:
- Loads a single 2D image
- Applies the
GLPN (Global-Local Path Network)model from Hugging Face to predict depth - Converts depth + RGB into an RGBD image
- Builds a 3D point cloud using Open3D
- Visualizes or exports the point cloud
- Quickly convert 2D concept art or objects to 3D form
- Enable depth perception using just RGB cameras
- Enhance flat images with pseudo-3D visuals or effects
- Pretrained Model: Leverages
vinvino02/glpn-nyufor accurate depth prediction - Offline: All computations run locally
- Flexible: Works on any standard image format (JPG, PNG)
- Lightweight: Requires no GPU (optional but beneficial)
- Python 3.8+
- PyTorch
- Open3D
- Transformers
- Pillow
- Matplotlib
pip install torch torchvision transformers pillow matplotlib open3d