| At present,tobacco companies have carried out research and development of informatized,intelligent and engineered equipment to improve the level of localization of key equipment,promoting the high-quality development of intensive processing of agricultural products.The blessing of high and new technology has improved the efficiency of cigarette production,but the development of cigarette appearance defect detection technology required for postpartum production is relatively slow,which cannot fully meet the needs of high-speed cigarette production.Common cigarette appearance defects include cracks,punctures,macula,and wrinkles.The traditional detection method is the manual sampling method,which has low detection efficiency,and due to human subjectivity,there will be a large problem of false detection;the more advanced detection method uses machine vision technology based on traditional image processing,but the detection types of this method are relatively small.Less,less accurate and less adaptable.Therefore,according to the requirements of "implementing the action of improving the processing of agricultural products" proposed by the state,researching and designing a method for detecting the appearance defects of cigarettes is an important way to improve the quality of cigarette production and enhance the competitiveness of enterprises.In this paper,a deep learning-based cigarette appearance defect detection method is proposed.The system is designed from two aspects of hardware and software,and the detection of common cigarette appearance defects is realized.The main work is as follows:(1)Design the hardware system of cigarette appearance image acquisition.According to the actual production environment,study the components of the machine vision system,including the camera,lens,light source and other components,analyze the important parameters through data calculation,select each component that meets the detection requirements for experiments,draw the cigarette appearance image acquisition hardware system scheme,and build 3D The model optimizes the space structure,improves the acquisition field of view of a single hardware system,realizes the comprehensive shooting of cigarettes using two sets of hardware systems,and provides hardware support for subsequent defect detection without dead ends.(2)Design and improve the cigarette appearance defect detection algorithm.In-depth study of defect detection algorithms based on traditional image processing,in view of the weak anti-interference ability of such algorithms,low detection results accuracy,high missed detection rate and false detection rate,a deep learning algorithm is proposed to detect cigarette appearance defects.Comparing the three algorithms of Faster-RCNN,Center Net and YOLOv5,it is concluded that YOLOv5 is more suitable for actual production needs.At the same time,the NMS improvement of the YOLOv5 algorithm uses CIo U_Loss instead of Io U_Loss,and the m AP is increased to 97.64%;the image segmentation method is used to improve the small target detection effect.Although the m AP is further improved,the detection speed reaches8.6ms/sheet,which cannot meet the actual production.requirements.It was finally determined to use YOLOv5 with improved NMS for cigarette appearance defect detection.(3)Design software products for cigarette appearance defect detection.Combined with the job description of cigarette appearance defect detection by tobacco companies,the actual needs of users are analyzed from the perspectives of function,interface and color.Axure RP is used to make software prototypes,and C++ programming language and Qt software are used to realize software UI design.Through the new software functions and interface design,it brings users a convenient and fast operation and a new visual experience. |