endoscopy-depth-prediction
Overview
Interactive 3D depth-surface visualizations of endoscopy images and video, viewable in any browser. Two scripts, each producing a self-contained Plotly HTML file you can rotate, zoom, and (for video) animate:
Both include automatic black-border / text removal (the circular endoscope field of view and overlaid annotations) so only tissue is rendered.
PyTorch: The requirements.txt pins are generic. For GPU support, install the CUDA-matched build from pytorch.org first: bash pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124
The single-image script uses the original Depth-Anything-V2 PyTorch implementation (it produces finer-grained depth than the HF transformers port). Clone it next to the scripts:
Model weights (~1.3 GB for the Large encoder) are downloaded automatically from HuggingFace on first run and cached locally.
Open the resulting .html file in a browser.
From the project’s README on GitHub.
At a glance
| Repository | Kentucky-Open-Science/endoscopy-depth-prediction |
|---|---|
| Research area | Other projects |
| Primary language | Python |
| License | MIT |
| Stars / forks | 0 / 0 |
| Open issues and pull requests | 0 |
| Created | 2026-08-06 |
| Last push | 2026-08-06 |
| Default branch | main |
What the README covers
- Quick start
- 1. Install dependencies
- 2. Clone the Depth-Anything-V2 package
- 3. Run
- How it works
- Single image (depth_to_3d.py)
- Video (depth_3d_video.py)
- Examples
- Single image
- Video
- Sample data
- Requirements
- Limitations
- License
Top contributors
- @mitchklusty (2 commits)
Get the code
git clone https://github.com/Kentucky-Open-Science/endoscopy-depth-prediction.git