๐ก ๋ณธ ๋ฌธ์๋ '[Vision] Depth Estimation, Depth Completion and Depth refinement'์ ๋ํด ์ ๋ฆฌํด๋์ ๊ธ์ ๋๋ค.
3D space๋ฅผ ๋ค๋ฃจ๋ค๋ณด๋ฉด ์ ํํ ๊น์ด ์ ๋ณด๋ฅผ ์ฌ์ฉํด์ผํ ์ผ์ด ๋ง์ต๋๋ค. ์ด๋ ๋ค์ํ Depth ๊ด๋ จ ๋ฐฉ๋ฒ๋ก ๊ณผ ๊ทธ์ ๋ฐ๋ฅธ ์๊ณ ๋ฆฌ์ฆ์ด ์๋๋ฐ, ์ด๋ฅผ ๋ถ๋ฅํ์ฌ ์์ธํ ์ ๋ฆฌํ์์ผ๋ ์ฐธ๊ณ ํ์๊ธฐ ๋ฐ๋๋๋ค.
0. Depth Task ์ ๋ฆฌ
- Depth estimation: depth๊ฐ ์์๋ rgb ์ด๋ฏธ์ง๋ก ์ถ์ .
- Depth completion: ์ ํํ sparse depth๋ฅผ rgb ์ด๋ฏธ์ง๋ฅผ ๊ฐ์ด๋๋ก ํ์ฌ denseํ๊ฒ ์์ฑ
- Depth refinement/enhancement: denseํ depth๋ฅผ ๋์ฑ ๋ ํฅ์
1. Depth Estimation
Depth Estimation์ด๋ ๋ง ๊ทธ๋๋ก ์์์์ ๊น์ด๋ฅผ ์ถ์ ํ๋ ๊ฒ์ ๋๋ค.

์์ ๊ทธ๋ฆผ์ ์๋ก ์ค๋ช ์ ํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค. ์์ ๊ทธ๋ฆผ์์ ์ผ์ชฝ์ ์ฐจ๊ฐ ๊ฐ๊น์ด ์๊ณ , ๊ฐ์ด๋ฐ์ ์ค๋ฅธ์ชฝ ์ฌ์ด์ ๋ ธ๋์ ํ์งํ์ ์ผ์ชฝ์ ์ฐจ๋ณด๋ค๋ ๋ฉ๋ฆฌ ์์ต๋๋ค. ์ด์ ๊ฐ์ด ์ฌ๋์ ์ฌ์ง์ ๋ณด๊ณ , ์ด๋ค ๋ฌผ์ฒด๊ฐ ๊ฐ๊น์ด ์๊ณ , ์ด๋ค ๋ฌผ์ฒด๊ฐ ๋ฉ๋ฆฌ ์๋์ง๋ฅผ ๋๋ต์ ์ผ๋ก ์ ์ ์์ต๋๋ค. ํ์ง๋ง, ์ปดํจํฐ๋ ์ฌ์ง๋ง ๋ณด๊ณ ๊น์ด๋ฅผ ์ถ์ ํ๊ธฐ ์ด๋ ค์ ํฉ๋๋ค. ๋ฐ๋ผ์ ๊น์ด๋ฅผ ์ ์ ์๋๋ก Train์ ํ๋ ๊ฒ์ ๋๋ค. ์์ ๊ทธ๋ฆผ์์ ์๋ณธ ์ด๋ฏธ์ง ์๋์ ์๋ ๊ทธ๋ฆผ์ ๋ณด์๋ฉด, ๊ฐ๊น์ด ์๋ ๋ถ๋ถ์ ๋ฐ์์, ๋ฉ๋ฆฌ ์๋ ๋ถ๋ถ์ ์ด๋์ด ๋ณด๋ผ์์ผ๋ก ์ถ์ ๋ ๊ฒ์ ๋ณด์ค ์ ์์ต๋๋ค.
Depth Estimation์๋ Stereo์ Mono๊ฐ ์์ผ๋ฉฐ, ์ผ๋ฐ์ ์ผ๋ก Depth๋ฅผ ์ถ์ ํ๋๋ฐ๋ Stereo Camera๋ก ์ฐ์ Left Image์ Right Image๊ฐ ํ์ํฉ๋๋ค. Depth๋ Stereo Camera๋ก ์ฐ์ Left Image์ Right Image์์ ๋์ผ ์ ์ ์ฐ์์ ๋ ์ผ๋ง๋งํผ์ ์ฐจ์ด๊ฐ ๋๋์ง์ Disparity๋ฅผ ํตํด์ ๊ตฌํ ์ ์์ต๋๋ค.

๊ทธ๋ฆผ์์ ๋ณด๋ฉด ๋ถ๋ช ๊ฐ์ ์ด๋ฏธ์ง ์ธ ๊ฒ ๊ฐ์๋ฐ ์์น๊ฐ ์กฐ๊ธ์ฉ ๋ค๋ฅด์ฃ . ์ด๊ฒ์ด ๋ฐ๋ก Stereo Camera๋ก ์ดฌ์ํด ์ป์ Left Right image์ ๋๋ค. ๊ทธ๋ ๋ค๋ฉด ๊ถ๊ทน์ ์ผ๋ก Depth๋ฅผ ์ถ์ ํ๊ธฐ ์ํด์๋ Disparity๋ฅผ ์์์ผ ํ๊ณ , Disparity๋ฅผ ์๋ ค๋ฉด Left Image์ Right Image๊ฐ ๋ชจ๋ ํ์ํ๋ฉฐ ์ด ๋ Image์ ์ฐจ์ด์ธ disparity(์์ฐจ)๋ฅผ ๊ตฌํด์ผ ํ๋ ๊ฒ์ ๋๋ค.
์ถ๊ฐ๋ก, Mono Depth Estimation์ด๋ผ๋ ๊ฒ์ ๋ง ๊ทธ๋๋ก ํ๋์ Image๋ง์ ๊ฐ์ง๊ณ Depth๋ฅผ ์ถ์ ํ๋ ์์ ์ ๋๋ค.
1-1) Mono Depth Estimation
Dataset & Benchmark
NYU-Depth V2 (indoor)
- [PaperWithCode] Monocular Depth Estimation on NYU-Depth V2: https://paperswithcode.com/sota/monocular-depth-estimation-on-nyu-depth-v2
KITTI Eigen split (Outdoor)
- [KITTI] Depth Prediction Evaluation: https://www.cvlibs.net/datasets/kitti/eval_depth.php?benchmark=depth_prediction
Metric Depth Estimation
For the NYU Depth V2, the KITTI Eigen split datasets, and the SUN RGBD dataset,
- accuracy under the threshold (ฮดi < 1.25i, i = 1, 2, 3)
- mean absolute relative error (AbsRel)
- mean squared relative error (SqRel)
- root mean squared error (RMSE)
- root mean squared log error (RMSElog)
- mean log10 error (log10)
KITTI Eigen split (Outdoor)
- SILog: Scale invariant logarithmic error [log(m)*100] (for more info click on the formula below)
- sqErrorRel: Relative squared error(SqRel) (percent)
- absErrorRel: Relative absolute error(AbsRel) (percent)
- iRMSE: Root mean squared error of the inverse depth [1/km]
Model
Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data
a highly practical solution for robust monocular depth estimation by training on a combination of 1.5M labeled images and 62M+ unlabeled images.
- [Paper] Depth Anything: https://arxiv.org/pdf/2401.10891v1.pdf
- [Git] LiheYoung/Depth-Anything: https://github.com/LiheYoung/Depth-Anything
- [Git] fabio-sim/Depth-Anything-ONNX: https://github.com/fabio-sim/Depth-Anything-ONNX
- [Git] spacewalk01/depth-anything-tensorrt C++: https://github.com/spacewalk01/depth-anything-tensorrt
- [PaperWithCode] Depth Anything: https://paperswithcode.com/paper/depth-anything-unleashing-the-power-of-large#code
NDDepth: Normal-Distance Assisted Monocular Depth Estimation and Completion
- [Git] NDDepth: Normal-Distance Assisted Monocular Depth Estimation and Completion: https://github.com/ShuweiShao/NDDepth?tab=readme-ov-file
IEBins: Iterative Elastic Bins for Monocular Depth Estimation
IEBins: iterative elastic bins for the classification-regression-based MDE(Monocular Depth Estimation)
์ฌ๊ธฐ์ bin์ pointcloud์ ๊ฐ์ 3D space๋ฅผ small region์ผ๋ก ๋๋๋๋ฐ ์ฃผ๋ก ์ฌ์ฉํ๋ฉฐ, IEBins์ ์ด๋ฅผ adajptive ํ๊ฒ ๊ทธ๋ฃนํ ์ํจ ๋ฐฉ๋ฒ๋ก ์ ๋๋ค.
- [Git] ShuweiShao/IEBins: https://github.com/ShuweiShao/IEBins
1-2) Stereo Depth Estimation
stereo ์ด๋ฏธ์ง ๋จ์์ ์ด๋ฏธ geometry๋ก ๋๋ถ๋ถ์ ํฝ์ ๊ฐ์ depth๋ฅผ ์ป์ ์ ์์ด ๊ตณ์ด ๋ฅ๋ฌ๋์ ์ฐ๋? ์์ํด ํ ์ ์๋๋ฐ, ์ฌ์ค Epipolar Geometry์์ ์ป์ Depth๋ ์ข ๋ง์ด ์ ์ข์ต๋๋ค. Plane Sweep Stereo ์๊ณ ๋ฆฌ์ฆ์ผ๋ก Dense ํ Depth Image์ ์ป์ ์ ์๊ธดํ์ง๋ง, ๊ตฌ๋ฉ์ด ์ค๊ฐ์ค๊ฐ ๋ซ๋ ค ์์ด์ ์ฌ์ฉ์ ์ฉ์ดํ์ง ์์ต๋๋ค.
- camera parameter(calibration) : 2D โ 3D๋ก ๋ฐ๊ฟ์ฃผ๋ ๋ฐฉ์
- Cost volume : ๋ ์์์ ๊ฐ๋(Intensity)์ ์ฐจ์ด๋ฅผ ํฝ์ ๋จ์๋ก ๊ณ์ฐํ์ฌ ์ ์ฌ๋๋ฅผ ์ธก์ ํ๋ ๊ฒ
- disparty cost volumne (๋ ์ ํํ 3D ํฌ์ธํธ ํด๋ผ์ฐ๋ ์ถ์ ํ ์ ์๋ค.) - ์คํ ๋ ์ค ๋น์ ์๋ฆฌ๋ฅผ ํ์ฉํด 2D์ด๋ฏธ์ง๋ฅผ 3D point cloud๋ฅผ ์์ฑํ๊ธฐ ์ํ ์์.
- depth cost volume : ์์ชฝ ์ด๋ฏธ์ง ๋งค์นญ์ ํตํด ์ด๋ฏธ์ง๊ฐ ์ฐจ์ด๋ก depth ์ถ์ ์ ํ๋ ์๊ณ ๋ฆฌ์ฆ โ pseudo-LiDAR point cloud๋ฅผ ๊ตฌ์ฑํ๊ฒ ๋๋ค.
- commodity = stereo camera
- ์คํ
๋ ์ค ๋งค์นญ ์๊ณ ๋ฆฌ์ฆ
- ๋งค์นญ๋น์ฉ ๊ณ์ฐ(matching cost computation)
- ๋น์ฉ ์ ํฉ(cost aggregation) - cost volume์ ์ ๋ณด๋ฅผ ์ ํฉํด ๊ณ์ฐ โ ์ ๋ขฐ๋ ์ฆ๊ฐ
- ์์ฐจ ๊ณ์ฐ, ์ต์ ํ(disparty computation / optimization) - ๊ฑฐ๋ฆฌ๋ณํ์ ๊ฐ๋ฅํ๊ฒ ํ๋ค.
- ์์ฐจ ์ ์ (disparty)
- stereo disparity estimation : ์ํ ์คํ์ ์ ๊ฐ๋ ํ ์์ ์นด๋ฉ๋ผ๋ก๋ถํฐ ์บก์ฒ๋ ์ข์ฐ ํ ์์ ์์์์ ํด๋น ํฝ์ ๋ค์ ์ํ ์์น ์ฐจ์ด๋ฅผ ์ถ์ ํ๋ ๊ณผ์
๋ฌผ๋ก ์์ธ๋ Stereo ์นด๋ฉ๋ผ๋ focal length(๊ฑฐ๋ฆฌ) ๊ฐ ์งง์์ ์ ์ฌ์ฉํ์ง ์์ ํด๋น ์๊ณ ๋ฆฌ์ฆ๋ณด๋ค๋ mono depth estimation์ ์ง์ค์ ์ผ๋ก ๊ณต๋ถํ๋ ๊ฒ์ ์ถ์ฒํฉ๋๋ค.
2. Depth Completion
๋ชฉํ: ๋ผ์ด๋ค๋ก ์ป์ sparce depth ์ ๋ณด์ RGB ์ด๋ฏธ์ง์ corespondingํ์ฌ ์์ ํ depth ์ด๋ฏธ์ง๋ฅผ ๋ง๋๋ ๊ธฐ๋ฒ์ ๋๋ค.(completing and reconstructing)
๋ผ์ด๋ค๋ฅผ ์ด๋ฏธ์ง์ ํฌ์ํด ์ป์ Sparse Dense Map์ RGB ์์์ ๋ฅ๋ฌ๋ ๋ชจ๋ธ์ ์ฌ๋ ค Dense Depth Map์ ์ป์ด depth completion์ด๋ผ ๋ถ๋ฆ ๋๋ค. ํํ ์ด๋ฅผ Depth Estimation์ Ground Truth(GT)๋ก ์ฌ์ฉํ๊ณค ํฉ๋๋ค.

๋ฌผ๋ก ์ด๋ฅผ ํ์ฉํด์ SLAM์์ ์ป์ ๋งต์ ๋ด๋ถ๋ฅผ ์ฒด์ฐ๊ธฐ ์ํด์๋ ์ฌ์ฉํฉ๋๋ค.

Dataset & Benchmark
NYU-Depth V2 (indoor)
- [PaperWithCode] Monocular Depth Completion on NYU-Depth V2: https://paperswithcode.com/sota/depth-completion-on-nyu-depth-v2
KITTI Eigen split (Outdoor)
- [PaperWithCode] Depth Completion: https://paperswithcode.com/task/depth-completion/codeless
- [KITTI] Depth Completion Evaluation: https://www.cvlibs.net/datasets/kitti/eval_depth.php?benchmark=depth_completion
์ฐธ๊ณ
- [Youtube] Image-guided Depth Completion: A Non-linear Filters, Convolutions, and Transformer [Kim Kyeongseon]: https://www.youtube.com/watch?v=-tR5rYfin48
- [Blog] Depth Eestimation, Completion ๊ณต๋ถ: https://velog.io/@openjr/Depth-Eestimation-Completion-%EB%8F%99%ED%96%A5-%EA%B3%B5%EB%B6%80