| With the increasing improvement of people’s living standards,more and more attention has been paid to food safety.The production date mainly marked by dot matrix characters is not only an important basis for consumers to judge food safety,but also a guarantee for food safety by suppliers.Dot matrix characters is made up of discrete points spraying,easily affected by environment and equipment defects,such as deformation,lack of printed,dirt,etc.,using artificial detection time consuming,can’t meet the needs of production development and the market,the rise of artificial intelligence to promote the development of all views of life,the use of artificial intelligence technology to test the character will become a development trend.Therefore,in view of the above problems,this paper conducts an in-depth study on the detection method of dot matrix characters based on a deep learning model to improve the accuracy of dot matrix characters detection.The main content includes the following aspects:1.This paper summarized the status quo of character detection at home and abroad,the difficulties of dot matrix characters detection research,and the status quo of deep learning research,introduced the relevant theories of deep learning detection in detail,analyzed the key factors affecting the performance of deep learning detection,and selected the dot matrix characters detection based on the deep learning RefineDet network model.2.A Subsection Weighted Loss function(SWLoss)was proposed to solve the low accuracy of detecting the undefective lattice class imbalanced dot matrix characters in RefineDet network and the problem of unbalanced multi-task in the network itself.Firstly,by treating the inverse of the class number at each training batch as the heuristic interclass sample equilibrium factor,each class in the classification loss was summed according to the weight,which strengthened the concern on the learning of the minor classes.After that,a multi-task balancing factor was introduced to weigh classification loss and regression loss,which bridged the gap between the learning rates of multiple tasks.The results show that the m AP value of RefineDet based on SWLoss is as high as 97.06%,which is improved by 9.86% compared with the loss function used in the original network.The proposed loss function effectively solves the problem of low detection accuracy of class imbalanced dot matrix characters.3.An Attention R-FCN RefineDet(AF-RefineDet)with embedded Attention mechanism was proposed to solve the problem of low accuracy in detecting the defective lattice class imbalanced dot matrix characters.Firstly,the convolutional attention target scoring mechanism was paralleled after the first set of convolutional structures were extracted from the backbone features of RefineDet network,which was used to obtain the foreground target scoring map.Then,the score image was fused with the feature image obtained from the original trunk feature network to enhance the foreground target feature information and suppress irrelevant background information.Finally,the target was segmented at the output prediction end of the model,and the prediction was made through local information and combined with global prediction to improve the accuracy of target detection.The results show that the m AP value of RefineDet network with attention mechanism is as high as 97.94%,which is 1.73% higher than that of RefineDet network based on Subsection Weighted Loss function.The proposed attention mechanism can effectively improve the detection accuracy of defective dot matrix characters. |