The success of transformers in computer vision has led to several attempts to adapt them for mobile devices, but their performance remains unsatisfactory in some real-world applications. To address this issue, we propose PP-MobileSeg, a semantic segmentation model that achieves state-of-the-art performance on mobile devices. PP-MobileSeg comprises three novel parts: the StrideFormer backbone, the Aggregated Attention Module (AAM), and the Valid Interpolate Module (VIM). The four-stage StrideFormer backbone is built with MV3 blocks and strided SEA attention, and it is able to extract rich semantic and detailed features with minimal parameter overhead. The AAM first filters the detailed features through semantic feature ensemble voting and then combines them with semantic features to enhance the semantic information. Furthermore, we proposed VIM to upsample the downsampled feature to the resolution of the input image. It significantly reduces model latency by only interpolating classes present in the final prediction, which is the most significant contributor to overall model latency. Extensive experiments show that PP-MobileSeg achieves a superior tradeoff between accuracy, model size, and latency compared to other methods. On the ADE20K dataset, PP-MobileSeg achieves 1.57% higher accuracy in mIoU than SeaFormer-Base with 32.9% fewer parameters and 42.3% faster acceleration on Qualcomm Snapdragon 855. Source codes are available at https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.8.
翻译:计算机视觉领域中Transformers的成功应用,引发了将其适应于移动设备的多个尝试,然而这些方法在一些实际应用中的性能仍然不理想。为了解决这个问题,我们提出了PP-MobileSeg,一个在移动设备上实现最新技术性能的语义分割模型。PP-MobileSeg由三个新颖的组成部分组成:StrdeFormer骨干网络、聚合注意力模块(AAM)和有效插值模块(VIM)。四级StrdeFormer骨干网络通过MV3块和跨越式SEA注意力实现,能够以最小的参数开销提取丰富的语义和详细特征。AAM首先通过语义特征组合投票来过滤详细特征,然后将它们与语义特征相结合,以增强语义信息。此外,我们提出了VIM将向下采样的特征上采样到输入图像的分辨率,它通过仅插值最终预测中存在的类别,大幅度降低了模型延迟,这是整个模型延迟的最主要贡献因素。大量实验表明,PP-MobileSeg在精度、模型大小和延迟方面取得了优秀的权衡。在ADE20K数据集上,PP-MobileSeg比基于SeaFormer的32.9%更少的参数和42.3%更快的加速下,mIoU精度高1.57%。源代码可在 https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.8 获取。