Quality inspection of glass bottles is an important part of the bottle manufacturing industry, and quality control is related to customer needs. Data statistics help improve processes. The molding process of glass bottles is under high temperature conditions (up to 1560 ℃), and process control is very difficult (with a failure rate of 8% -10%), so quality inspection is particularly important. Through on-site inspections of quality inspection on the production line, it was found that defects on glass bottles are small and difficult to distinguish, especially those located at the bottle mouth. Existing machine vision based devices have poor performance in distinguishing defect categories and low accuracy in classifying glass bottle bottom mold numbers. Therefore, an improved method was proposed: using convolutional neural networks to classify weak feature defects and bottle bottom mold numbers on glass bottles, and designing a visual interface for detection data. The main content is summarized as follows:
(1) Preprocessing of bottle mouth defects and bottle bottom mold number image sets. This article focuses on Qianhe soy sauce bottles, with a research object of 5 types of bottle mouth images (4 types of defects and 1 type of normal bottle) and 5 types of bottle bottom mold numbers. The images are sourced from the image library of the current photographic inspection machine. Expand the quantity of collected image sets by performing rotation, translation, and flipping operations (10000 images per category); Use contrast enhancement and bilateral filtering to eliminate interference in the defect image set; Perform mean and normalization operations on the defect image set to center pixel values and map them to 0~1, in order to improve the convergence speed of the network.
(2) Build and optimize a convolutional network for bottle bottom mold number and bottle mouth defects. Based on the convolutional network model, gradually build and improve the convolutional network for bottle bottom model number classification, ultimately achieving a classification accuracy of 98.95%, and compare it with three classical networks to evaluate the performance of the constructed network. Transfer the model number classification network structure to defect training, gradually adjust the activation function and parameter update method in the original structure based on the changes in the accuracy curves of the training and validation sets in the experiment, adjust the convolution kernel dimension, Batch_Size value, iteration times, learning rate and other parameters, and introduce Dropout layer and BN (BatchNormalization) layer. Finally, add Inception and ResNet structures to the network structure, and use the weights of the bottle bottom model number image set and the five class image sets trained in Fashion MNIST as the initial weights of the defect classification network. The final accuracy of the defect network training is 97.86%. Comparing this network with two types of classical networks, the results show that classical networks also perform well in defect classification, but the constructed network is more concise, achieving classification tasks with the least number of layers and better performance.
(3) The deployment of a glass bottle bottom mold number and bottle mouth defect classification system mainly includes an image acquisition module, an image classification module, a data storage module, and a visualization display module. Image data is obtained through a camera and input into a trained mold number and defect classification convolutional network model; Store the classification results in the constructed database; Use the Tkinter library provided by Python to complete the front-end design of the interface and achieve real-time display of detection images and data; Connect and build a database for storing detection results based on Python, and use the Matplotlib library provided by it to create statistical graphs; Based on the “WeChat Developer” software platform, design WeChat mini programs for convenience.Viewing data on mobile devices. Finally, the system software was tested and the classification effect was achieved.
关于 leowang