Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sharpiless/DMD3Cpp

Repository files navigation

DMD3C: Distilling Monocular Foundation Models for Fine-grained Depth Completion

Official implementation of the CVPR 2025 paper "Distilling Monocular Foundation Models for Fine-grained Depth Completion"



πŸ” Overview

Depth completion methods often suffer in regions with sparse or missing supervision, leading to inaccurate fine-grained structures and degraded depth quality.

DMD3C introduces a novel framework that distills rich geometric priors from monocular foundation models into the depth completion pipeline. By leveraging dense knowledge from foundation models, DMD3C significantly improves depth estimation quality, particularly in regions lacking ground-truth supervision.

Key Features

  • Distills geometric knowledge from monocular foundation models
  • Enhances fine-grained structure recovery
  • Improves depth estimation in sparse and unsupervised regions
  • Achieves strong performance on benchmark datasets


πŸš€ Getting Started

0. Conda Environment

You can directly build the environment by running the following command if you use conda as the environment management tool.

conda env create -f environment.yml

Compile the C++ and CUDA code:

cd exts
python setup.py install

1. Dataset Preparation

Please follow the dataset preparation instructions from:

πŸ‘‰ BP-Net

The structure of data directory should be:

└── datas
 └── kitti
 β”œβ”€β”€ data_depth_annotated
 β”‚ β”œβ”€β”€ train
 β”‚ └── val
 β”œβ”€β”€ data_depth_velodyne
 β”‚ β”œβ”€β”€ train
 β”‚ └── val
 β”œβ”€β”€ raw
 β”‚ β”œβ”€β”€ 2011_09_26
 β”‚ β”œβ”€β”€ 2011_09_28
 β”‚ β”œβ”€β”€ 2011_09_29
 β”‚ β”œβ”€β”€ 2011_09_30
 β”‚ └── 2011_10_03
 β”œβ”€β”€ test_depth_completion_anonymous
 β”‚ β”œβ”€β”€ image
 β”‚ β”œβ”€β”€ intrinsics
 β”‚ └── velodyne_raw
 └── val_selection_cropped
 β”œβ”€β”€ groundtruth_depth
 β”œβ”€β”€ image
 β”œβ”€β”€ intrinsics
 └── velodyne_raw

2. Training

Run the training script:

bash train.sh

Our models are trained on 8 GPU workstation with Nvidia GTX 4090 (48G).

3. Pretrained Models

Download pretrained checkpoints from:

πŸ‘‰ Hugging Face

Place the .pth file into "./checkpoints/PMP_Residual_Norm_ssil_KITTI/"

4. Submission

Generate predictions and submit results to the KITTI online benchmark:

bash submission.sh

The results will be save into "./results" folder.



🌍 DCVerse Benchmark

Download

To facilitate fair and reproducible evaluation of depth completion methods, we build DCVerse, a unified depth completion benchmark that standardizes the experimental settings across different methods and datasets.

DCVerse addresses inconsistencies commonly found in previous evaluations, including:

  • Unified input image resolution
  • Consistent sparse point sampling density
  • Standardized sparse sampling strategies
  • Unified evaluation metrics
  • Cross-dataset evaluation protocol

The benchmark enables more reliable and direct comparisons between different depth completion methods.

The benchmark and processed data can be found at:

πŸ‘‰ DCVerse on Hugging Face


Usage

#!/bin/bash
datasets=(
 ETH3D_SfM_Indoor_test
 ETH3D_SfM_Outdoor_test
 KITTIDC_test_LiDAR_64
 KITTIDC_test_LiDAR_32
 KITTIDC_test_LiDAR_16
 KITTIDC_test_LiDAR_8
 VOID_sample1500
 VOID_sample500
 VOID_sample150
 NYU_test_500
 NYU_test_200
 NYU_test_100
 NYU_test_50
 DDAD_val
)
mkdir -p results
for dataset in "${datasets[@]}"
do
 echo "======================================"
 echo "Running dataset: ${dataset}"
 echo "======================================"
 python test.py \
 gpus=[0] \
 name=PMP_Residual_Norm_ssil_KITTI_${dataset} \
 ++chpt=PMP_Residual_Norm_ssil_KITTI \
 net=PMP_Residual_Norm_fast \
 num_workers=4 \
 data=UNI \
 data.testset.mode=test \
 data.path=/PATH-TO-DATA/${dataset} \
 test_batch_size=1 \
 metric=MetricALL \
 ++save=true \
 2>&1 | tee "results/${dataset}.log"
done
echo "All tests finished."

The adapted implementations are available in the benchmarks/ directory.

Supported Methods

The current benchmark includes implementations of the following representative depth completion methods:

Category Methods
Classical Depth Completion LRRU, VPP4DC, CompletionFormer, ImprovingDC, BP-Net, DepthPrompting, OGNI-DC, DMD3C
Zero-shot Models G2-MD, Marigold-DC, SPNet, OMNI-DC, PacGDC
Ours Coming Soon

We continuously maintain and extend the benchmark to include newly proposed methods and stronger baselines, providing a unified platform for fair and reproducible depth completion evaluation.

πŸ“ Citation

If you find our work useful for your research, please consider citing:

@inproceedings{liang2025distilling,
 title={Distilling Monocular Foundation Models for Fine-grained Depth Completion},
 author={Liang, Yingping and Hu, Yutao and Shao, Wenqi and Fu, Ying},
 booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
 pages={22254--22265},
 year={2025}
}

πŸ™ Acknowledgement

This project is built upon and inspired by:

We sincerely thank the authors for making their code publicly available.

About

1st Place on KITTI Depth Completion Leaderboard, Official Code of "[CVPR 2025] Distilling Monocular Foundation Model for Fine-grained Depth Completion"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /