TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Analysis of NaN Divergence in Training Monocular Depth Est...

Analysis of NaN Divergence in Training Monocular Depth Estimation Model

Bum Jun Kim, Hyeonah Jang, Sang Woo Kim

2023-11-07Depth EstimationMonocular Depth Estimation
PaperPDF

Abstract

The latest advances in deep learning have facilitated the development of highly accurate monocular depth estimation models. However, when training a monocular depth estimation network, practitioners and researchers have observed not a number (NaN) loss, which disrupts gradient descent optimization. Although several practitioners have reported the stochastic and mysterious occurrence of NaN loss that bothers training, its root cause is not discussed in the literature. This study conducted an in-depth analysis of NaN loss during training a monocular depth estimation network and identified three types of vulnerabilities that cause NaN loss: 1) the use of square root loss, which leads to an unstable gradient; 2) the log-sigmoid function, which exhibits numerical stability issues; and 3) certain variance implementations, which yield incorrect computations. Furthermore, for each vulnerability, the occurrence of NaN loss was demonstrated and practical guidelines to prevent NaN loss were presented. Experiments showed that both optimization stability and performance on monocular depth estimation could be improved by following our guidelines.

Results

TaskDatasetMetricValueModel
Depth EstimationNYU-Depth V2Delta < 1.250.9361MIM-Swin-V2
Depth EstimationNYU-Depth V2Delta < 1.25^20.9916MIM-Swin-V2
Depth EstimationNYU-Depth V2Delta < 1.25^30.9981MIM-Swin-V2
Depth EstimationNYU-Depth V2RMSE0.3046MIM-Swin-V2
Depth EstimationNYU-Depth V2absolute relative error0.0864MIM-Swin-V2
Depth EstimationNYU-Depth V2log 100.0365MIM-Swin-V2
Depth EstimationKITTI Eigen splitDelta < 1.250.9757MIM-Swin-V2
Depth EstimationKITTI Eigen splitDelta < 1.25^20.9974MIM-Swin-V2
Depth EstimationKITTI Eigen splitDelta < 1.25^30.9994MIM-Swin-V2
Depth EstimationKITTI Eigen splitRMSE2.0373MIM-Swin-V2
Depth EstimationKITTI Eigen splitRMSE log0.077MIM-Swin-V2
Depth EstimationKITTI Eigen splitSq Rel0.1458MIM-Swin-V2
Depth EstimationKITTI Eigen splitabsolute relative error0.0508MIM-Swin-V2
3DNYU-Depth V2Delta < 1.250.9361MIM-Swin-V2
3DNYU-Depth V2Delta < 1.25^20.9916MIM-Swin-V2
3DNYU-Depth V2Delta < 1.25^30.9981MIM-Swin-V2
3DNYU-Depth V2RMSE0.3046MIM-Swin-V2
3DNYU-Depth V2absolute relative error0.0864MIM-Swin-V2
3DNYU-Depth V2log 100.0365MIM-Swin-V2
3DKITTI Eigen splitDelta < 1.250.9757MIM-Swin-V2
3DKITTI Eigen splitDelta < 1.25^20.9974MIM-Swin-V2
3DKITTI Eigen splitDelta < 1.25^30.9994MIM-Swin-V2
3DKITTI Eigen splitRMSE2.0373MIM-Swin-V2
3DKITTI Eigen splitRMSE log0.077MIM-Swin-V2
3DKITTI Eigen splitSq Rel0.1458MIM-Swin-V2
3DKITTI Eigen splitabsolute relative error0.0508MIM-Swin-V2

Related Papers

$S^2M^2$: Scalable Stereo Matching Model for Reliable Depth Estimation2025-07-17$π^3$: Scalable Permutation-Equivariant Visual Geometry Learning2025-07-17Efficient Calisthenics Skills Classification through Foreground Instance Selection and Depth Estimation2025-07-16Vision-based Perception for Autonomous Vehicles in Obstacle Avoidance Scenarios2025-07-16MonoMVSNet: Monocular Priors Guided Multi-View Stereo Network2025-07-15Towards Depth Foundation Model: Recent Trends in Vision-Based Depth Estimation2025-07-15Cameras as Relative Positional Encoding2025-07-14ByDeWay: Boost Your multimodal LLM with DEpth prompting in a Training-Free Way2025-07-11