Process monitoring method for production of plastic shell of capacitive filter

Through adaptive adjustment of learning rate optimization neural network model training, the accuracy problem of defect detection in the production of capacitor filter plastic shells is solved, and effective identification and accurate monitoring of non-obvious defects are achieved.

CN120279005AInactive Publication Date: 2025-07-08DONGGUAN XINGBO PRECISION MOLD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510734848.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-07-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing neural network models are difficult to adapt to the diversity defect characteristics during the production process of capacitor filter plastic shells, resulting in overfitting or missed judgments, reducing detection accuracy.

Method used

By adaptively adjusting the learning rate, the learning rate is weighted by the product of the average prominence degree and information entropy of the defective image, the training process of the neural network model is optimized, and the learning ability for non-obvious defects is improved.

Benefits of technology

The training effect of the model is improved, overfitting and mis-detection are avoided, and accurate monitoring of the production process of the capacitor filter plastic shell is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279005A_ABST
    Figure CN120279005A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a process monitoring method for capacitive filter plastic shell production, which comprises the following steps: acquiring an image of a capacitive filter plastic shell and carrying out defect marking to construct a training set to train a pre-constructed neural network model, and in the training process, carrying out defect marking on the image of the capacitive filter plastic shell; if all the sample sets of which the model parameters are updated at the time are intact images, updating the model parameters by using a preset learning rate, otherwise, weighting the learning rate by using the product of the average prominence degree of the defect images in the sample sets and the average information entropy of all the images in the sample sets, and updating the model parameters based on the weighted value, and performing defect detection based on the trained neural network model. The method can utilize the neural network model to accurately monitor the abnormity in the production process of the plastic shell of the capacitive filter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing. More specifically, the present invention relates to a process monitoring method for the production of plastic casings of capacitive filters. Background Art

[0002] In new energy vehicles, capacitive filters play an important role. In order to prevent the capacitive filters from being physically damaged and affecting their functions, plastic casings are usually equipped to provide protection. These plastic casings are generally produced by an injection molding process. However, if abnormalities occur during the injection molding process, the produced plastic casings may have defects, resulting in the inability to effectively protect the capacitive filters, and even making it impossible to install them on the capacitive filters. Therefore, it is crucial to monitor abnormalities during the production process.

[0003] In related technologies, in order to improve the intelligent level of production process monitoring, a neural network model based on images is usually used to automatically identify defects. The general content includes: First, collect an image data set containing defective and non-defective samples to construct a training set; then, select a suitable neural network architecture to construct a model; then, in the training stage, train the model with the goal of minimizing the loss function; finally, use the trained model to detect defects in new images, and measure the detection performance through evaluation metrics (such as accuracy, recall, etc.) to ensure the effectiveness of the model in practical applications.

[0004] However, in the training of traditional neural network models, a fixed learning rate is usually used to update model parameters. However, the defects in the samples usually have diversity, and some defect features may not be obvious. It is difficult for a fixed learning rate to adapt to the learning needs of different defects. This easily leads to overfitting of the model to obvious defects and insufficient learning of non-obvious defects, thereby causing misjudgment or missed judgment problems in anomaly detection and reducing the accuracy of detection results. Summary of the Invention

[0005] In order to solve the problem that accurate defect detection results cannot be obtained using a neural network model, the present invention provides a process monitoring method for the production of plastic casings of capacitive filters. The method includes: Obtain an image of a plastic casing of a capacitive filter and perform defect annotation to train a pre-constructed neural network model with the constructed training set. During the training process, if all the images in the sample set are intact when updating the model parameters for the current time, update the model parameters using a preset learning rate; otherwise, use the product of the average prominence of defective images in the sample set and the average information entropy of all images in the sample set to weight the learning rate, and update the model parameters based on the weighted value to perform defect detection based on the trained neural network model; Method for obtaining defect prominence degree of any defect image, including: calculating recognition difficulty of each type of defect, where the recognition difficulty represents recognition difficulty of defect features within a defect image block corresponding to that type of defect; Taking any defect image as a target image, calculating defect prominence degree of the target image, where the defect prominence degree is positively correlated with recognition difficulty of a defect corresponding to each annotation box in the target image, and with area ratio of an image block within each annotation box in the target image to the target image, and negatively correlated with similarity degree between an image block within each annotation box in the target image and the target image.

[0006] The present invention can adaptively adjust learning rate during training process of a neural network model, and when defects in a sample set during any update of model parameters are relatively obvious, can increase learning rate during this update of the model to avoid overfitting; while when defects in a sample set during any update of model parameters are not obvious, can decrease learning rate during this update of the model, enabling the model to more carefully learn defects in the sample set, improving learning ability for non-obvious defects, thereby improving training effect of the model, and further accurately monitoring abnormalities during production process of a plastic housing of a capacitive filter based on the trained neural network model.

[0007] Preferably, calculating recognition difficulty of each type of defect includes: Calculating average edge number of a defect image block corresponding to each type of defect, if average edge number of a defect image block corresponding to any type of defect is 0, then recognition difficulty of this type of defect is 1; otherwise, recognition difficulty of this type of defect satisfies the following relational expression: ; In the formula, is recognition difficulty of any type of defect; is average contrast of a defect image block corresponding to this type of defect; is average edge number of a defect image block corresponding to this type of defect; is average standard deviation of gradient values of edge pixel points within a defect image block corresponding to this type of defect; is natural exponential function; is normalization function.

[0008] The present invention comprehensively measures recognition difficulty of each type of defect with data from multiple aspects, and can ensure accuracy of the calculated recognition difficulty.

[0009] Preferably, method for obtaining any defect image block corresponding to any type of defect includes: Taking an image block within any annotation box in any defect image as a defect image block corresponding to a defect type corresponding to a defect label of this annotation box.

[0010] Preferably, the defect labels include bubbles, warping, peeling, and cracking.

[0011] Preferably, the defect prominence degree of the target image satisfies the following relational expression: ; In the formula, is the defect prominence degree of the target image; is the similarity degree between the image block within the th annotation box in the target image and the target image; is the recognition difficulty of the defect corresponding to the th annotation box in the target image; is the area of the image block within the th annotation box in the target image; is the area of the target image; is the representation symbol of the function; is the number of annotation boxes in the target image.

[0012] The present invention can accurately measure the obviousness of defects in the target image, thereby providing a precise data basis for subsequent analysis processes.

[0013] Preferably, the method for obtaining the similarity degree includes: Obtain the local binary pattern of each pixel point in the target image, and use the one-dimensional vector composed of the number of occurrences of each local binary pattern in the target image as the feature vector of the target image; Take the image block within any annotation box in the target image as the target image block, and in the same way as determining the feature vector of the target image, obtain the feature vector of the target image block, and calculate the cosine similarity between the feature vector of the target image block and the feature vector of the target image to obtain the similarity degree between the target image block and the target image.

[0014] Based on the LBP features of local defects and the target image, the present invention evaluates the similarity degree between local defects and the target image, and can effectively capture the local texture information of the image in complex scenarios such as different light intensities, ensuring the reliability of the similarity degree.

[0015] Preferably, in the process of training a pre-constructed neural network model using a training set, it further includes: Use mini-batch stochastic gradient descent to divide the training set into several mini-batches, and use each mini-batch data as the sample set when updating the model parameters.

[0016] Preferably, if there is a defective image in the sample set for updating the model parameters this time, the adjusted learning rate satisfies the following relational expression: ; Wherein, is the learning rate when updating the model parameters using the sample set in which there are defective images in the sample set for the current update; is the preset learning rate; is the average defect prominence degree of the defective images in the sample set; is the average information entropy of all the images in the sample set; is the preset hyperparameter.

[0017] The method for adjusting the learning rate in the present invention can avoid the problems of overfitting of the model and poor learning effect, thereby improving the training effect of the model.

[0018] Preferably, if there are defective images in the sample set for the current update of the model parameters, the adjusted learning rate also satisfies the following relational expression: ; Wherein, is the learning rate when updating the model parameters using the sample set in which there are defective images in the sample set for the current update; is the preset learning rate; is the average defect prominence degree of the defective images in the sample set; is the average information entropy of all the images in the sample set.

[0019] Preferably, the pre-constructed neural network model is the YOLOV5 model.

[0020] The present invention has the following effects: By adaptively adjusting the learning rate when updating the model parameters each time, the present invention can avoid overfitting of the model to obvious defects, thereby accelerating the model convergence speed; and can avoid the problem that the model cannot effectively learn non-obvious features, resulting in insufficient training of the model defects, thereby improving the model training effect, so that when performing defect detection based on the trained neural network model, the problems of missed detection or misjudgment can be avoided, thereby realizing precise monitoring of the production process of the plastic housing of the capacitor filter. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By referring to the accompanying drawings and reading the following detailed description, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become easy to understand. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 is a schematic flow chart of the steps of a process monitoring method for the production of a plastic housing of a capacitor filter according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

[0023] The following will specifically describe the embodiments of the present invention in conjunction with the accompanying drawings.

[0024] Referring to Figure 1 , a process monitoring method for the production of plastic casings of capacitive filters, including steps S1 - S3, is specifically as follows: S1: Obtain images of plastic casings of capacitive filters and perform defect annotation to construct a training set for training a pre - constructed neural network model.

[0025] Specifically, images of the produced plastic casings of capacitive filters can be taken in sequence at a certain shooting angle, and defects in the images are annotated using annotation boxes with defect labels. The annotation boxes contain the position and category information of the defects, so as to integrate all the images and the defect labels of each annotation box into a training set for subsequent training of the pre - constructed neural network model. In this embodiment, there is no special limitation on the shooting angle of the images.

[0026] In an exemplary embodiment of the present invention, the defect labels include bubbles, warping, peeling, and cracking.

[0027] It should be noted that appropriate defect labels can also be set according to specific situations, and there is no special limitation on the setting of defect labels in this embodiment.

[0028] In an exemplary embodiment of the present invention, the pre - constructed neural network model is the YOLOV5 model.

[0029] It should be noted that YOLOv5 (You Only Look Once version 5) is an efficient object detection model based on deep learning, retaining the core architecture of the YOLO series, and can simultaneously predict the bounding boxes and categories of objects through a single forward propagation, greatly improving the detection efficiency. Therefore, the present invention uses this model as the neural network model for defect detection, which can improve the defect detection efficiency. Among them, the construction process of the neural network model is prior art, and will not be described in detail in this embodiment.

[0030] Optionally, a convolutional neural network can also be used as the neural network model for defect detection. There is no special limitation on the type of neural network selected in this embodiment.

[0031] S2: During the training process, if all the images in the sample set when updating the model parameters at a certain time are intact images, the model parameters are updated using the preset learning rate; otherwise, the learning rate is weighted by the product of the average prominence degree of the defective images in the sample set and the average information entropy of all the images in the sample set, and the model parameters are updated based on the weighted value.

[0032] It should be noted that during the training process of the neural network model, the model parameters are usually updated using a fixed learning rate. However, when using a fixed learning rate to update the model parameters, it is difficult to balance the learning requirements in different situations, and it is easy to produce overfitting or slow convergence, thus affecting the training effect of the model. Therefore, the present invention improves the training process of the model. Specifically, the improvement is as follows: when there are defective images in any iteration, the preset learning rate is weighted by the product of the average defect prominence degree of the defective images in this iteration and the average information entropy of all the images in this iteration, so as to update the model parameters based on the adjusted learning rate. Thus, when the defect is obvious, a larger learning rate can be adopted to accelerate feature learning, reduce the number of iterations, avoid overfitting, and improve the training efficiency; when the defect is not obvious, a smaller learning rate can be adopted, so that the model can update the parameters more carefully and better learn the defect features, thereby ensuring the accuracy of the training results.

[0033] Among them, the present invention only improves the determination method of the learning rate in the model training process and does not improve other contents of the model.

[0034] In an exemplary embodiment of the present invention, the defect prominence degree refers to the data that can reflect the prominence of the defects in the image. For example, when the defect in any image is more prominent, the defect prominence degree of this image is greater; on the contrary, when the defect in any image is not obvious, the defect prominence degree of this image is smaller.

[0035] Specifically, the determination of the defect prominence degree of any defective image can be achieved through the following steps: Step 1: Calculate the recognition difficulty of each type of defect, and the recognition difficulty represents the recognition difficulty of the defect features in the defective image blocks corresponding to the corresponding type of defect. In an exemplary embodiment of the present invention, the determination of any defective image block corresponding to any type of defect can be achieved through the following steps: The image block within any annotation box in any defective image is used as the defective image block corresponding to the defect category corresponding to the defect label of this annotation box.

[0036] For example, when there is a defect label of "bubble" in any defective image, the image block within the annotation box with this defect label is used as the defective image block corresponding to the bubble defect, so that all the defective image blocks corresponding to all the defect categories corresponding to the defect labels in all the defective images can be determined.

[0037] Furthermore, after determining the defect image blocks corresponding to each type of defect, the recognition difficulty of the defect features in the defect image blocks corresponding to any type of defect can be evaluated, so as to determine the recognition difficulty of this type of defect.

[0038] In an exemplary embodiment of the present invention, the determination of the recognition difficulty of each type of defect can be achieved through the following steps: (1) Calculate the average number of edges of the defect image blocks corresponding to each type of defect. If the average number of edges of the defect image blocks corresponding to any type of defect is 0, the recognition difficulty of this type of defect is 1; Optionally, the Canny edge detection algorithm can be used to obtain the edges within any defect image block, or the Sobel operator, Prewitt operator, etc. can be used to determine the edges within any defect image block. The present embodiment does not particularly limit the method for determining the edges.

[0039] It should be noted that when the average number of edges of the defect image blocks corresponding to any type of defect is zero, it indicates that the defect features of this type of defect are extremely inconspicuous, and further indicates that the difficulty of recognizing this type of defect is very high. Therefore, the recognition difficulty of this type of defect can be set to 1.

[0040] (2) If the average number of edges of the defect image blocks corresponding to any type of defect is greater than 0, the recognition difficulty of this type of defect satisfies the following relationship: ; In the formula, is the recognition difficulty of any type of defect; is the average contrast of the defect image blocks corresponding to this type of defect; is the average number of edges of the defect image blocks corresponding to this type of defect; is the average standard deviation of the gradient values of the edge pixel points within the defect image blocks corresponding to this type of defect; is the natural exponential function; is the normalization function.

[0041] Among them, reflects the average value of the contrasts of the image blocks within all the annotation boxes with the same defect labels in the training set. The larger this value is, the lower the recognition difficulty of the corresponding type of defect. It should be noted that since the annotation boxes are formed by the circumscribed rectangular boxes of the defect locations, that is to say, although the main body of the image blocks within the annotation boxes is the defect part, there will still be some non-defect parts in the annotation boxes, resulting in a certain contrast of the defect image blocks. And when the defect image blocks have a high contrast, the recognition difficulty of the defect is small. Therefore, this feature can be used to evaluate the recognition difficulty of the corresponding type of defect through the average contrast of all the defect image blocks corresponding to each type of defect.

[0042] Optionally, determination methods such as Michelson contrast and Weber contrast can be used to determine the contrast of the defect image blocks corresponding to each type of defect.

[0043] It reflects the average value of the number of edges of the image blocks within all the annotation boxes with the same defect label in the training set. The larger this value is, the lower the recognition difficulty of the corresponding type of defect. It should be noted that obvious defects usually have more edges in the image. The more edges there are, the easier the defects are to be recognized; the fewer edges or even no edges, the more difficult the defects are to be recognized. Therefore, this feature can be used to evaluate the recognition difficulty of the corresponding type of defect through the average number of edges of all the defect image blocks corresponding to each type of defect.

[0044] It reflects the average value of the standard deviation of the gradient values within all the annotation boxes with the same defect label in the training set, and is used to quantify the edge strength within the defect image blocks corresponding to any type of defect. The larger this value is, it indicates that the edge strength within the defect image blocks corresponding to the corresponding type of defect is lower, and further indicates that the recognition difficulty of this type of defect is greater.

[0045] It should be noted that when performing edge detection on the defect image blocks, some pixel points with slightly lower gradients connected to the high-gradient pixel points may be recognized as edge pixel points. That is, the edge pixel points on the edges with high strength all have high gradient values, while there will be edge pixel points with slightly lower gradient values on the edges with low strength. Therefore, the present invention utilizes this feature to evaluate the strength of the edges within the corresponding defect image blocks by calculating the standard deviation of the gradient values of the edge pixel points within the defect image blocks of any type of defect.

[0046] Step 2: Take any defect image as the target image, and calculate the defect prominence degree of the target image. The defect prominence degree is positively correlated with the recognition difficulty of the defect corresponding to each annotation box in the target image, and the area ratio of the image block within each annotation box in the target image to the target image, and is negatively correlated with the similarity degree between the image block within each annotation box in the target image and the target image.

[0047] It should be noted that in defect detection, the visual salience of different defects is different. Defects with high contrast and rich edges are easy to be recognized, while defects with low contrast and fewer edges are more difficult to be recognized. The neural network model often gives priority to paying attention to the easily recognized defects, and has poor recognition effect on the unobvious defects. Therefore, the present invention calculates the defect prominence degree of the image by analyzing the pixel distribution in the defect image and the recognition difficulty of each type of defect, so as to optimize the training process of the neural network model and make full use of the data characteristics.

[0048] In an exemplary embodiment of the present invention, the determination of the similarity degree between an image block within any annotation box in the target image and the target image can be achieved through the following steps: Obtain the local binary pattern of each pixel point in the target image, and use the one-dimensional vector composed of the number of occurrences of each local binary pattern in the target image as the feature vector of the target image; take the image block within any annotation box in the target image as the target image block, and in the same way as determining the feature vector of the target image, obtain the feature vector of the target image block, and calculate the cosine similarity between the feature vector of the target image block and the feature vector of the target image to obtain the similarity degree between the target image block and the target image.

[0049] Specifically, the LBP operator can be used to obtain the LBP value of each pixel point in the target image, and construct a local binary pattern histogram of the target image. The abscissa of the histogram is each LBP value, and the ordinate is the number of occurrences of each LBP value in the target image. Then, arrange the column heights corresponding to each LBP value in the histogram in a row to obtain the feature vector of the target image, and in the same way, obtain the feature vector of the image block within each annotation box in the target image.

[0050] It should be noted that the local binary pattern is an operator used to describe the local texture features of an image, with rotational invariance and gray-scale invariance. Therefore, the feature vectors calculated in the present invention can better reflect the texture features of the corresponding images, enabling the use of the cosine similarity between the feature vectors to accurately evaluate the similarity degree between local defects and the target image.

[0051] In another embodiment, the similarity degree between local defects and the target image can also be evaluated based on the image blocks within each annotation box in the target image and the HOG features of the target image.

[0052] Furthermore, after determining the similarity degree between the image blocks within each annotation box in the target image and the target image, the defect prominence degree of the target image can be calculated by combining the recognition difficulty of the defects corresponding to the image blocks within each annotation box in the target image and the area ratio between the image blocks within each annotation box in the target image and the target image. Specifically, the defect prominence degree of the target image satisfies the following relational expression: ; In the formula, is the defect prominence degree of the target image; is the similarity degree between the image block within the th annotation box in the target image and the target image; is the recognition difficulty of the defect corresponding to the th annotation box in the target image; is the The area of the image patch within a bounding box; is the area of the target image; is the representation symbol of the function, used for normalization; is the number of bounding boxes in the target image.

[0053] Among them, the larger it is, the closer the features of the local defect are to those of the overall image, which further indicates that the defect in the target image is less prominent, and the defect prominence degree of the corresponding target image is lower. the larger it is, the greater the difficulty in identifying the defect in the target image, the less prominent the defect is, and the lower the defect prominence degree of the corresponding target image.

[0054] reflects the area ratio of the image patch within the th bounding box in the target image to the target image. The larger this value is, the larger the area of the defect in the target image, which further indicates that the defect in the target image is more prominent, and the corresponding defect prominence degree is larger.

[0055] In another embodiment, the formula: can also be used to calculate the defect prominence degree of the target image.

[0056] Next, a pre - constructed neural network model trained based on a training set will be described in detail: First, determine the sample set used for each update of the model parameters.

[0057] In an exemplary embodiment of the present invention, the determination of the sample set for any update of the model parameters can be achieved through the following steps: Use mini - batch stochastic gradient descent to divide the training set into several mini - batches, and use each mini - batch data as the sample set for updating the model parameters.

[0058] It should be noted that the process of dividing the training set into several mini - batches using mini - batch stochastic gradient descent is a prior art, and this embodiment will not elaborate on it here. Among them, when the present invention updates the model parameters using mini - batch stochastic gradient descent, the mini - batch size is set to 32. For example, when the training set has 320 images, then using mini - batch stochastic gradient descent, the training set can be divided into 10 mini - batches of size 32, and the model parameters are updated based on each mini - batch data.

