基于CNN与OpenCV的智能高校食堂管理系统
Intelligent University Canteen Management System Based on CNN and OpenCV
摘要: 全球范围内,传统食堂普遍面临供需失衡问题。此外,食堂与就餐者间信息不通畅,影响服务优化与用餐体验。为此,本文设计了一套基于深度学习的智能食堂管理系统,通过实时数据建模实现库存动态调整与菜品余量监控。本项目基于深度学习技术,采用CNN卷积神经网络与计算机视觉算法,通过部署高清摄像头采集图像数据,结合OpenCV进行动态分析,识别菜品的种类和剩余量,并综合历史消耗、反馈与菜品评价信息,为食堂提供调整建议。系统采用B/S架构,前端使用Vue.js,后端使用Django框架。核心功能包括:1) 基于CNN与OpenCV的菜品余量实时识别模型;2) 融合实时余量、历史销量与学生反馈数据的三层决策树补货建议模块;3) 基于协同过滤算法与评论情感分析的菜品优化推荐模块。实验表明,菜品余量识别模型在自建数据集(4000余张图像)上的准确率达到95.27%。本系统将深度学习技术应用于传统食堂管理场景,为校园餐饮的智能化升级提供了有价值的解决方案。
Abstract: Traditional cafeterias globally are commonly confronted with the imbalance between supply and demand. Furthermore, the information asymmetry between cafeterias and diners hampers service optimization and the dining experience. To address these issues, this paper proposes an intelligent cafeteria management system based on deep learning, which enables dynamic inventory adjustment and real-time dish leftover monitoring through data modeling. This project leverages deep learning technologies, employing Convolutional Neural Networks (CNN) and computer vision algorithms. High-definition cameras are deployed to capture image data, which is dynamically analyzed using OpenCV to accurately identify dish types and remaining quantities. By integrating historical consumption data, real-time feedback, and dish evaluations, the system provides recommendations for supply adjustments. The system adopts a B/S architecture, with a frontend built using Vue.js and a backend using the Django framework. Core functionalities include: 1) A real-time dish leftover recognition model based on CNN and OpenCV; 2) A three-tier decision tree replenishment suggestion module that integrates real-time leftovers, historical sales, and student feedback data; 3) A dish optimization recommendation module based on collaborative filtering algorithms and sentiment analysis of comments. Experimental results show that the dish leftover recognition model achieves an accuracy of 95.27% on a self-constructed dataset of over 4000 images. This system applies deep learning technologies to traditional cafeteria management scenarios, offering a valuable solution for the intelligent upgrading of campus dining services.
文章引用:常宁, 徐贞顺, 秦怀玉. 基于CNN与OpenCV的智能高校食堂管理系统[J]. 软件工程与应用, 2026, 15(2): 226-240. https://doi.org/10.12677/sea.2026.152022

参考文献

[1] 简凌宇. 大数据赋能校园食堂食品安全风险防控对策[J]. 服务科学和管理, 2026, 15(1): 195-199. [Google Scholar] [CrossRef
[2] 孙畅, 刘海隆, 宋梦微, 等. 面向边缘计算的轻量化菜品识别方法研究[J]. 包装与食品机械, 2025, 43(6): 10-18.
[3] 秦立峰, 周馨怡, 高延年, 等. 基于CNN与Transformer混合模型的自然场景奶牛身份重识别[J/OL]. 农业工程学报: 1-13.
https://link.cnki.net/urlid/11.2047.S.20260310.1707.054, 2026-03-11.
[4] 赵慎, 李广选, 周鲜成, 等. 多无人机射频信号CNN|Triplet-DNN异构网络特征提取与机型识别[J/OL]. 电子与信息学报: 1-11.
https://link.cnki.net/urlid/11.4494.TN.20260301.1549.002, 2026-03-12.
[5] Goceri, E. (2025) An Efficient Network with CNN and Transformer Blocks for Glioma Grading and Brain Tumor Classification from MRIs. Expert Systems with Applications, 268, Article ID: 126290. [Google Scholar] [CrossRef
[6] Spirto, M., Melluso, F., Nicolella, A., Malfi, P., Cosenza, C., Savino, S., et al. (2025) A Comparative Study between SDP-CNN and Time-Frequency-CNN Based Approaches for Fault Detection. Journal of Dynamics, Monitoring and Diagnostics, 5, 25-37. [Google Scholar] [CrossRef
[7] 王海, 孙兆永, 田益民, 张赛赛, 沈立文. 基于改进Yolov5航拍图像目标检测[J]. 软件工程与应用, 2023, 12(3): 455-462. [Google Scholar] [CrossRef
[8] 蒋博文, 王建富. 图像识别技术在农业病虫害监测中的实践与应用[J]. 人工智能与机器人研究, 2025, 14(6): 1551-1560. [Google Scholar] [CrossRef
[9] Xu, Y., Nie, J., Cen, H., Wen, B., Liu, S., Li, J., et al. (2023) An Image Detection Model for Aggressive Behavior of Group Sheep. Animals, 13, Article 3688. [Google Scholar] [CrossRef] [PubMed]
[10] Yee, L.K., Hamid, I.R.A., ChaiWen, C., Abdullah, Z., Kipli, K. and Foozy, C.F.M. (2024) Deepfake Image Detection Using ResNet50 Model. 2024 1st International Conference on Cyber Security and Computing (CyberComp), Melaka, 6-7 November 2024, 80-87. [Google Scholar] [CrossRef
[11] 彭棋, 刘雄章, 杨雨舟, 等. 雷达信号识别方法研究综述: 从传统机器学习到深度学习[J/OL]. 无线电工程: 1-17.
https://link.cnki.net/urlid/13.1097.TN.20260311.1337.008, 2026-03-12.
[12] Hussain, S.S., Shah, P.M., Dawood, H., Degang, X., Alshamayleh, A., Khan, M.A., et al. (2025) A Swin Transformer and CNN Fusion Framework for Accurate Parkinson Disease Classification in MRI. Scientific Reports, 15, Article No. 15117. [Google Scholar] [CrossRef] [PubMed]
[13] Satpute, R. and Onwe, C.P. (2024) CNN-LSTM Model for Deepfake Image Detection. 2024 2nd DMIHER International Conference on Artificial Intelligence in Healthcare, Education and Industry (IDICAIEI), Wardha, 29-30 November 2024, 1-6. [Google Scholar] [CrossRef
[14] 陈帅, 范光涛. 基于ViT大模型的安检X光图像违禁品识别研究[J]. 山东工业技术, 2026(1): 77-83.
[15] Disci, R., Gurcan, F. and Soylu, A. (2025) Advanced Brain Tumor Classification in MR Images Using Transfer Learning and Pre-Trained Deep CNN Models. Cancers, 17, Article 121. [Google Scholar] [CrossRef] [PubMed]