## 3 Methodology
### Depth Scale Alignment  
One of the key challenges in monocular depth estimation, especially in dynamic scenes with moving objects, is scale ambiguity. In monocular depth estimation, the predicted depth values are inherently ambiguous in terms of scale because depth is only recovered up to an unknown scale factor. This ambiguity becomes even more pronounced in dynamic scenes where objects move independently of the camera. In such cases, depth predictions for moving objects often become misaligned with the static background, leading to inconsistent and inaccurate depth maps. To address this issue, we introduce the DSA module within the DI-MDE framework. The DSA module ensures that the predicted depth values for dynamic objects are consistent with the scale of the static background, thereby resolving the scale ambiguity between dynamic and static regions. The key idea behind the DSA module is to apply a learned scale factor to the depth predictions for moving objects, aligning their scale with that of the static background. In this section, we describe the depth scale-alignment problem, introduce the DSA module, and explain how it is integrated into the overall depth estimation framework. We also discuss how the scale alignment is learned and optimized during training. Monocular depth estimation is an inherently ill-posed problem because a single 2D image can be projected from many possible 3D scenes. The resulting depth predictions are only accurate up to an unknown scale factor. In static scenes, this scale ambiguity can often be mitigated by enforcing geometric constraints and using priors based on the scene structure. However, in dynamic scenes where objects are in motion relative to the camera, scale ambiguity is exacerbated. In dynamic regions, moving objects introduce a second layer of complexity, as the independent motion of these objects can lead to depth predictions that are inconsistent with the static background. For instance, a moving car may be predicted to have a depth that is much closer to or farther than its true distance relative to the static background. This inconsistency leads to incorrect depth maps and can severely affect downstream tasks such as 3D reconstruction or scene understanding. The DSA module is designed to resolve the scale ambiguity between dynamic and static regions by aligning the depth scales of moving objects with the static background. The DSA module operates on the depth predictions for both static and dynamic regions and applies a learned scale factor to the depth of dynamic objects. This ensures that the depth of moving objects is consistent with the overall depth scale of the scene. For each moving object o in the scene, the DSA module estimates a scale factor \(\beta_{o}\) that aligns the depth prediction of the object with the static background. The optimization of \(\beta_{o}\) is achieved through the scale-alignment loss, which minimizes discrepancies between the scaled depth of dynamic objects and the depth of nearby static regions. This process is supported by regularization strategies designed to prevent overfitting or convergence to incorrect scale factors, particularly in scenarios with weak or insufficient motion cues. The scale-alignment loss is applied only to dynamic regions identified using motion masks derived from optical flow. This selective application ensures that static regions or noise in the motion detection process do not adversely affect the optimization of \(\beta_{o}\). Additionally, a smoothness constraint is imposed on the depth predictions, discouraging abrupt depth discontinuities unless justified by image gradients. This constraint indirectly regularizes \(\beta_{o}\) by promoting spatial consistency in the depth map. The use of a single scalar factor for each dynamic object is based on the assumption that most objects exhibit near-rigid motion in typical scenes. Rigid objects, such as vehicles, can often be modeled as undergoing translation and rotation relative to the camera, resulting in a consistent scale ambiguity across the object.