[0059] Optionally, the model parameters can also be updated using batch gradient descent, that is, using the training set as the sample set for each update of the model parameters.

[0060] Then, it can be determined whether there are defective images in the sample set used for updating the model parameters this time. If so, the model parameters are updated according to a preset learning rate, such as 0.001. Otherwise, the learning rate is weighted by the product of the average prominence degree of the defective images in the sample set and the average information entropy of all images in the sample set, and the model parameters are updated based on the weighted value, and the update process is repeated.

[0061] Specifically, when there are defective images in the sample set for updating the model parameters this time, the adjusted learning rate satisfies the following relational expression: ; In the formula, is the learning rate when using this sample set to update the model parameters when there are defective images in the sample set for updating the model parameters this time; is the preset learning rate, in this embodiment = 0.001; is the average defect prominence degree of the defective images in this sample set; is the average information entropy of all images in this sample set; is the preset hyperparameter, in this embodiment = 10, which is used as reference data to adjust size.

[0062] Among them, The larger it is, the more obvious the defects of the defective images in the sample set when updating the model parameters this time, and the easier it is for the model to learn the defect features. At this time, setting a larger learning rate can enable the model to learn effective features in fewer training iterations, thereby improving the training efficiency; the smaller this value is, the less obvious the defect features of the defective images in this sample set, and the model may not be able to stably learn these defect features, or even cause oscillation or divergence. By setting a smaller learning rate, the model can adjust the parameters more carefully to better learn these unobvious defect features.

[0063] The larger it is, the more complex the features in the sample set when updating the model parameters this time. Setting a smaller learning rate can enable the model to learn diverse features more stably, thereby improving the generalization ability of the model; the smaller this value is, the simpler the defect features in this sample set and the more stable the data distribution. Setting a larger learning rate, the model can quickly capture the main features and learn effectively, thereby accelerating the training convergence speed. It should be noted that the process of determining the information entropy of an image is a prior art, and this embodiment will not elaborate on it here.

[0064] In another embodiment, when there are defective images in the sample set for updating the model parameters this time, the adjusted learning rate also satisfies the following relational expression: ; In the formula, is the learning rate when updating the model parameters using the sample set when there are defective images in the sample set for the current update of the model parameters; is the preset learning rate. In this embodiment, = 0.001; is the average defect prominence degree of the defective images in the sample set; is the average information entropy of all the images in the sample set.

[0065] Finally, when the minimized loss function of the neural network model tends to converge, it is determined that the pre-constructed neural network model is trained, and the trained neural network model is obtained.

[0066] It should be noted that since the neural network model adopted in the present invention is the YOLOV5 model, therefore, the components of the loss function adopted in the present invention are the same as those of the loss function of the YOLOV5 model. Among them, the determination process of the loss function of the YOLOV5 model is prior art, and this embodiment will not elaborate on it here.

[0067] S3: Perform defect detection based on the trained neural network model.

[0068] Specifically, an image acquisition device and an edge computing device can be arranged at the discharging and conveying place of the plastic shell, and the trained neural network model can be deployed on the edge computing device to detect in real time whether there are defects in the produced plastic shell of the capacitor filter. If there are defects, an alarm will be given immediately to notify relevant personnel to adjust the equipment or raw materials.

[0069] In the description of this specification, the meanings of "a plurality of" and "several" are at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0070] Although this specification has shown and described multiple embodiments of the present invention, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art will think of many changes, alterations and alternative ways without departing from the spirit and idea of the present invention. It should be understood that various alternative solutions to the embodiments of the present invention described herein can be adopted in the process of practicing the present invention.

Claims

1. A process monitoring method for the production of plastic housings of capacitive filters, characterized in that, Including: Obtain the image of the plastic housing of the capacitive filter and perform defect annotation to construct a training set for training a pre-constructed neural network model. During the training process, if all the images in the sample set when updating the model parameters for the current time are intact images, update the model parameters using the preset learning rate; otherwise, multiply the average prominence of the defective images in the sample set by the average information entropy of all the images in the sample set to weight the learning rate, and update the model parameters based on the weighted value to perform defect detection based on the trained neural network model. The method for obtaining the defect prominence of any defective image includes: calculating the recognition difficulty of each type of defect, where the recognition difficulty represents the recognition difficulty of the defect features within the defective image blocks corresponding to the defect category. Taking any defective image as the target image, calculate the defect prominence of the target image. The defect prominence is positively correlated with the recognition difficulty of the defect corresponding to each annotation box in the target image and the area ratio of the image block within each annotation box in the target image to the target image, and is negatively correlated with the similarity degree between the image block within each annotation box in the target image and the target image.

