Monodepth2 is a PyTorch implementation for monocular depth estimation that predicts depth from a single image using self-supervised learning.
The tool addresses the problem of estimating 3D depth information from monocular (single-camera) images without requiring ground-truth depth labels during training. It uses self-supervision, learning depth by comparing reconstructed views against actual images rather than relying on annotated depth data. The method trains neural networks to predict depth maps and camera motion jointly, enabling the model to learn meaningful depth representations from video sequences or stereo pairs without explicit depth supervision.
The project provides pretrained models ready for immediate use on single images, with different variants available including mono and stereo-trained options. Developers can run depth prediction on new images with a simple command-line interface. The tool suits computer vision applications requiring depth estimation where collecting ground-truth depth annotations is impractical, such as autonomous driving, 3D reconstruction, or robotics. The codebase is structured as a reference implementation accompanying a published research paper, making it appropriate for researchers validating the method or building upon the approach.
The project maintains a stable, research-focused codebase with documentation covering setup, prediction, and training workflows. The implementation has been tested across multiple PyTorch versions and Python environments, indicating attention to compatibility. Code is provided with clear examples for both single-image prediction and metric depth estimation using stereo-trained models, suggesting the maintainers prioritize practical usability alongside research reproducibility.