Abstract:As the final output product of tobacco agriculture, the appearance quality of cigarette is the key link to control. However, there is no special detection equipment for the whole appearance defect detection of cigarette, while many finely categorized defects exist on the external surface of cigarette, which cannot be detected manually in a comprehensive, detailed and systematic manner. And the standardization of quality testing and the digitization of quality control are severely inhibited. A cigarette appearance inspection device was designed and tested after analyzing the technical systems of the testing equipment by using the black box approach. Firstly, the equipment was designed by combining innovative mechanical design and visual inspection function, which consisted mainly of device for storing and supplying cigarettes, device for forming units, full appearance imaging device of cigarette, sorting device and defects detection algorithm programs. Secondly, key factors affecting cigarette running stability, cigarette integrity, and imaging quality were tested on the equipment. The experimental results showed that the equipment can image cigarette completely and operate stably under the optimum parameters: the lifting speed of slide plate was 0.3m/s, the angle of transition plate was 40°, the displacement speed of roller was 0.045m/s, the expansion speed of the cylinder was 20mm/s, the spring stiffness was 3N/mm, the angle of the light source was 10°, and the height difference between the light source and the cigarette was 30mm. Thirdly, cigarette of 54mm×100 size was imaged in the equipment, and the resulting images were processed by improved HourglassNet-YOLO v4 network model, while the result showed that the accuracy of defect detection and defect classification can reach 98% and 95.4%, respectively. The experimental results showed that the device can meet the needs of cigarette appearance detection and can provide a reference value for cylindrical object appearance detection.