2. The process monitoring method for the production of a plastic housing of a capacitive filter according to claim 1, wherein The calculation of the recognition difficulty of each type of defect includes: Calculate the average number of edges of the defective image blocks corresponding to each type of defect. If the average number of edges of the defective image blocks corresponding to any type of defect is 0, the recognition difficulty of this type of defect is 1; otherwise, the recognition difficulty of this type of defect satisfies the following relational expression: ; Wherein, is the recognition difficulty of any type of defect; is the average contrast of the defect image block corresponding to this type of defect; is the average number of edges of the defect image block corresponding to this type of defect; is the average standard deviation of the gradient values of the edge pixel points within the defect image block corresponding to this type of defect; is the natural exponential function; is the normalization function.

3. A process monitoring method for the production of a plastic housing of a capacitor filter according to claim 2, characterized in that, The method for obtaining any defective image block corresponding to any type of defect includes: Taking the image block within any annotation box in any defective image as the defective image block corresponding to the defect category corresponding to the defect label of this annotation box.

4. A process monitoring method for the production of a plastic housing of a capacitive filter according to claim 3, characterized in that, The defect labels include bubbles, warping, peeling, and cracking.

5. A process monitoring method for the production of a plastic housing of a capacitive filter according to claim 1, characterized in that, The defect prominence of the target image satisfies the following relational expression: ; In the formula, is the degree of defect prominence of the target image; is the similarity between the image patch within the th annotation box in the target image and the target image; is the recognition difficulty of the defect corresponding to the th annotation box in the target image; is the area of the image patch within the th annotation box in the target image; is the area of the target image; is the representation symbol of the function; is the number of annotation boxes in the target image.

6. The process monitoring method for the production of a plastic housing of a capacitive filter according to claim 5, characterized in that, The method for obtaining the similarity degree includes: Obtain the local binary pattern of each pixel point in the target image, and use the one-dimensional vector composed of the number of occurrences of each local binary pattern in the target image as the feature vector of the target image. Taking the image block within any annotation box in the target image as the target image block, obtain the feature vector of the target image block in the same way as the determination of the feature vector of the target image, and calculate the cosine similarity between the feature vector of the target image block and the feature vector of the target image to obtain the similarity degree between the target image block and the target image.

7. A process monitoring method for the production of a plastic housing of a capacitive filter according to claim 1, characterized in that, During the process of training the pre-constructed neural network model using the training set, it also includes: Using mini-batch stochastic gradient descent to divide the training set into several mini-batches, and using each mini-batch data as the sample set when updating the model parameters.

8. A process monitoring method for the production of a plastic housing of a capacitive filter according to claim 1, characterized in that, If there are defective images in the sample set when updating the model parameters for the current time, the adjusted learning rate satisfies the following relational expression: ; In the formula, is the learning rate when updating the model parameters using the sample set when there are defective images in the sample set for the current update of the model parameters; is the preset learning rate; is the average defect prominence of the defective images in the sample set; is the average information entropy of all the images in the sample set; is the preset hyperparameter.

9. A process monitoring method for the production of a plastic housing of a capacitive filter according to claim 1, characterized in that, If there are defective images in the sample set when updating the model parameters for the current time, the adjusted learning rate also satisfies the following relational expression: ; In the formula, is the learning rate when updating the model parameters using the sample set when there are defective images in the sample set for the current update of the model parameters; is the preset learning rate; is the average defect prominence degree of the defective images in the sample set; is the average information entropy of all the images in the sample set.

10. A process monitoring method for the production of a plastic housing for a capacitive filter according to claim 1, characterized in that, The pre-constructed neural network model is the YOLOV5 model.

Citation Information

Cited By

  • Method and system for detecting appearance quality of plastic shell based on image processing

    CN121353250A