arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.18692cs.CV
收藏

用于食品图像分类的轻量级视觉Transformer:结合窗口与空间注意力

Lightweight Vision Transformer with Window and Spatial Attention for Food Image Classification

School of Artificial Intelligence and Computer Science(人工智能与计算机科学学院)

Xinle Gao, Linghui Ye, Zhiyong Xiao

AI总结:

针对视觉Transformer在食品图像分类中参数量大、计算复杂度高的问题,本文提出融合窗口多头注意力与空间注意力的轻量级算法,在Food-101和Vireo Food-172上分别取得95.24%和94.33%准确率,并显著降低参数量和FLOPs,实现效率与性能的平衡。

摘要:

随着社会的快速发展和科学技术的不断进步,食品工业对生产质量和效率提出了越来越高的要求。食品图像分类在实现生产线自动化质量控制、支持食品安全监管以及促进智能农业生产方面发挥着至关重要的作用。然而,由于Vision Transformer模型参数量大、计算复杂度高,该任务面临诸多挑战。为了解决这些问题,我们提出了一种轻量级食品图像分类算法,该算法集成了窗口多头注意力机制(WMHAM)和空间注意力机制(SAM)。WMHAM通过高效的窗口划分捕获局部和全局上下文特征,从而降低计算成本;而SAM则自适应地强调关键空间区域,以增强判别性特征表示。在Food-101和Vireo Food-172数据集上进行的实验表明,我们的模型分别达到了95.24%和94.33%的准确率,同时与基线方法相比显著减少了参数量和FLOPs。这些结果证实,所提出的方法在计算效率和分类性能之间实现了有效平衡,非常适合部署在资源受限的环境中。

英文摘要:

With the rapid development of society and continuous advances in science and technology, the food industry increasingly demands higher production quality and efficiency. Food image classification plays a vital role in enabling automated quality control on production lines, supporting food safety supervision, and promoting intelligent agricultural production. However, this task faces challenges due to the large number of parameters and high computational complexity of Vision Transformer models. To address these issues, we propose a lightweight food image classification algorithm that integrates a Window Multi-Head Attention Mechanism (WMHAM) and a Spatial Attention Mechanism (SAM). The WMHAM reduces computational cost by capturing local and global contextual features through efficient window partitioning, while the SAM adaptively emphasizes key spatial regions to improve discriminative feature representation. Experiments conducted on the Food-101 and Vireo Food-172 datasets demonstrate that our model achieves accuracies of 95.24% and 94.33%, respectively, while significantly reducing parameters and FLOPs compared with baseline methods. These results confirm that the proposed approach achieves an effective balance between computational efficiency and classification performance, making it well-suited for deployment in resource-constrained environments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