Plastic part screen printing control method and system
By analyzing the screen printing defect images and using neural network models for automatic identification and process parameter adjustment, the problem of low manual recognition efficiency is solved, and the efficiency and accuracy of the screen printing process is improved.
Patent Information
- Application Number
- CN202411858231.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Manually identifying silk screen defects is low efficiency, time-consuming and easy to cause fatigue, affecting the accuracy of identification.
By acquiring and analyzing the screen printing defect sample images, data processing and feature extraction are performed, defect classification and process parameter adjustment are used for neural network models, and the screen printing process is automatically controlled.
Improve the efficiency and accuracy of defect identification, reduce manual intervention, and improve production efficiency and product quality.
Smart Images

Figure CN119323698A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of screen printing of plastic parts, and in particular to a screen printing control method and system for plastic parts. Background Art
[0002] With the continuous advancement of technology, automation technology is gradually penetrating into the screen printing industry, greatly promoting the rapid development of this field. Automation technology focuses on the research and development of intelligent automatic control, digital and networked controllers, as well as the development of related electronic, mechanical and software products. Its foundation is automatic control theory, and its goal is to build image automatic printing equipment with high speed, high efficiency and high precision. By introducing advanced automation solutions, not only can production efficiency be greatly improved, but also printing quality and stability can be significantly improved.
[0003] In current screen printing technology, there are many types of printing defects caused by improper template selection or design, ranging from subtle flowery to obvious uneven surface, ink piling, and ink drawing. In the face of these challenges, the common practice in the industry is to rely on experienced front-line operators who identify the specific types of defects through careful observation of the printed products. Once the nature of the defect is determined, the operator will fine-tune or remake the template accordingly based on his or her accumulated knowledge and skills in order to achieve the best printing effect. This method based on manual experience has proven its effectiveness in solving specific problems in long-term practice. In this way, not only can the printing quality problems caused by the template be corrected in a timely manner, but it can also promote the improvement of the operator's technical level to a certain extent, forming a set of effective defect response mechanisms.
[0004] Although the defect recognition method based on manual experience is effective in solving specific problems, its efficiency is relatively low. Operators need to spend a long time carefully observing and analyzing the printed products to accurately determine the defect type. This process is not only time-consuming, but also easy to cause fatigue in a high-intensity working environment, affecting the accuracy of recognition, and ultimately leading to the problem of low efficiency of manual defect recognition. Summary of the invention
[0005] The present invention provides a plastic part screen printing control method and system to solve the problem of low efficiency in manually identifying screen printing defects.
[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a method for controlling screen printing of plastic parts, comprising: Acquire the captured silk screen defect sample images; Performing data processing on the silk-screen defect sample image to obtain defect sample data; Extracting features from the defect sample data to obtain defect feature data; The defect sample data and the defect feature data are input into a preset defect classification model for defect classification to obtain defect weight data; wherein the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; The actual process parameters input in advance are adjusted according to the defect weight data to obtain adjusted process parameters, and the screen printing process of the plastic part is controlled according to the adjusted process parameters.
[0007] In an optional implementation, the step of performing data processing on the screen printing defect sample image to obtain defect sample data includes: Classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images; Converting the color image information into grayscale image information to obtain gray image information; Performing matrix conversion on the grayscale image information to obtain grayscale matrix data; The grayscale value of each pixel of the grayscale matrix data is normalized by the following formula to obtain normalized data: in, represents normalized data, represents the grayscale value in the grayscale matrix, Represents the minimum grayscale value in the grayscale matrix, Represents the maximum grayscale value in the grayscale matrix; The color image information, the grayscale image information and the normalized data are used as the defect sample data.
[0008] In an optional implementation, the extracting features of the defect sample data to obtain defect feature data includes: Extracting the screen printing surface features from the defect sample data by using a feature extraction network model to obtain the screen printing surface features; Extracting silk screen boundary features from the defect sample data by using a Gabor filter; Extracting silk screen color features from the defect sample data by using a YUV color model; The silk-screen surface features, the silk-screen boundary features and the silk-screen color features are used as defect feature data.
[0009] In an optional implementation, the training process of the initial neural network model includes: Inputting the pre-stored historical feature data and historical sample data into the input layer of the neural network model for training, and obtaining the predicted value data output by the output layer of the neural network model; Substituting the predicted value data and the preset process parameters into the loss function to calculate the loss value, thereby obtaining the loss value data; Calculate the gradient of the output layer output of the neural network model according to the loss value data, and pass the gradient forward layer by layer through the chain rule to calculate the gradient of each layer parameter to obtain gradient data; Update the parameters of each layer of the neural network model according to the gradient data and the preset learning rate; The parameters of each layer are updated repeatedly until the training is completed when the number of training times of the neural network model is greater than a preset number of times, or when the loss value data of the neural network model is less than a preset loss threshold.
[0010] In an optional implementation, the step of inputting the defect sample data and the defect feature data into the defect classification model to perform defect classification to obtain defect weight data includes: Inputting the defect sample data and the defect feature data into the defect classification model to identify the type of silk screen defects in the image; Among them, the types of screen printing defects include dirty spots, uneven ink, white spots, cracks, too thick ink on the edge or uneven color; Analyze the correlation between the preset actual process parameters and the types of screen printing defects to obtain correlation information; According to the association information, the weight of the actual process parameter corresponding to each type of the screen printing defect is analyzed by a distance metric function to obtain defect weight data; In an optional implementation manner, adjusting the actual process parameters input in advance according to the defect weight data to obtain the adjusted process parameters includes: Calculating according to the actual process parameters and the preset process parameter standard interval to obtain a weight interval; Matching the defect weight data with the weight interval to obtain the process parameters to be adjusted; Adjusting the process parameters according to the process parameters to be adjusted to obtain adjusted process parameters; The process parameters to be adjusted include the maximum weight parameter in the defect weight data and the parameters in the defect weight data that belong to the weight range.
[0011] In an optional implementation, the classifying the silk screen defect sample images to obtain color image information including a test sample image and a training sample image includes: Performing cluster analysis on the silk screen defect samples according to the silk screen defect types to obtain n center points, each center point representing a type of sample; The center point category of each silk screen defect sample is calculated according to the preset distance measurement function to obtain the sample category data; According to the sample category data, the sample data belonging to the same center point category are classified and stored in the matrix P; Extract data from the matrix P, use the first column as the row vector of the matrix A1, the second column as the row vector of the matrix A2, and merge the matrix A1 and the matrix A2 to form a matrix A; The matrix A is converted into an n-dimensional column vector by the following data smoothing function: in, represents the column vector data after data smoothing, represents the data in matrix A, represents the window size for data smoothing, represents the coordinates of the elements in matrix A, Indicates The center window, express The pixel value of the window, express The pixel value of the window, express The maximum value of the window, express The maximum value of the window of +1; According to the type of silk screen defect, if the silk screen defect sample data appears Screen printing defects, in matrix P, Set to 1, and set other positions to 0; In a second aspect, the present invention provides a plastic part screen printing control device, comprising: A data acquisition module is used to acquire the captured silk screen defect sample images; A data preprocessing module, used for performing data processing on the silk screen defect sample image to obtain defect sample data; A feature extraction module, used to extract features from the defect sample data to obtain defect feature data; The defect analysis module inputs the defect sample data and the defect feature data into a preset defect classification model to perform defect classification and obtain defect weight data; wherein the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; The parameter adjustment module is used to adjust the actual process parameters input in advance according to the defect weight data to obtain the adjusted process parameters, and control the screen printing process of the plastic part according to the adjusted process parameters.
[0012] In a third aspect, the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the above-mentioned methods for controlling screen printing of plastic parts when executing the computer program.
[0013] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned plastic part silk screen printing control methods.
[0014] Compared with the prior art, the present invention has the following beneficial effects: The present invention discloses a method for controlling screen printing of plastic parts, including obtaining a sample image of screen printing defects collected by shooting; performing data processing on the sample image of screen printing defects to obtain defect sample data; performing feature extraction on the defect sample data to obtain defect feature data; inputting the defect sample data and the defect feature data into a preset defect classification model for defect classification to obtain defect weight data; wherein, the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; the actual process parameters input in advance are adjusted according to the defect weight data to obtain the adjusted process parameters, and the screen printing process of plastic parts is controlled according to the adjusted process parameters. The present invention solves the problem of low efficiency of manual defect identification by shooting and analyzing screen printing defect images, extracting defect features, classifying and evaluating defects using a trained neural network model, and adjusting the screen printing process parameters according to the evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic flow chart of a method for controlling screen printing of plastic parts provided by the first embodiment of the present invention; Figure 2 It is a structural schematic diagram of a plastic part screen printing control device provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Reference Figure 1 The first embodiment of the present invention provides a method for controlling screen printing of plastic parts, comprising the following steps: S11, obtaining a captured sample image of a screen printing defect; S12, performing data processing on the silk screen defect sample image to obtain defect sample data; S13, extracting features from the defect sample data to obtain defect feature data; S14, inputting the defect sample data and the defect feature data into a preset defect classification model for defect classification to obtain defect weight data; wherein the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; S15, adjusting the actual process parameters input in advance according to the defect weight data to obtain adjusted process parameters, and controlling the screen printing process of the plastic part according to the adjusted process parameters.
[0018] In step S11, a captured silk screen defect sample image is acquired.
[0019] By selecting plastic parts with screen printing defects from the production line as samples, multiple collection points are selected at the abnormal appearance parts of these samples, and images are collected at these collection points to obtain screen printing defect sample images. The image data obtained in this way can truly reflect the specific situation of the screen printing defects.
[0020] In step S12, data processing is performed on the screen printing defect sample image to obtain defect sample data.
[0021] In a specific implementation, the data processing of the screen printing defect sample image to obtain defect sample data includes: Classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images; Converting the color image information into grayscale image information to obtain gray image information; Performing matrix conversion on the grayscale image information to obtain grayscale matrix data; The grayscale value of each pixel of the grayscale matrix data is normalized by the following formula to obtain normalized data: in, represents normalized data, represents the grayscale value in the grayscale matrix, Represents the minimum grayscale value in the grayscale matrix, Represents the maximum grayscale value in the grayscale matrix; The color image information, the grayscale image information and the normalized data are used as the defect sample data.
[0022] In a specific implementation, the classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images includes: Performing cluster analysis on the silk screen defect samples according to the silk screen defect types to obtain n center points, each center point representing a type of sample; The center point category of each silk screen defect sample is calculated according to the preset distance measurement function to obtain the sample category data; According to the sample category data, the sample data belonging to the same center point category are classified and stored in the matrix P; Extract data from the matrix P, use the first column as the row vector of the matrix A1, the second column as the row vector of the matrix A2, and merge the matrix A1 and the matrix A2 to form a matrix A; The matrix A is converted into an n-dimensional column vector by the following data smoothing function: in, represents the column vector data after data smoothing, represents the data in matrix A, represents the window size for data smoothing, represents the coordinates of the elements in matrix A, Indicates The center window, express The pixel value of the window, express The pixel value of the window, express The maximum value of the window, express The maximum value of the window of +1; According to the type of silk screen defect, if the silk screen defect sample data appears Screen printing defects, in matrix P, Set to 1, and set other positions to 0; In a specific implementation, converting the color image information into grayscale image information to obtain grayscale image information includes: The color image information is converted into grayscale image information by the following grayscale conversion formula: in, Represents the gray value, represents the pixel value of the red channel, represents the pixel value of the green channel, Represents the pixel value of the blue channel.
[0023] In a specific implementation, the grayscale image information is subjected to matrix conversion to obtain grayscale matrix data; As shown in the following formula, the grayscale value of each pixel in the grayscale image is arranged in row-first or column-first order to form a The matrix ; in, Represents the grayscale matrix, each element Indicates Line Grayscale value of the pixel.
[0024] Specifically, the silk screen defect sample images are first classified to obtain color image information including test sample images and training sample images. Through cluster analysis and distance metric functions, the sample data are classified and stored in a matrix to ensure the diversity and representativeness of the samples. Next, the color image information is converted into grayscale image information. The grayscale conversion formula eliminates the influence of color on defect detection, so that the data is more focused on the characteristics of the defect itself. Subsequently, the grayscale image information is matrix-converted to form grayscale matrix data, and the grayscale value is normalized to the range of [0, 1] through normalization. This process not only improves the quality of the data, but also reduces the grayscale value differences between different images, making subsequent data processing and feature extraction more consistent and effective. In addition, the data quality is further optimized through the data smoothing function, so that the model can more accurately identify and classify silk screen defects.
[0025] In step S13, feature extraction is performed on the defect sample data to obtain defect feature data.
[0026] In a specific implementation, extracting features from the defect sample data to obtain defect feature data includes: Extracting the screen printing surface features from the defect sample data by using a feature extraction network model to obtain the screen printing surface features; Extracting silk screen boundary features from the defect sample data by using a Gabor filter; Extracting silk screen color features from the defect sample data by using a YUV color model; The silk-screen surface features, the silk-screen boundary features and the silk-screen color features are used as defect feature data.
[0027] In a specific implementation, the extracting the screen printing surface features from the defect sample data by using a feature extraction network model to obtain the screen printing surface features includes: The defect sample data is input into a feature extraction network model.
[0028] The local boundary features of the image are extracted through the following multi-layer convolutional layers: in, represents the local features of the boundary, is the activation function, represents the weight matrix of the convolutional layer, Represents the preset convolution layer bias; The dimension of the feature map is reduced through the following pooling layers, retaining the key features of the boundary: in, Represents the first Line The characteristics of the columns, Represents the grayscale value of an area. It is the maximum pooling function, which is a preset computer program.
[0029] The extracted features are converted into a fixed-length feature vector through the following fully connected layer.
[0030] in, It means flattening the pooled feature map into a one-dimensional vector. is the final eigenvector, represents the weight matrix of the fully connected layer, Represents the preset fully connected layer bias.
[0031] In a specific implementation, extracting the silk screen boundary feature from the defect sample data by using a Gabor filter includes: Obtaining pixel coordinates in the color image information; The Gabor filter is generated by the following formula: in, is the preset frequency, is the preset wavelength, is the preset direction, is the phase shift, is the gray value standard deviation, is the image aspect ratio, and are pixel coordinates.
[0032] In a specific implementation, the extracting the silk screen color feature from the defect sample data by using the YUV color model includes: The normalized grayscale matrix data is converted to the YUV color space using the following YUV color space conversion formula: in, Indicates brightness, and Indicates chromaticity, represents the pixel value of the red channel, represents the pixel value of the green channel, Represents the pixel value of the blue channel.
[0033] First, the defect sample data is input into the feature extraction network model. The feature extraction network model gradually extracts high-level features in the image through multi-layer convolution, pooling and activation functions. Specifically, in the input data preparation stage, the normalized grayscale matrix data is input into the feature extraction network model. Then, the local features of the image are extracted through multi-layer convolution layers. The convolution operation can be expressed as: in, represents the local features of the boundary, is the activation function, represents the weight matrix of the convolutional layer, Represents the preset convolution layer bias. The convolution layer gradually extracts higher-level features by learning local features in the image, such as edges and texture features.
[0034] Next, the pooling layer is used to reduce the dimension of the feature map and retain the key features. The maximum pooling operation can be expressed as: in, Represents the first Line The characteristics of the columns, Represents the grayscale value of an area. It is the maximum pooling function, which is a preset computer program.
[0035] The pooling layer reduces the computational complexity by reducing the size of the feature map while retaining the most important feature information.
[0036] Finally, the extracted features are converted into a fixed-length feature vector through a fully connected layer. The fully connected operation can be expressed as: in, It means flattening the pooled feature map into a one-dimensional vector. is the final eigenvector, represents the weight matrix of the fully connected layer, Represents the preset fully connected layer bias.
[0037] Next, use the Gabor filter to extract the silk screen boundary features from the defect sample data. The Gabor filter can effectively extract the texture and boundary information of the image. The specific steps are as follows: First, obtain the pixel coordinates in the color image information. Then, generate the Gabor filter by the following formula: in, is the preset frequency, is the preset wavelength, is the preset direction, is the phase shift, is the gray value standard deviation, is the image aspect ratio, and are pixel coordinates.
[0038] Gabor filters can effectively capture local texture and boundary information in images by simulating the receptive field of the human visual system.
[0039] Then, the generated Gabor filter is applied to the normalized grayscale matrix data to obtain the filtered image. The filtered image contains rich boundary information and can be further used for feature extraction.
[0040] The modulus and phase values of the filtered image are calculated as boundary features using the following formula: in, and are the real and imaginary parts of the filtered image, respectively. represents the modulus value, Indicates phase. The modulus and phase values can provide information about image boundaries and textures, which helps in subsequent defect detection.
[0041] Finally, the silk screen color features are extracted from the defect sample data using the YUV color model. The YUV color model is a commonly used color space conversion method that can better separate brightness and chromaticity information. Specifically, the normalized grayscale matrix data is converted to the YUV color space using the following YUV color space conversion formula: in, Indicates brightness, and Indicates chromaticity, represents the pixel value of the red channel, represents the pixel value of the green channel, Represents the pixel value of the blue channel.
[0042] The YUV color model can effectively separate the brightness and chromaticity information of an image, making the color features more prominent and helping to identify defects of different colors.
[0043] In summary, by extracting various features of defect sample data, including silk-screen surface features, silk-screen boundary features, and silk-screen color features, the characteristics of defect samples can be fully described, thereby improving the accuracy of defect detection.
[0044] In step S14, the defect sample data and the defect feature data are input into a preset defect classification model for defect classification to obtain defect weight data; wherein, the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model.
[0045] In a specific implementation, the training process of the initial neural network model includes: Inputting the pre-stored historical feature data and historical sample data into the input layer of the neural network model for training, and obtaining the predicted value data output by the output layer of the neural network model; Substituting the predicted value data and the preset process parameters into the loss function to calculate the loss value, thereby obtaining the loss value data; Calculate the gradient of the output layer output of the neural network model according to the loss value data, and pass the gradient forward layer by layer through the chain rule to calculate the gradient of each layer parameter to obtain gradient data; Update the parameters of each layer of the neural network model according to the gradient data and the preset learning rate; The parameters of each layer are updated repeatedly until the training is completed when the number of training times of the neural network model is greater than a preset number of times, or when the loss value data of the neural network model is less than a preset loss threshold.
[0046] In a specific implementation manner, the step of inputting the defect sample data and the defect feature data into the defect classification model to perform defect classification to obtain defect weight data includes: Inputting the defect sample data and the defect feature data into the defect classification model to identify the type of silk screen defects in the image; Among them, the types of screen printing defects include dirty spots, uneven ink, white spots, cracks, too thick ink on the edge or uneven color; Analyze the correlation between the preset actual process parameters and the types of screen printing defects to obtain correlation information; According to the association information, the weight of the actual process parameter corresponding to each type of the screen printing defect is analyzed by a distance metric function to obtain defect weight data; Specifically, first, historical feature data and historical sample data need to be prepared. These data include known defect samples and their corresponding feature data, as well as corresponding labels, which will be used to train the neural network model. Then, these pre-stored historical feature data and historical sample data are input into the input layer of the neural network model. The neural network model will perform forward propagation based on these input data and calculate the predicted value data. Next, the predicted value data and the preset process parameters are substituted into the loss function to calculate the loss value. The loss function is an indicator used to measure the difference between the model's predicted value and the true value. Commonly used loss functions include mean square error (MSE) and cross entropy loss. Based on the calculated loss value data, the gradient of the output layer of the neural network model is calculated. This process is called backpropagation, which uses the chain rule to pass the gradient forward layer by layer, calculate the gradient of the parameters of each layer, and thus determine the degree of influence of each parameter on the final loss value. Based on the calculated gradient data and the preset learning rate, the parameters of each layer of the neural network model are updated. The learning rate is a hyperparameter that controls the step size of each update. The parameters of each layer of the model are adjusted according to the preset learning rate in order to minimize the loss value, that is, to make the model's prediction closer to the actual situation. The above process will be repeated until the stopping condition is met. There are two stopping conditions: one is that when the number of training times of the neural network model exceeds the preset number, the training is considered to be sufficient and the training can be stopped; the other is that when the loss value data of the neural network model is lower than the preset loss threshold, the model is considered to have reached a satisfactory performance level and the training can also be stopped.
[0047] Once the training is completed, the trained neural network model can be used as a defect classification model. At this stage, new defect sample data and defect feature data will be input into the model, and the model can process and analyze the samples.
[0048] Next, the model uses multiple layers of internal processing to identify the specific types of screen printing defects in the image. These defects include dirty spots, uneven ink, white spots, cracks, too thick ink at the edge, or uneven color. Through the model's prediction, the type of defect in each sample image can be accurately determined.
[0049] After identifying the defect types, the next step is to analyze the correlation between these defects and the actual process parameters. Process parameters directly or indirectly affect the quality of screen printing during the production process. Through analysis, the relationship between different defect types and these process parameters can be obtained. For example, a certain defect may be more likely to occur within a specific temperature range.
[0050] Based on the association information obtained from the above analysis, the distance metric function is used to calculate the weight of the actual process parameters corresponding to each defect type. This weight reflects the probability of a certain type of defect occurring under the current process parameter settings. For example, if the setting of a certain process parameter makes the probability of the ink unevenness defect higher, then the weight of this parameter and the ink unevenness defect will be higher. In this way, the importance of different defect types under different process conditions can be quantified.
[0051] Finally, through the above steps, the weight data of each defect type can be obtained. These weight data not only help to understand the occurrence rules of different defects in the production process, but also serve as an important reference for adjusting process parameters, thereby reducing the occurrence of defects and improving production efficiency and product quality.
[0052] The entire process uses a machine learning model to automatically identify and classify screen printing defects, and assigns a weight value to each defect by analyzing the relationship between defects and process parameters. This method not only improves the accuracy and efficiency of defect identification, but also provides a scientific basis for optimizing the production process.
[0053] In step S15, the actual process parameters input in advance are adjusted according to the defect weight data to obtain adjusted process parameters, and the screen printing process of the plastic part is controlled according to the adjusted process parameters.
[0054] In a specific implementation manner, adjusting the actual process parameters input in advance according to the defect weight data to obtain the adjusted process parameters includes: Calculating according to the actual process parameters and the preset process parameter standard interval to obtain a weight interval; Matching the defect weight data with the weight interval to obtain the process parameters to be adjusted; Adjusting the process parameters according to the process parameters to be adjusted to obtain adjusted process parameters; The process parameters to be adjusted include the maximum weight parameter in the defect weight data and the parameters in the defect weight data that belong to the weight range.
[0055] First, the weight interval is obtained by calculating the actual process parameters and the preset process parameter standard interval. By calculation, the degree of deviation of each actual process parameter relative to the standard interval can be determined, thereby obtaining the weight interval. The calculation formula of the weight interval can be expressed as: in, It is The weight of the process parameters, It is The actual process parameters, and The preset The lower and upper limits of the standard range for each process parameter.
[0056] Next, the defect weight data and weight interval are matched to obtain the process parameters to be adjusted. The defect weight data reflects the probability of occurrence of each defect type under the current process parameter settings. By matching the defect weight data with the weight interval, the process parameters with higher weights can be found, which are the main factors causing defects.
[0057] Finally, the process parameters are adjusted according to the process parameters to be adjusted to obtain the adjusted process parameters. The specific adjustment method can be to bring the process parameters with higher weights closer to the reasonable values within the standard range, thereby reducing the occurrence of defects. The adjusted process parameters can be expressed as: in, is the adjusted process parameters, is the preset adjustment step size, It is The preset target value of each process parameter, It is actual process parameters.
[0058] Through the above process, the actual process parameters can be effectively adjusted according to the defect weight data, thereby optimizing the production process, reducing the occurrence of defects, and improving product quality and production efficiency. The entire process ensures the stability and efficiency of the production process by adjusting the process parameters.
[0059] The following describes the working process of the present invention using a relatively common scenario as an example. Figure 1 , a method for controlling screen printing of plastic parts, comprising the following steps: First, the staff selected some plastic parts with screen printing defects from the production line as samples. They selected multiple collection points at the abnormal parts of the appearance of these samples, collected images of these collection points, and obtained the images of the screen printing defect samples.
[0060] Next, the color image information was converted into grayscale image information, eliminating the impact of color on defect detection and making the data more focused on the characteristics of the defect itself. Subsequently, they performed matrix conversion on the grayscale image information to form grayscale matrix data, and normalized the grayscale values to the range of [0, 1]. This process not only improved the quality of the data, but also reduced the grayscale value differences between different images, making subsequent data processing and feature extraction more consistent and effective. In addition, the data quality was further optimized through the data smoothing function, allowing the model to more accurately identify and classify screen printing defects.
[0061] After data preprocessing, the feature extraction network model was used to extract the screen printing surface features from the defect sample data, the Gabor filter was used to extract the screen printing boundary features from the defect sample data, and the YUV color model was used to extract the screen printing color features from the defect sample data. These three feature data together describe the characteristics of the defect sample and improve the accuracy of defect detection.
[0062] Subsequently, these defect sample data and defect feature data were input into a preset defect classification model. This model is an initial neural network model trained with historical feature data and historical sample data. The model can identify specific types of screen printing defects in the image, such as dirty spots, uneven ink, white spots, cracks, too thick ink on the edge, or uneven color. Through internal multi-layer processing, the model can accurately determine the type of defects in each sample image.
[0063] After identifying the types of defects, the correlation between these defects and the actual process parameters is analyzed to obtain the relationship between different defect types and these process parameters. For example, a certain defect may be more likely to occur within a specific temperature range. Based on this correlation information, the weight of the actual process parameters corresponding to each defect type is calculated using a distance metric function. These weights reflect the probability of a certain type of defect occurring under the current process parameter settings. For example, if the setting of a certain process parameter makes the probability of the ink unevenness defect higher, then the weight of this parameter and the ink unevenness defect will be higher.
[0064] Finally, the staff adjusted the actual process parameters input in advance according to the defect weight data and obtained the adjusted process parameters. These adjusted process parameters were applied to the silk screen production process, thus reducing the occurrence of defects and improving product quality and production efficiency.
[0065] In summary, the entire process realizes the automatic identification and classification of silk screen defects through machine learning models, and assigns a weight value to each defect by analyzing the relationship between defects and process parameters, which provides a scientific basis for optimizing the production process and solves the problem of low efficiency of manual defect identification.
[0066] Reference Figure 2 The second embodiment of the present invention provides a plastic part screen printing control device, comprising: A data acquisition module is used to acquire the captured silk screen defect sample images; A data preprocessing module, used for performing data processing on the silk screen defect sample image to obtain defect sample data; A feature extraction module, used to extract features from the defect sample data to obtain defect feature data; The defect analysis module inputs the defect sample data and the defect feature data into a preset defect classification model to perform defect classification and obtain defect weight data; wherein the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; The parameter adjustment module is used to adjust the actual process parameters input in advance according to the defect weight data to obtain the adjusted process parameters, and control the screen printing process of the plastic part according to the adjusted process parameters.
[0067] It should be noted that a plastic part screen printing control device provided in an embodiment of the present invention is used to execute all process steps of a plastic part screen printing control method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated.
[0068] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a plastic part screen printing control program. When the processor executes the computer program, the steps in the above-mentioned plastic part screen printing control method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as a plastic part screen printing control module.
[0069] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0070] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0071] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0072] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0073] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0074] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0075] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for controlling screen printing of plastic parts, characterized in that: Executed by the controller, including: Acquire the captured silk screen defect sample images; Performing data processing on the silk-screen defect sample image to obtain defect sample data; Extracting features from the defect sample data to obtain defect feature data; The defect sample data and the defect feature data are input into a preset defect classification model for defect classification to obtain defect weight data; wherein the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; The actual process parameters input in advance are adjusted according to the defect weight data to obtain adjusted process parameters, and the screen printing process of the plastic part is controlled according to the adjusted process parameters.
2. The method for controlling screen printing of plastic parts according to claim 1, characterized in that: The data processing of the screen printing defect sample image to obtain defect sample data includes: Classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images; Converting the color image information into grayscale image information to obtain gray image information; Performing matrix conversion on the grayscale image information to obtain grayscale matrix data; The grayscale value of each pixel of the grayscale matrix data is normalized by the following formula to obtain normalized data: in, represents normalized data, represents the grayscale value in the grayscale matrix, Represents the minimum grayscale value in the grayscale matrix, Represents the maximum grayscale value in the grayscale matrix; The color image information, the grayscale image information and the normalized data are used as the defect sample data.
3. The method for controlling screen printing of plastic parts according to claim 1, characterized in that: The extracting features of the defect sample data to obtain defect feature data includes: Extracting the screen printing surface features from the defect sample data by using a feature extraction network model to obtain the screen printing surface features; Extracting silk screen boundary features from the defect sample data by using a Gabor filter; Extracting silk screen color features from the defect sample data by using a YUV color model; The silk-screen surface features, the silk-screen boundary features and the silk-screen color features are used as defect feature data.
4. The method for controlling screen printing of plastic parts according to claim 2, characterized in that: The training process of the initial neural network model includes: Inputting the pre-stored historical feature data and historical sample data into the input layer of the neural network model for training, and obtaining the predicted value data output by the output layer of the neural network model; Substituting the predicted value data and the preset process parameters into the loss function to calculate the loss value, thereby obtaining the loss value data; Calculate the gradient of the output layer output of the neural network model according to the loss value data, and pass the gradient forward layer by layer through the chain rule to calculate the gradient of the parameters of each layer to obtain gradient data; Update the parameters of each layer of the neural network model according to the gradient data and the preset learning rate; The parameters of each layer are updated repeatedly until the training is completed when the number of training times of the neural network model is greater than a preset number of times, or when the loss value data of the neural network model is less than a preset loss threshold.
5. The method for controlling screen printing of plastic parts according to claim 1, characterized in that: The step of inputting the defect sample data and the defect feature data into the defect classification model to perform defect classification to obtain defect weight data includes: Inputting the defect sample data and the defect feature data into the defect classification model to identify the type of silk screen defects in the image; Among them, the types of screen printing defects include dirty spots, uneven ink, white spots, cracks, too thick ink on the edge or uneven color; Analyze the correlation between the preset actual process parameters and the types of screen printing defects to obtain correlation information; According to the association information, the weight of the actual process parameter corresponding to each type of the screen printing defect is analyzed by a distance metric function to obtain defect weight data.
6. The method for controlling screen printing of plastic parts according to claim 1, characterized in that: The step of adjusting the actual process parameters input in advance according to the defect weight data to obtain the adjusted process parameters includes: Calculating according to the actual process parameters and the preset process parameter standard interval to obtain a weight interval; Matching the defect weight data with the weight interval to obtain the process parameters to be adjusted; Adjusting the process parameters according to the process parameters to be adjusted to obtain adjusted process parameters; The process parameters to be adjusted include the maximum weight parameter in the defect weight data and the parameters in the defect weight data that belong to the weight range.
7. The method for controlling screen printing of plastic parts according to claim 2, characterized in that: The method of classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images includes: Performing cluster analysis on the silk screen defect samples according to the silk screen defect types to obtain n center points, each center point representing a type of sample; The center point category of each silk screen defect sample is calculated according to the preset distance measurement function to obtain the sample category data; According to the sample category data, the sample data belonging to the same center point category are classified and stored in the matrix P; Extract data from the matrix P, use the first column as the row vector of the matrix A1, the second column as the row vector of the matrix A2, and merge the matrix A1 and the matrix A2 to form a matrix A; The matrix A is converted into an n-dimensional column vector by the following data smoothing function: in, represents the column vector data after data smoothing, represents the data in matrix A, represents the window size for data smoothing, represents the coordinates of the elements in matrix A, Indicates The center window, express The pixel value of the window, express The pixel value of the window, express The maximum value of the window, express The maximum value of the window of +1; According to the type of silk screen defect, if the silk screen defect sample data appears Screen printing defects, in matrix P, Set to 1, and set other positions to 0; The data in the matrix A and the matrix P are taken together as the test sample image and the test sample image.
8. A plastic part screen printing control device, characterized in that: include: A data acquisition module is used to acquire the captured silk screen defect sample images; A data preprocessing module, used for performing data processing on the silk screen defect sample image to obtain defect sample data; A feature extraction module, used to extract features from the defect sample data to obtain defect feature data; The defect analysis module inputs the defect sample data and the defect feature data into a preset defect classification model to perform defect classification and obtain defect weight data; wherein the initial neural network model is trained according to the pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; The parameter adjustment module is used to adjust the actual process parameters input in advance according to the defect weight data to obtain the adjusted process parameters, and control the screen printing process of the plastic part according to the adjusted process parameters.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the plastic part screen printing control method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the plastic part screen printing control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Control method and system for parameters self-tuning of tobacco shred production process
CN109343489A
Intelligent control method for zinc alloy part machining
CN115131347A
Process parameter optimization method based on reinforcement learning
CN116048028A
Metal semi-solid pulping process parameter optimization method
CN119007892A
Defect weigh formulas for analog defect simulation
US20210350058A1
Cited By
Production control method for dot indented steel wire
CN121232742A