作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (1): 182-189. doi: 10.19678/j.issn.1000-3428.0068403

• 图形图像处理 • 上一篇    下一篇

基于域泛化的轻量化图像分类算法

张倡倡*(), 吕卫东, 蔡子杰, 刘炎奎   

  1. 中国矿业大学计算机科学与技术学院, 江苏 徐州 221116
  • 收稿日期:2023-09-17 出版日期:2025-01-15 发布日期:2024-04-26
  • 通讯作者: 张倡倡

Lightweight Image Classification Algorithm Based on Domain Generalization

ZHANG Changchang*(), LÜ Weidong, CAI Zijie, LIU Yankui   

  1. Department of Computer Science and Technology, China University of Mining and Technology, Xuzhou 221116, Jiangsu, China
  • Received:2023-09-17 Online:2025-01-15 Published:2024-04-26
  • Contact: ZHANG Changchang

摘要:

现有睡岗数据集较少, 且现阶段分类算法存在泛化性差、推理速度慢等问题, 为此, 构建一个包含4 708张图像的睡岗数据集, 用于验证模型的识别精度和泛化能力, 并提出一种基于域泛化的轻量化图像分类算法Stable_MobileNet。首先, 对输入的图片填充短边, 使其保持图像中的人物比例; 其次, 进行图像增强和随机擦除, 用于扩充数据集; 接着, 引入高效的ECA注意力模块改进MobileNetv3_large网络; 最后, 使用稳定学习StableNet方法提高模型的泛化性, 通过学习训练样本的权重来消除特征之间的依赖关系, 这有助于模型摆脱环境的变化, 更专注于人物特征。在睡岗数据集上的实验结果表明, Stable_MobileNet平均推理速度相较MobileNetv3_large更快, 识别精度可达93.56%, 比MobileNetv3_large提高了2.23%。在与训练样本具有不同分布的测试集中, Stable_MobileNet的识别精度相较MobileNetv3_large提高了2.23%。

关键词: 域泛化, 轻量化网络, 睡岗识别, ECA模块, StableNet

Abstract:

To address the lack of Sleeping on Duty datasets, poor generalization of current classification algorithms, and slow inference speeds, a Sleeping on Duty dataset containing 4 708 images is constructed to verify the recognition accuracy and generalization ability of the model. Additionally, a lightweight image classification algorithm, Stable_MobileNet, based on domain generalization, is proposed. First, the input images are padded along the shorter edges to maintain the aspect ratio of people within the images, followed by image enhancement and random erasure to expand the dataset. Second, the Efficient Channel Attention (ECA) module is introduced to improve the MobileNetv3_large network. Finally, the stable learning method, StableNet, is applied to enhance the generalization of the model by learning the weights of the training samples, reducing feature dependency, and allowing the model to focus more on character features rather than environmental factors. Experimental results on the Sleeping on Duty dataset indicate that Stable_MobileNet achieves faster average inference compared to MobileNetv3_large, with a recognition accuracy of 93.56%, which is 2.23% higher than that of MobileNetv3_large. In the test set, where the sample distribution differed from that of the training set, the recognition accuracy of Stable_MobileNet is improved by 2.23%.

Key words: domain generalization, lightweight network, recognizing sleeping on duty, ECA module, StableNet