基于神经网络算法的水果分类技术及其实现
Fruit Classification Technology and Its Implementation Based on Neural Network Algorithms
DOI: 10.12677/csa.2026.1610318, PDF,   
作者: 刘齐军:山东协和学院计算机学院,山东 济南;罗建书*, 冯 秀, 黄林香:湖南交通工程学院电气与信息工程学院,湖南 衡阳
关键词: 水果分类;神经网络;轻量化模型;CBAM注意力机制;MobileNetV2;Fruit Classification; Neural Networks; Lightweight Model; CBAM Attention Mechanism; MobileNetV2
摘要: 本文提出一种基于CBAM注意力机制改进的轻量级MobileNetV2水果分类系统。首先,以MobileNetV2为骨干网络,在其特征提取末端嵌入CBAM模块,通过通道注意力和空间注意力增强模型对水果关键判别区域的特征表达能力;其次,在训练过程中动态引入MixUp和CutMix混合增强策略,有效提升模型的泛化能力与鲁棒性;最后,基于Tkinter框架开发了可视化GUI演示程序。实验在10类常见水果数据集上进行,结果表明,改进后的模型在保持轻量化的同时取得了良好的分类准确率,验证了所提方法的有效性。
Abstract: This paper proposes a lightweight fruit classification system based on an improved MobileNetV2 with the CBAM attention mechanism. First, MobileNetV2 is adopted as the backbone network, and a CBAM module is embedded at the end of its feature extraction pathway to enhance the model’s ability to represent key discriminative regions of fruits through channel attention and spatial attention. Second, MixUp and CutMix data augmentation strategies are dynamically introduced during training to effectively improve the model’s generalization ability and robustness. Finally, a visual GUI demonstration program is developed using the Tkinter framework. Experiments are conducted on a dataset containing ten common fruit categories. The results show that the improved model achieves good classification accuracy while maintaining a lightweight architecture, demonstrating the effectiveness of the proposed method.
文章引用:刘齐军, 罗建书, 冯秀, 黄林香. 基于神经网络算法的水果分类技术及其实现[J]. 计算机科学与应用, 2026, 16(10): 141-155. https://doi.org/10.12677/csa.2026.1610318

参考文献

[1] Lu, T., Han, B., Chen, L., Yu, F. and Xue, C. (2021) A Generic Intelligent Tomato Classification System for Practical Applications Using Densenet-201 with Transfer Learning. Scientific Reports, 11, Article No. 15824.
https://doi.org/10.1038/s41598-021-95218-w
[2] Shahi, T.B., Sitaula, C., Neupane, A. and Guo, W. (2022) Fruit Classification Using Attention-Based MobileNetV2 for Industrial Applications. PLOS ONE, 17, e0264586.
https://doi.org/10.1371/journal.pone.0264586
[3] Udefi, M.A., Aina, S., Okegbile, D.S., et al. (2021) Recognition of West African Indigenous Fruits Using a Convolutional Neural Network Model. International Journal of Computer (IJC), 41, 10-24.
[4] 何伟. 基于卷积神经网络的果蔬识别与定位软件的设计与实现[J]. 现代信息科技, 2024, 8(16): 98-101, 106.
[5] 王士龙, 朱景焕, 王小明. 基于机器视觉的沙糖橘果皮破裂和缺陷检测[J]. 安徽农业科学, 2023, 51(9): 231-235.
[6] 刘素娇, 卢明星, 王春芳, 等. 基于改进鲸鱼优化CNN的红富士苹果外观分级方法[J]. 食品与机械, 2024, 40(4): 121-126.
[7] 简钦, 张雨墨, 简献忠. FC-CNN: 基于卷积神经网络的水果图像分类算法[J]. 农业装备与车辆工程, 2021, 59(1): 67-71.
[8] 黄玉富, 朴燕, 张汉辉. 基于多尺度特征融合的水果图像识别算法研究[J]. 长春理工大学学报(自然科学版), 2021, 44(1): 87-94.
[9] 刘敏聪, 任红卫, 王江龙, 等. 基于改进YOLOv5的水果识别分类算法[J]. 广东石油化工学院学报, 2024, 34(6): 49-54.
[10] 毕好昌, 黄宇. 基于VisionIntelliNet模型的水果分类检测设计与实验[J]. 西昌学院学报(自然科学版), 2025, 39(3): 82-91.
[11] 李银银, 刘磊, 孙大杰, 等. 基于改进的卷积神经网络水果分类算法设计[J]. 哈尔滨商业大学学报(自然科学版), 2024, 40(4): 413-422.
[12] 吴迪, 肖衍, 沈学军, 等. 基于改进Res2Net与迁移学习的水果图像分类[J]. 电子科技大学学报, 2025, 54(1): 62-71.
[13] 李莹, 刘梦莲, 何自芬, 等. 基于改进YOLOv8s的柑橘果实成熟度检测[J]. 农业工程学报, 2024, 40(24): 157-164.
[14] 吴晓瑶, 张佳琪, 李功燕, 等. 基于改进YOLOv8n-seg的樱桃叠果与瑕疵实时分割[J]. 农业工程学报, 2025, 41(8): 310-317.
[15] 颜玉洁, 俞玥, 孔天宇, 等. 深度学习驱动的机器视觉技术用于果蔬品质的智能感知: 进展、挑战、展望[J]. 食品科学, 2025, 46(22): 23-39.