FQ-PETR:用于多视图3D目标检测的全量化位置嵌入变换
FQ-PETR: Fully Quantized Position Embedding Transformation for Multi-View 3D Object Detection
AI总结:
针对PETR系列多视图3D检测模型直接量化精度损失大的问题,本文提出全量化框架FQ-PETR,通过三项创新在W8A8配置下实现近浮点精度,最高降75%延迟,优于现有量化基线。
摘要:
基于相机的多视图3D检测对自动驾驶至关重要。PETR及其变体(PETRs)在基准测试中表现优异,但因计算成本高、内存占用大面临部署难题。量化是通过降低权重和激活位宽压缩深度神经网络的有效技术,然而直接将现有量化方法应用于PETRs会导致精度严重下降。该问题主要源于两大关键挑战:一是多模态特征(具体为图像特征与相机射线位置嵌入PE)之间存在显著幅值差异;二是非线性算子量化存在效率低和近似误差问题,这类算子通常依赖硬件不友好的计算。本文提出面向PETRs的全量化框架FQ-PETR,具备三项核心创新:1. 量化友好型激光雷达射线位置嵌入(QFPE):用激光雷达先验引导的单点采样与基于锚点的嵌入替换多点采样,消除逆sigmoid等存在问题的非线性操作,同时对齐PE与图像特征的尺度,保留精度;2. 双查找表(DULUT):该算法通过两个级联的线性LUT近似复杂非线性函数,以极少条目实现高保真度,无需专用硬件;3. 数值稳定后量化(QANS):在softmax数值稳定后执行量化,缓解大输入带来的注意力失真。在PETR、StreamPETR、PETRv2、MV2d等PETRs模型上,W8A8配置下的FQ-PETR取得了接近浮点模型的精度(精度下降1%),同时最高可降低75%延迟,性能显著优于现有训练后量化(PTQ)与量化感知训练(QAT)基线。
英文摘要:
Camera-based multi-view 3D detection is crucial for autonomous driving. PETR and its variants (PETRs) excel in benchmarks but face deployment challenges due to high computational cost and memory footprint. Quantization is an effective technique for compressing deep neural networks by reducing the bit width of weights and activations. However, directly applying existing quantization methods to PETRs leads to severe accuracy degradation. This issue primarily arises from two key challenges: (1) significant magnitude disparity between multi-modal features-specifically, image features and camera-ray positional embeddings (PE), and (2) the inefficiency and approximation error of quantizing non-linear operators, which commonly rely on hardware-unfriendly computations. In this paper, we propose FQ-PETR, a fully quantized framework for PETRs, featuring three key innovations: (1) Quantization-Friendly LiDAR-ray Position Embedding (QFPE): Replacing multi-point sampling with LiDAR-prior-guided single-point sampling and anchor-based embedding eliminates problematic non-linearities (e.g., inverse-sigmoid) and aligns PE scale with image features, preserving accuracy. (2) Dual-Lookup Table (DULUT): This algorithm approximates complex non-linear functions using two cascaded linear LUTs, achieving high fidelity with minimal entries and no specialized hardware. (3) Quantization After Numerical Stabilization (QANS): Performing quantization after softmax numerical stabilization mitigates attention distortion from large inputs. On PETRs (e.g. PETR, StreamPETR, PETRv2, MV2d), FQ-PETR under W8A8 achieves near-floating-point accuracy (1% degradation) while reducing latency by up to 75%, significantly outperforming existing PTQ and QAT baselines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。