TL;DR
FastDepth is a lightweight, high-throughput monocular depth estimation model designed specifically for embedded systems like micro-aerial vehicles (drones). By combining an efficient encoder-decoder architecture with hardware-aware pruning and specialized compilation, it achieves a staggering 178 fps on an NVIDIA Jetson TX2 GPU while maintaining accuracy close to much heavier state-of-the-art models.
What Problem Does This Paper Address?
Depth sensing is a fundamental requirement for robotic navigation, mapping, and obstacle avoidance. While sensors like LiDAR provide high-quality depth data, they are often too bulky, heavy, and power-hungry for small platforms like micro-aerial vehicles (MAVs). Monocular cameras are an ideal alternative due to their small size and low cost, but estimating depth from a single RGB image is computationally expensive.
Existing state-of-the-art (SOTA) models for monocular depth estimation are built for accuracy, not speed. They rely on massive deep neural networks that are far too slow for real-time inference on embedded hardware. Furthermore, while much research has focused on making encoders (the part of the network that understands the image) efficient, the decoder (the part that reconstructs the high-resolution depth map) is often overlooked and becomes the primary computational bottleneck.
Methods
The authors propose FastDepth, an encoder-decoder network optimized for low-latency performance through several key strategies:
- Efficient Architecture: The model uses MobileNet as the encoder. For the decoder, the authors designed a custom lightweight module called NNConv5, which uses 5x5 convolutions followed by nearest-neighbor interpolation for upsampling.
- Depthwise Separable Convolutions: To slash computational costs, the authors replaced standard convolutions in the decoder with depthwise separable convolutions—a technique that factorizes a standard convolution into two smaller operations.
- Additive Skip Connections: Instead of the standard practice of concatenating feature maps from the encoder to the decoder (which increases the number of channels and thus the workload), FastDepth uses additive skip connections to help recover spatial details without increasing computational complexity.
- Hardware-Aware Pruning: They employed the NetAdapt algorithm to automatically identify and remove redundant channels in the network, specifically tailoring the model's size to the target hardware's constraints.
- TVM Compilation: Recognizing that standard deep learning frameworks (like PyTorch) often have unoptimized implementations for depthwise layers, the authors used the TVM compiler stack to generate hardware-specific code, significantly boosting execution speed on the Jetson TX2.
Datasets
The model was trained and evaluated on the NYU Depth v2 dataset, which is the standard benchmark for indoor monocular depth estimation. It contains RGB images and their corresponding depth maps captured by a Microsoft Kinect. The encoder was pre-trained on ImageNet.
Key Insights and Ideas
- The Decoder is the Real Bottleneck: In many dense prediction tasks, the decoder can dominate runtime because it operates on high-resolution data. FastDepth proves that simplifying the decoder is just as important as choosing an efficient encoder.
- Software Optimization is as Critical as Architecture: The authors found that simply changing the architecture wasn't enough. Using the TVM compiler provided a 3.5x speedup on the CPU and a 2.5x speedup on the GPU compared to standard PyTorch implementations, purely by optimizing how the operations are scheduled on the hardware.
- Addition > Concatenation for Speed: By using additive skip connections, the authors maintained the "detail-recovery" benefits of skip connections while keeping the channel counts low, preventing the "feature map explosion" that slows down traditional U-Net-style architectures.
- Pruning Works for Decoders Too: While pruning is usually discussed in the context of image classification, this paper demonstrates it is highly effective for dense prediction decoders, achieving a 2x reduction in MACs (multiply-accumulate operations) with negligible accuracy loss.
Key Results
- Extreme Speed: FastDepth runs at 178 fps on the NVIDIA Jetson TX2 GPU and 27 fps on the TX2 CPU alone.
- Low Power: The system operates at an active power consumption of under 10W, making it viable for battery-powered drones.
- Competitive Accuracy: Despite being 65x faster than a ResNet-50 based baseline, FastDepth achieves a $\delta_1$ accuracy of 77.1% on NYU Depth v2 (compared to ~81% for much larger, slower SOTA models).
- Efficiency Gain: The final optimized model achieved an order of magnitude higher throughput than prior work while maintaining comparable accuracy.
Limitations and Future Work
- Indoor Focus: The evaluation was limited to the NYU Depth v2 indoor dataset. The paper does not explicitly explore how well this lightweight architecture generalizes to high-speed outdoor flight or diverse weather conditions.
- Accuracy Trade-off: While the accuracy is "close" to SOTA, there is still a measurable gap. For applications requiring extremely high precision (e.g., fine-grained manipulation), the trade-off might be too steep.
- Task Generalization: The authors suggest that their efficient encoder-decoder design could be applied to other dense prediction tasks like semantic segmentation, but this was not tested in the current study.
Summary updated