Introduction
Monocular Depth Estimation (MDE)—the process of inferring 3D depth information from a single 2D image—is a foundational task for a wide array of emerging technologies, including autonomous driving, robotics, and augmented reality (AR/VR). Recent advancements in the field have been driven by "foundation models" such as Metric3D and Depth Anything, which utilize massive Vision Transformer (ViT) backbones to achieve unprecedented accuracy.
However, these models come with significant computational and memory overheads. Deploying these high-fidelity models on resource-constrained edge devices, such as Application-Specific Integrated Circuits (ASICs), remains a formidable challenge. While Post-Training Quantization (PTQ) is a common strategy to reduce model size and latency by converting 32-bit floating-point (FP32) weights and activations into lower-precision integers (e.g., 8-bit or 4-bit), standard quantization techniques often fail when applied to MDE foundation models. This paper introduces QuartDepth, a hardware-algorithm co-design framework that enables efficient 4-bit quantization for MDE without sacrificing predictive accuracy.
The Challenge: Activation Outliers
The primary obstacle to quantizing MDE foundation models is the presence of extreme "outliers" in the activation channels, particularly within the decoders. Standard quantization methods typically use a linear mapping that scales the entire range of values into a fixed integer bit-width. When extreme outliers are present, this scaling either "squashes" the majority of the data into a tiny range (losing all precision) or clips the outliers (destroying critical structural information). In both scenarios, the resulting depth maps suffer from catastrophic accuracy degradation, making 4-bit (W4A4) or even 8-bit (W4A8) deployment unfeasible with traditional tools.
The QuartDepth Framework
QuartDepth addresses these challenges through a multi-stage optimization process that harmonizes algorithmic precision with hardware efficiency.
1. LogNP Activation Polishing
Rather than simply clipping outliers, QuartDepth introduces a novel "LogNP" (Logarithmic Normalization Polishing) technique. This transformation applies a logarithmic function to the activations, which smoothly pulls extreme values closer to the mean. This process creates a more normalized, "quantization-friendly" distribution. By preserving the relative differences between values in a logarithmic space, the model retains the information necessary for high-resolution depth prediction while fitting comfortably within a 4-bit integer range.
2. Activation Loss Compensation and Weight Reconstruction
To further minimize the quantization error, QuartDepth employs two additional algorithmic steps:
- Activation Loss Compensation: Before the weights are quantized, they are mathematically adjusted to compensate for the systematic errors introduced by the LogNP activation polishing. This ensures that the combined effect of weight and activation quantization remains as close to the original FP32 output as possible.
- Adaptive Weight Reconstruction: The framework utilizes AdaRound (Adaptive Rounding) to optimize weight quantization. By minimizing a second-order loss function, the system determines whether to round specific weights up or down, ensuring the compressed weights behave optimally within the network's architecture.
3. Hardware-Algorithm Co-Design
Complex mathematical operations like LogNP can introduce significant latency if implemented on standard hardware. To mitigate this, the authors designed a custom ASIC accelerator. This hardware features a Vector Compute Unit (VCU) equipped with a Special Function Unit (SFU) specifically optimized for LogNP calculations. By utilizing "kernel fusion," the hardware overlaps the polishing computation with memory transfers, effectively hiding the latency of the LogNP step and ensuring that the algorithmic improvements do not come at the cost of inference speed.
Experimental Results
The QuartDepth framework was evaluated using a minimal calibration set of only 32 images across diverse indoor (NYUv2, SUN RGB-D) and outdoor (KITTI, DIODE) benchmarks.
Accuracy and Precision
QuartDepth significantly outperforms existing PTQ methods such as BrecQ and standard MinMax quantization. In the W4A8 configuration, the framework achieves nearly lossless performance compared to the original FP32 foundation models. Even at the extreme W4A4 precision level, QuartDepth maintains high structural integrity in the predicted depth maps where other methods fail.
Speed and Efficiency
When tested on a simulated 28nm ASIC, the benefits of the co-design approach become clear:
- Real-Time Performance: A ViT-Small model at 256x256 resolution achieves 26.1 FPS, providing a 2x speedup over the FP32 baseline.
- Scaling to Foundation Models: For the massive ViT-Giant backbone, the W4A4 configuration delivers a 5.3x faster inference speed and a 5.5x improvement in power efficiency (measured in GMAC/W). Furthermore, the reduction in bit-width significantly decreases the required silicon area on the chip, lowering production costs.
Conclusion
QuartDepth demonstrates that 4-bit quantization for complex MDE foundation models is not only possible but highly efficient when algorithm and hardware are designed in tandem. By taming activation outliers through LogNP polishing and leveraging specialized ASIC units to handle the computation, QuartDepth paves the way for deploying state-of-the-art depth estimation on mobile devices, robots, and wearable AR hardware. Future research may extend this "polishing" philosophy to other dense prediction tasks, such as semantic segmentation, where activation outliers currently limit the potential of low-bit quantization.
Summary updated