Perception - Depth Estimation

This project uses FCRN for Depth Estimation in autonomous-driving scenes. Monocular Depth Estimation predicts the depth of every pixel from a single camera image and is a core technology for cost-effective 3D environmental perception in autonomous driving.

The download link for the complete project is:https://github.com/TOPSlearningcenter/deep_esi

Given belowModel Overview, click on the rightRun Code Online

Model Overview

1. Model overview:

《Deeper Depth Prediction with Fully Convolutional Residual Networks》 It is one of the classic papers on monocular depth estimation. It proposes a fully convolutional residual network structure (Fast Convolutional Residual Network, FCRN), which uses an encoder-decoder architecture to achieve high-precision real-time depth reasoning through the residual module and upsampling layer, and can effectively identify obstacle distances in complex road scenes.

2. Model Architecture:

  • Encoder: extracts high-level semantic features from the input image. A pretrained convolutional neural network such as VGG or ResNet is commonly used as the backbone; stacked convolutions gradually reduce the spatial resolution of feature maps while increasing channel count.
  • Decoder: progressively upsamples the features extracted by the encoder, restores the input image’s spatial resolution, and generates a pixel-level depth map.
  • BerHu loss function: combines the advantages of L1 and L2 losses. For small errors, the BerHu loss function uses L1 loss, which makes it more robust to outliers because L1 loss penalizes large errors less. For large errors, the BerHu loss function uses L2 loss, which makes it smoother under large errors and contributes to the stability and convergence of the gradient descent algorithm. By combining L1 and L2 losses, the BerHu loss function performs well when dealing with errors of different scales and is suitable for various regression tasks.

3. Implementation:

  • Data loading: load RGB and depth images, apply data augmentation, and build the dataset and data loader.
  • Training: define the BerHu loss function and train the U-Net model using the Adam optimizer.
  • Testing/visualization: run model inference and visualize the output images.