| Deep learning technology has been widely used in image recognition,machine translation,unmanned driving and other fields.This topic comes from the actual needs of the cigarette sales management department.With the tightening of China ’s tobacco control policy,the promotion channels of tobacco brands are becoming narrower and narrower.The role of terminal display in the cultivation and promotion of various cigarette brands has become increasingly prominent.The identification and analysis of cigarette boxes is conducive to tobacco enterprises to carry out retail terminal information collection,inventory inventory and tobacco market performance evaluation.However,the current terminal display has problems such as inaccurate information extraction,high work intensity,low efficiency,and complex scenes.In order to solve these problems,this paper studies the cigarette variety recognition algorithm based on deep learning technology.The main work is as follows.(1)Making cigarette type data set.In view of the current lack of cigarette brand image data set,a large number of images are collected by reptiles and outdoor shooting.Considering the problems of glass reflection,occlusion,different angle placement and shooting blur during target detection,the target image is enhanced.The position of the processed image is calibrated by the labeling software,and a data set containing 21004 cigarette targets(including training set,verification set and test set)is produced.The dataset contains multi-scale and multi-form cigarette pictures in various complex scenes.(2)Aiming at the problems of insufficient and imperfect image features caused by mutual occlusion between different cigarette boxes in the detection of cigarette box types,this paper proposes an improved YOLOv5 algorithm based on CBAM and CA attention mechanism.Through experimental analysis,it is proved that compared with the original YOLOv5 algorithm,the improved algorithm not only improves the accuracy of cigarette box type detection,but also improves the robustness of the algorithm.(3)Aiming at the problems of multi-scale detection,target false detection,missed detection and insufficient feature extraction ability in current target detection,this paper uses two methods to improve the original YOLOv5 algorithm.The first is to add a bidirectional feature pyramid network(Bi FPN)to improve the neck structure of the YOLOv5 network.Using the multi-scale feature fusion characteristics of Bi FPN,the network can effectively fuse more features and improve the detection accuracy.Second,by adding a small target detection layer to the Head part of YOLOv5 algorithm,the improved network pays more attention to the target features of the cigarette box in the image and improves the detection accuracy.(4)Based on the above research,this paper uses the B/S software architecture and the MVVM software framework to design and implement the cigarette box type recognition system.The function of the system is tested.The experimental results show that the functions of all modules in the system can run normally and the accuracy of identifying different types of cigarettes is excellent.The experimental results prove that using the self-built cigarette case data set and the improved YOLOv5 algorithm has improved the recognition accuracy and recognition efficiency. |