A plastic part screen printing control method and system
By acquiring silk screen defect images and using neural network models for classification and feature extraction, the process parameters are automatically adjusted, solving the problem of low efficiency of manual identification and achieving efficient silk screen defect identification and production optimization.
Patent Information
- Application Number
- CN202411858231.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Manual identification of silk screen defects is inefficient, time-consuming, and easily affected by operator fatigue, resulting in reduced recognition accuracy.
By acquiring sample images of silk screen defects, performing data processing and feature extraction, the defects are classified using a trained neural network model, and the process parameters are adjusted according to the defect weight data to control the silk screen process.
It realizes automatic recognition and classification of silk screen defects, improves recognition efficiency, reduces manual intervention, optimizes the production process, and improves product quality and production efficiency.
Smart Images

Figure CN119323698B_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 is gradually penetrating the screen printing industry, significantly promoting the rapid development of this field. Automation technology focuses on the research and development of intelligent automatic control, digital and networked controllers, and related electronic, mechanical, and software products. Its foundation is automatic control theory, with the goal of building automatic image printing equipment with high speed, high efficiency, and high precision. By introducing advanced automation solutions, not only can production efficiency be significantly improved, but also print quality and stability can be significantly improved.
[0003] In current screen printing technology, printing defects caused by improper stencil selection or design vary widely, ranging from subtle stencil blemishes to noticeable uneven finishes, ink piling, and ink stringing. To address these challenges, the industry's common practice is to rely on experienced frontline operators, who carefully observe the printed product to identify the specific defect type. Once the nature of the defect is determined, the operator, drawing on their accumulated knowledge and skills, fine-tunes or remakes the stencil accordingly to achieve the optimal printing result. This experience-based approach has proven effective in resolving specific issues over time. This approach not only ensures timely correction of print quality issues caused by the stencil but also promotes, to a certain extent, the improvement of operator skills, establishing a proven defect response mechanism.
[0004] While defect identification methods based on manual experience are effective in solving specific problems, they are relatively inefficient. Operators must spend considerable time carefully observing and analyzing printed materials to accurately determine the defect type. This process is not only time-consuming but also prone to fatigue in the intense work environment, affecting identification accuracy and ultimately leading to low efficiency in manual defect identification. Summary of the Invention
[0005] The present invention provides a method and system for controlling screen printing of plastic parts, so as 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:
[0007] Acquire captured images of silk screen defect samples;
[0008] Performing data processing on the silk screen defect sample image to obtain defect sample data;
[0009] Extracting features from the defect sample data to obtain defect feature data;
[0010] Inputting 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, an initial neural network model is trained based on pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as a defect classification model;
[0011] 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.
[0012] In an optional embodiment, the performing data processing on the silk screen defect sample image to obtain defect sample data includes:
[0013] Classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images;
[0014] Converting the color image information into grayscale image information to obtain gray image information;
[0015] Performing matrix conversion on the grayscale image information to obtain grayscale matrix data;
[0016] Normalize the grayscale value of each pixel of the grayscale matrix data using the following formula to obtain normalized data:
[0017]
[0018] 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;
[0019] The color image information, the grayscale image information and the normalized data are used as the defect sample data.
[0020] In an optional embodiment, extracting features from the defect sample data to obtain defect feature data includes:
[0021] Extracting the silk screen surface features from the defect sample data by using a feature extraction network model to obtain the silk screen surface features;
[0022] Extracting silk screen boundary features from the defect sample data using a Gabor filter;
[0023] Extracting silk screen color features from the defect sample data using a YUV color model;
[0024] The silk-screen surface features, the silk-screen boundary features and the silk-screen color features are used as defect feature data.
[0025] In an optional embodiment, the training process of the initial neural network model includes:
[0026] Inputting pre-stored historical feature data and historical sample data into the input layer of the neural network model for training, and obtaining predicted value data output by the output layer of the neural network model;
[0027] Substituting the predicted value data and the preset process parameters into the loss function to calculate the loss value to obtain the loss value data;
[0028] Calculating the gradient of the output layer output of the neural network model based on the loss value data, and passing the gradient forward layer by layer through the chain rule to calculate the gradient of the parameters of each layer to obtain gradient data;
[0029] Update the parameters of each layer of the neural network model based on the gradient data and the preset learning rate;
[0030] The parameters of each layer are updated repeatedly until the training 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, the training is determined to be completed.
[0031] In an optional embodiment, 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:
[0032] 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;
[0033] The types of screen printing defects include dirty spots, uneven ink, white spots, cracks, too thick ink at the edge or uneven color;
[0034] Analyze the correlation between the preset actual process parameters and the types of screen printing defects to obtain correlation information;
[0035] Analyzing the weight of the actual process parameters corresponding to each type of the screen printing defect using a distance metric function according to the association information to obtain defect weight data;
[0036] In an optional embodiment, adjusting the pre-input actual process parameters according to the defect weight data to obtain the adjusted process parameters includes:
[0037] Calculating based on the actual process parameters and the preset process parameter standard interval to obtain a weight interval;
[0038] Matching the defect weight data with the weight interval to obtain the process parameters to be adjusted;
[0039] Adjusting the process parameters according to the process parameters to be adjusted to obtain adjusted process parameters;
[0040] 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.
[0041] In an optional embodiment, classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images includes:
[0042] Cluster analysis is performed 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;
[0043] Calculate the center point category of each silk screen defect sample according to the preset distance measurement function to obtain sample category data;
[0044] According to the sample category data, the sample data belonging to the same center point category are classified and stored in the matrix P;
[0045] 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;
[0046] The matrix A is converted into an n-dimensional column vector by the following data smoothing function:
[0047]
[0048] in, Represents the column vector data after data smoothing, represents the data in matrix A, Indicates the window size for data smoothing, represents the coordinates of the elements in matrix A, Indicates Centered 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;
[0049] According to the type of silk screen defect, if the silk screen defect sample data appears Silk screen defects, in the matrix P, Set to 1, and other positions to 0;
[0050] In a second aspect, the present invention provides a plastic part screen printing control device, comprising:
[0051] A data acquisition module is used to acquire the captured images of silk screen defect samples;
[0052] A data preprocessing module is used to process the silk screen defect sample image to obtain defect sample data;
[0053] A feature extraction module is used to extract features from the defect sample data to obtain defect feature data;
[0054] A 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 an initial neural network model is trained based on pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as a defect classification model;
[0055] 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.
[0056] 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 when the processor executes the computer program, the method for controlling screen printing of plastic parts described above is implemented.
[0057] In a fourth aspect, the present invention further provides a computer-readable storage medium, which 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.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] The present invention discloses a method for controlling screen printing of plastic parts, comprising obtaining captured and photographed screen printing defect sample images; performing data processing on the screen printing defect sample images 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, an initial neural network model is trained based on pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as the defect classification model; actual process parameters input in advance are adjusted based on the defect weight data to obtain adjusted process parameters, and the screen printing process of the plastic parts is controlled based on the adjusted process parameters. The present invention solves the problem of low efficiency in manual defect identification by photographing and analyzing screen printing defect images, extracting defect features, classifying and evaluating defects using the trained neural network model, and adjusting screen printing process parameters based on the evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a flow chart of a method for controlling screen printing of plastic parts provided by the first embodiment of the present invention;
[0061] Figure 2 2 is a schematic structural diagram of a plastic part screen printing control device provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0063] Reference Figure 1 The first embodiment of the present invention provides a method for controlling screen printing of plastic parts, comprising the following steps:
[0064] S11, obtaining a captured image of a silk screen defect sample;
[0065] S12, performing data processing on the silk screen defect sample image to obtain defect sample data;
[0066] S13, performing feature extraction on the defect sample data to obtain defect feature data;
[0067] 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, an initial neural network model is trained based on pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as a defect classification model;
[0068] 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.
[0069] In step S11, a captured sample image of a silk screen defect is obtained.
[0070] By selecting plastic parts with screen printing defects from the production line as samples, we then select multiple acquisition points at the abnormal areas of these samples and capture images of these acquisition points to obtain images of the screen printing defect samples. The image data obtained in this way can truly reflect the specific situation of the screen printing defects.
[0071] In step S12, data processing is performed on the silk screen defect sample image to obtain defect sample data.
[0072] In a specific embodiment, the data processing of the silk screen defect sample image to obtain defect sample data includes:
[0073] Classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images;
[0074] Converting the color image information into grayscale image information to obtain gray image information;
[0075] Performing matrix conversion on the grayscale image information to obtain grayscale matrix data;
[0076] Normalize the grayscale value of each pixel of the grayscale matrix data using the following formula to obtain normalized data:
[0077]
[0078] 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;
[0079] The color image information, the grayscale image information and the normalized data are used as the defect sample data.
[0080] In a specific embodiment, classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images includes:
[0081] Cluster analysis is performed 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;
[0082] Calculate the center point category of each silk screen defect sample according to the preset distance measurement function to obtain sample category data;
[0083] According to the sample category data, the sample data belonging to the same center point category are classified and stored in the matrix P;
[0084] 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;
[0085] The matrix A is converted into an n-dimensional column vector by the following data smoothing function:
[0086]
[0087] in, Represents the column vector data after data smoothing, represents the data in matrix A, Indicates the window size for data smoothing, represents the coordinates of the elements in matrix A, Indicates Centered 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;
[0088] According to the type of silk screen defect, if the silk screen defect sample data appears Silk screen defects, in the matrix P, Set to 1, and other positions to 0;
[0089] In a specific embodiment, converting the color image information into grayscale image information to obtain gray image information includes:
[0090] The color image information is converted into grayscale image information using the following grayscale conversion formula:
[0091]
[0092] in, represents the grayscale 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.
[0093] In a specific embodiment, the grayscale image information is subjected to matrix conversion to obtain grayscale matrix data;
[0094] As shown in the following formula, the grayscale values of each pixel in the grayscale image are arranged in row-first or column-first order to form a Matrix ;
[0095]
[0096] in, Represents the grayscale matrix, each element Indicates the Rank Grayscale value of the pixel.
[0097] Specifically, the silk screen defect sample images are first classified to obtain color image information, including test sample images and training sample images. Using cluster analysis and distance metric functions, the sample data is categorized and stored in a matrix, ensuring sample diversity and representativeness. Next, the color image information is converted to grayscale image information. A grayscale conversion formula eliminates the influence of color on defect detection, allowing the data to focus more on the characteristics of the defect itself. Subsequently, the grayscale image information is transformed into a grayscale matrix data, and normalization is performed to standardize the grayscale values to the range [0, 1]. This process not only improves data quality but also reduces grayscale value variations between different images, making subsequent data processing and feature extraction more consistent and effective. Furthermore, a data smoothing function further optimizes data quality, enabling the model to more accurately identify and classify silk screen defects.
[0098] In step S13, feature extraction is performed on the defect sample data to obtain defect feature data.
[0099] In a specific embodiment, extracting features from the defect sample data to obtain defect feature data includes:
[0100] Extracting the silk screen surface features from the defect sample data by using a feature extraction network model to obtain the silk screen surface features;
[0101] Extracting silk screen boundary features from the defect sample data using a Gabor filter;
[0102] Extracting silk screen color features from the defect sample data using a YUV color model;
[0103] The silk-screen surface features, the silk-screen boundary features and the silk-screen color features are used as defect feature data.
[0104] In a specific embodiment, extracting the silk screen surface features from the defect sample data using a feature extraction network model to obtain the silk screen surface features includes:
[0105] The defect sample data is input into a feature extraction network model.
[0106] The local boundary features of the image are extracted through the following multi-layer convolutional layers:
[0107]
[0108] in, represents the local features of the boundary, is the activation function, represents the weight matrix of the convolutional layer, Represents the preset convolutional layer bias;
[0109] The following pooling layers are used to reduce the dimension of the feature map and retain key boundary features:
[0110]
[0111] in, Represents the first Rank The characteristics of the columns, Represents the grayscale value of an area, It is the maximum pooling function, which is a preset computer program.
[0112] The extracted features are converted into fixed-length feature vectors through the following fully connected layer.
[0113]
[0114] in, Indicates 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.
[0115] In a specific embodiment, extracting the silk screen boundary features from the defect sample data using a Gabor filter includes:
[0116] Obtaining pixel coordinates in the color image information;
[0117] The Gabor filter is generated by the following formula:
[0118]
[0119]
[0120]
[0121] in, is the preset frequency, is the preset wavelength, is the preset direction, is the phase shift, is the standard deviation of grayscale values, is the image aspect ratio, and are pixel coordinates.
[0122] In a specific embodiment, extracting the silk screen color feature from the defect sample data using a YUV color model includes:
[0123] The normalized grayscale matrix data is converted to the YUV color space using the following YUV color space conversion formula:
[0124]
[0125] 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.
[0126] First, the defect sample data is input into the feature extraction network model. The feature extraction network model gradually extracts high-level features from the image through multiple layers of convolution, pooling, and activation functions. Specifically, during the input data preparation phase, the normalized grayscale matrix data is input into the feature extraction network model. Then, multiple convolution layers are used to extract local features of the image. The convolution operation can be expressed as:
[0127]
[0128] in, represents the local features of the boundary, is the activation function, represents the weight matrix of the convolutional layer, Represents the preset convolutional layer bias. The convolutional layer gradually extracts higher-level features by learning local features in the image, such as edges and texture features.
[0129] 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:
[0130] in, Represents the first Rank The characteristics of the columns, Represents the grayscale value of an area, It is the maximum pooling function, which is a preset computer program.
[0131] The pooling layer reduces the computational complexity by reducing the size of the feature map while retaining the most important feature information.
[0132] Finally, the extracted features are converted into fixed-length feature vectors through the fully connected layer. The fully connected operation can be expressed as:
[0133] in, Indicates 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.
[0134] Next, a Gabor filter is used 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, the pixel coordinates in the color image information are obtained. Then, the Gabor filter is generated using the following formula:
[0135]
[0136]
[0137]
[0138] in, is the preset frequency, is the preset wavelength, is the preset direction, is the phase shift, is the standard deviation of grayscale values, is the image aspect ratio, and are pixel coordinates.
[0139] Gabor filters can effectively capture local texture and boundary information in images by simulating the receptive field of the human visual system.
[0140] 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.
[0141] The modulus and phase values of the filtered image are calculated as boundary features using the following formula:
[0142]
[0143] 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.
[0144] Finally, the silkscreen 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:
[0145]
[0146] 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.
[0147] 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.
[0148] In summary, by extracting multiple features from defect sample data, including silk screen surface features, silk screen boundary features, and silk screen color features, the characteristics of the defect samples can be fully described, thereby improving the accuracy of defect detection.
[0149] 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.
[0150] In a specific embodiment, the training process of the initial neural network model includes:
[0151] Inputting pre-stored historical feature data and historical sample data into the input layer of the neural network model for training, and obtaining predicted value data output by the output layer of the neural network model;
[0152] Substituting the predicted value data and the preset process parameters into the loss function to calculate the loss value to obtain the loss value data;
[0153] Calculating the gradient of the output layer output of the neural network model based on the loss value data, and passing the gradient forward layer by layer through the chain rule to calculate the gradient of the parameters of each layer to obtain gradient data;
[0154] Update the parameters of each layer of the neural network model based on the gradient data and the preset learning rate;
[0155] The parameters of each layer are updated repeatedly until the training 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, the training is determined to be completed.
[0156] In a specific embodiment, the 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:
[0157] 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;
[0158] The types of screen printing defects include dirty spots, uneven ink, white spots, cracks, too thick ink at the edge or uneven color;
[0159] Analyze the correlation between the preset actual process parameters and the types of screen printing defects to obtain correlation information;
[0160] Analyzing the weight of the actual process parameters corresponding to each type of the screen printing defect using a distance metric function according to the association information to obtain defect weight data;
[0161] Specifically, historical feature data and historical sample data must first be prepared. This data includes known defect samples, their corresponding feature data, and corresponding labels. This data will be used to train the neural network model. Then, this pre-stored historical feature data and sample data are fed into the input layer of the neural network model. The neural network model performs forward propagation based on this input data to calculate predicted values. Next, the predicted values, along with the preset process parameters, are substituted into a loss function to calculate the loss value. The loss function measures the difference between the model's prediction and the true value. Common loss functions include mean squared 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, called backpropagation, uses the chain rule to propagate the gradient forward layer by layer, calculating the gradient of each layer's parameters and determining the degree to which each parameter affects 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 to minimize the loss value, that is, to make the model's predictions more closely match the actual value. The above process is repeated until the stopping condition is met. There are two stopping conditions: one is when the neural network model has been trained for more than a preset number of times, which means the training is considered sufficient and can be stopped; the other is when the loss value of the neural network model falls below the preset loss threshold, which means the model has achieved a satisfactory performance level and training can also be stopped.
[0162] Once the training is complete, 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.
[0163] Next, the model, through multiple layers of internal processing, identifies the specific types of screen printing defects within the image. These defects include dirty spots, uneven ink distribution, white spots, cracks, excessively thick ink at the edges, or uneven color. The model's predictions accurately identify the defect type present in each sample image.
[0164] 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 determined. For example, a certain defect may be more likely to occur within a specific temperature range.
[0165] Based on the correlation information obtained from the above analysis, a 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 particular defect type occurring under the current process parameter settings. For example, if a process parameter setting increases the probability of ink unevenness, the weight associated with that 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.
[0166] Ultimately, through the above steps, we can obtain weighted data for each defect type. This weighted data not only helps us understand the occurrence patterns of different defects in the production process, but also serves as an important reference for adjusting process parameters, thereby reducing the occurrence of defects and improving production efficiency and product quality.
[0167] The entire process uses a machine learning model to automatically identify and classify screen printing defects. By analyzing the relationship between defects and process parameters, a weighted value is assigned to each defect. This approach not only improves the accuracy and efficiency of defect identification but also provides a scientific basis for optimizing the production process.
[0168] 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.
[0169] In a specific embodiment, adjusting the pre-input actual process parameters according to the defect weight data to obtain the adjusted process parameters includes:
[0170] Calculating based on the actual process parameters and the preset process parameter standard interval to obtain a weight interval;
[0171] Matching the defect weight data with the weight interval to obtain the process parameters to be adjusted;
[0172] Adjusting the process parameters according to the process parameters to be adjusted to obtain adjusted process parameters;
[0173] 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.
[0174] First, the weight interval is calculated based on the actual process parameters and the preset process parameter standard interval. Through calculation, the degree of deviation of each actual process parameter from the standard interval can be determined, thereby obtaining the weight interval. The calculation formula of the weight interval can be expressed as:
[0175]
[0176] in, It is The weight of the process parameters, It is Actual process parameters, and The preset The lower and upper limits of the standard range of each process parameter.
[0177] Next, the defect weight data is matched against the weight range to determine the process parameters to be adjusted. The defect weight data reflects the probability of each defect type occurring under the current process parameter settings. By matching the defect weight data against the weight range, we can identify process parameters with higher weights, which are the primary contributors to defects.
[0178] 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 move 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:
[0179]
[0180] in, 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.
[0181] 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.
[0182] The following describes the working process of the present invention using a common scenario as an example. Figure 1 , a method for controlling screen printing of plastic parts, comprising the following steps:
[0183] First, the staff selected some plastic parts with silk screen defects from the production line as samples. They selected multiple collection points at the abnormal parts of the samples and captured images of these collection points to obtain images of the silk screen defect samples.
[0184] Next, they converted this color image information into grayscale images, eliminating the influence of color on defect detection and allowing the data to focus more on the characteristics of the defects themselves. They then performed a matrix transformation on the grayscale image information to form grayscale matrix data. Normalization then normalized the grayscale values to the range [0, 1]. This process not only improved data quality but also reduced grayscale value variations between images, making subsequent data processing and feature extraction more consistent and effective. Furthermore, a data smoothing function was used to further optimize data quality, enabling the model to more accurately identify and classify screen printing defects.
[0185] After data preprocessing, a feature extraction network model was used to extract silkscreen surface features from the defect sample data. A Gabor filter was used to extract silkscreen boundary features, and a YUV color model was used to extract silkscreen color features. These three features collectively describe the characteristics of the defect sample and improve the accuracy of defect detection.
[0186] Subsequently, these defect sample data and defect feature data were input into a pre-set defect classification model. This model is an initial neural network model trained using 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 distribution, white spots, cracks, excessively thick ink edges, or uneven color. Through its internal multi-layer processing, the model can accurately determine the defect type present in each sample image.
[0187] After identifying the defect types, we analyze the correlations between these defects and the actual process parameters, and determine the relationships 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, we use a distance metric function to calculate the weights of the actual process parameters corresponding to each defect type. These weights reflect the likelihood of a particular defect occurring under the current process parameter settings. For example, if a process parameter setting increases the probability of an uneven ink defect, then the weight associated with that parameter will be higher.
[0188] Finally, the staff adjusted the actual process parameters that had been input in advance based on these defect weight data, and obtained the adjusted process parameters. These adjusted process parameters were applied to the silk screen production process, thereby reducing the occurrence of defects and improving product quality and production efficiency.
[0189] 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, providing a scientific basis for optimizing the production process and solving the problem of low efficiency of manual defect identification.
[0190] Reference Figure 2 A second embodiment of the present invention provides a plastic part screen printing control device, comprising:
[0191] A data acquisition module is used to acquire the captured images of silk screen defect samples;
[0192] A data preprocessing module is used to process the silk screen defect sample image to obtain defect sample data;
[0193] A feature extraction module is used to extract features from the defect sample data to obtain defect feature data;
[0194] A 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 an initial neural network model is trained based on pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as a defect classification model;
[0195] 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.
[0196] It should be noted that the 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. The working principles and beneficial effects of the two correspond one to one, and thus will not be described in detail.
[0197] An 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 embodiments of the plastic part screen printing control method 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 the plastic part screen printing control module.
[0198] 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, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0199] The electronic device may be a computing device such as a desktop computer, notebook, PDA, or smart tablet. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will appreciate that the aforementioned components are merely examples of electronic devices and do not constitute a limitation of the electronic device. The electronic device may include more or fewer components than those described above, or a combination of certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, and the like.
[0200] 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), 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. The processor is the control center of the electronic device and connects various parts of the entire electronic device using various interfaces and lines.
[0201] The memory can be used to store the computer programs and / or modules. The processor implements the various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and accessing the data stored in the memory. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0202] If the module / unit integrated into the electronic device is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the process steps in the above-mentioned method embodiments by using a computer program to instruct the relevant hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, based on legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0203] It should be noted that the device embodiments described above are merely illustrative, 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 across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the 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 can understand and implement the present invention without inventive effort.
[0204] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for controlling screen printing of plastic parts, characterized in that: Executed by the controller, including: Acquire captured images of silk screen defect samples; 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; Inputting 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, an initial neural network model is trained based on pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as a defect classification model; 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; The feature extraction of the defect sample data to obtain defect feature data includes: Extracting the silk screen surface features from the defect sample data by using a feature extraction network model to obtain the silk screen surface features; Extracting silk screen boundary features from the defect sample data using a Gabor filter; Extracting silk screen color features from the defect sample data using a YUV color model; Using the silk-screen surface features, the silk-screen boundary features, and the silk-screen color features as defect feature data; The step of inputting the defect sample data and the defect feature data into the defect classification model to perform defect classification and 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; The types of screen printing defects include dirty spots, uneven ink, white spots, cracks, too thick ink at 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; Analyzing the weight of the actual process parameters corresponding to each type of the screen printing defect using a distance metric function according to the association information to obtain defect weight data; 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 based on 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.
2. The method for controlling screen printing of plastic parts according to claim 1, characterized in that: The 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; Normalize the grayscale value of each pixel of the grayscale matrix data using 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 2, characterized in that: The training process of the initial neural network model includes: Inputting pre-stored historical feature data and historical sample data into the input layer of the neural network model for training to obtain predicted value data output by the output layer of the neural network model; the pre-stored historical feature data and historical sample data include known defect samples and their corresponding feature data, as well as corresponding labels; the pre-stored historical feature data and historical sample data are used to train the neural network model; the neural network model performs forward propagation based on the pre-stored historical feature data and historical sample data to calculate the predicted value data; Substituting the predicted value data and the preset actual process parameters into a loss function to calculate a loss value to obtain loss value data; the loss function is an indicator used to measure the difference between the model predicted value data and the actual process parameters. Commonly used loss functions include mean square error and cross entropy loss; Calculating the gradient of the output layer output of the neural network model based on the loss value data, and passing 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 based on the gradient data and the preset learning rate; The parameters of each layer are updated repeatedly until the training 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, the training is determined to be completed.
4. The method for controlling screen printing of plastic parts according to claim 2, wherein: The method of classifying the silk screen defect sample images to obtain color image information including test sample images and training sample images includes: Cluster analysis is performed 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; Calculate the center point category of each silk screen defect sample according to the preset distance measurement function to obtain 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, Indicates the window size for data smoothing, represents the coordinates of the elements in matrix A, Indicates Centered 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 Silk screen defects, in the matrix P, Set to 1, and other positions to 0; The data in the matrix A and the matrix P are used together as the test sample image and the test sample image.
5. A plastic part screen printing control device, used to implement the plastic part screen printing control method according to any one of claims 1 to 4, characterized in that: The plastic part screen printing control device includes: A data acquisition module is used to acquire the captured images of silk screen defect samples; A data preprocessing module is used to process the silk screen defect sample image to obtain defect sample data; A feature extraction module is used to extract features from the defect sample data to obtain defect feature data; A 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 an initial neural network model is trained based on pre-stored historical feature data and historical sample data, and the trained initial neural network model is used as a 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.
6. 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 when the processor executes the computer program, the method for controlling screen printing of plastic parts according to any one of claims 1 to 4 is implemented.
7. 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 4.
Citation Information
Patent Citations
Intelligent control method for zinc alloy part machining
CN115131347A
Metal semi-solid pulping process parameter optimization method
CN119007892A