| In the daily life of human beings,the catering industry has always played an indispensable role.However,there are still many problems in the traditional catering service model,such as low manual accounting efficiency and high operating costs.To deal with these problems,applying deep learning technology to the field of dish detection has gradually become a solution.However,the existing dish detection technology based on deep learning still has challenges such as a lack of multi-target dish image datasets,image interference,high real-time requirements,and unbalanced samples.Therefore,this paper improves the dish detection technology based on deep learning in response to the above challenges,and designs and implements a corresponding dish detection system to replace manual accounting.The research content of the paper is as follows:1.Construct a dish detection data set.The current public dish data sets are derived from classified data sets,and the types of dishes and the background environment are quite different from the actual scene,so it is difficult to achieve ideal results in practical applications.Therefore,to improve the reliability and accuracy of the dish detection system,this paper constructs the Chinese cuisine dataset FOOD9218 through actual data collection and data expansion methods based on CPL.The dataset includes 9218 collected and enhanced images of 43 categories of Chinese dishes,basically covering common types of dishes,and is more diverse and authentic than existing dish datasets.2.Improve the quality of the input image.Due to factors such as lighting and floating population in the real catering scene,the display screen has certain complexity and dynamics,and the noise of the environment and equipment will affect the quality of the input screen,thereby affecting the subsequent detection results.In response to the above problems,this paper designs an image preprocessing algorithm based on Homomorphic Filtering and C-BM3 D,which can optimize the structure and texture details in the image to the greatest extent,so that subsequent models can better learn the characteristics of dishes and improve the detection accuracy.3.Optimize the network structure.Chinese food dishes have the problems of high similarity and large size span of various dishes.This paper proposes a feature extraction network based on the coordinate attention mechanism to enhance the response to important information and improve the ability to extract positioning information and semantic information in dishes.Design a bidirectional feature pyramid network that integrates multi-scale feature maps,expands multi-scale feature extraction and fusion,and improves the NMS strategy to complete the precise positioning of the target dishes.4.Optimize the loss function.To solve the problem of unbalanced dish samples,the loss function has been improved.This paper mainly uses VFL to replace the Binary Cross Entropy Loss to better deal with the problem of extremely unbalanced positive and negative sample ratios.In addition,this paper also uses a new index CIo U to design the regression loss function.This index comprehensively considers the degree of overlap between the target boxes,the center point distance,and the area difference,which helps to enhance the robustness of the network to the target position.5.Experimental analysis and system design.In this paper,the improved dish detection algorithm is integrated into a dish detection system based on deep learning.In this paper,a large number of experimental analyzes were first conducted on the constructed FOOD9218 dataset.The experimental results verify the effectiveness and accuracy of the algorithm in this paper,its m AP reaches 97.33%,and the detection speed reaches 97 frames per second.In addition,the system designed in this paper can capture the dishes selected by the user through the camera,then use the designed algorithm to automatically detect the images of the dishes,and finally interact with the background database to realize the amount calculation and payment functions. |