LiDAR-PTQ: Post-Training Quantization for Point Cloud 3D Object Detection

Sifan Zhou,Liang Li,Xinyu Zhang,Bo Zhang,Shipeng Bai,Miao Sun,Ziyu Zhao,Xiaobo Lu,Xiangxiang Chu
2024-01-29
Abstract:Due to highly constrained computing power and memory, deploying 3D lidar-based detectors on edge devices equipped in autonomous vehicles and robots poses a crucial challenge. Being a convenient and straightforward model compression approach, Post-Training Quantization (PTQ) has been widely adopted in 2D vision tasks. However, applying it directly to 3D lidar-based tasks inevitably leads to performance degradation. As a remedy, we propose an effective PTQ method called LiDAR-PTQ, which is particularly curated for 3D lidar detection (both SPConv-based and SPConv-free). Our LiDAR-PTQ features three main components, \textbf{(1)} a sparsity-based calibration method to determine the initialization of quantization parameters, \textbf{(2)} a Task-guided Global Positive Loss (TGPL) to reduce the disparity between the final predictions before and after quantization, \textbf{(3)} an adaptive rounding-to-nearest operation to minimize the layerwise reconstruction error. Extensive experiments demonstrate that our LiDAR-PTQ can achieve state-of-the-art quantization performance when applied to CenterPoint (both Pillar-based and Voxel-based). To our knowledge, for the very first time in lidar-based 3D detection tasks, the PTQ INT8 model's accuracy is almost the same as the FP32 model while enjoying $3\times$ inference speedup. Moreover, our LiDAR-PTQ is cost-effective being $30\times$ faster than the quantization-aware training method. Code will be released at \url{
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the performance and efficiency challenges encountered when deploying LiDAR - based 3D object detectors on resource - constrained edge devices. Specifically, due to the high limitations of computing power and memory in edge devices (such as those in self - driving vehicles and robots), directly deploying existing 3D LiDAR detection models on these devices will lead to performance degradation. Although the Post - Training Quantization (PTQ) method has been widely adopted in 2D vision tasks and can effectively reduce the model size and improve the inference speed, when it is directly applied to 3D LiDAR detection tasks, it will inevitably lead to performance degradation. This is because point cloud data has higher sparsity and irregular distribution characteristics compared with image data, which makes it difficult for traditional quantization methods to be directly applicable to 3D LiDAR detection tasks. To solve this problem, the paper proposes an effective PTQ method named LiDAR - PTQ, which is specifically optimized for 3D LiDAR detection tasks. LiDAR - PTQ consists of three main components: 1. **Sparsity - based Calibration Method**: It is used to determine the initialization of quantization parameters, especially in the parameter space. 2. **Task - guided Global Positive Loss (TGPL)**: It reduces the performance gap in the model space by reducing the difference between the final prediction results before and after quantization. 3. **Adaptive Nearest - rounding Operation**: It minimizes the layer - by - layer reconstruction error, thereby further improving the performance of the quantized model. Through these methods, LiDAR - PTQ can significantly improve the inference speed while maintaining high accuracy, and is especially suitable for SPConv - based and SPConv - free 3D detection models. Experimental results show that LiDAR - PTQ outperforms existing PTQ methods on multiple datasets, and in some cases almost reaches the precision level of the floating - point model, while the inference speed is increased by three times. In addition, the quantization process of LiDAR - PTQ is 30 times faster than the Quantization - Aware Training (QAT) method, which is more efficient and economical.