A method and system for online detection of cable appearance particles
By combining image processing technology and temperature data analysis, the pre-trained model is used to detect cable appearance particles online, which solves the problems of low particle recognition rate and low detection efficiency in the existing methods, and achieves more efficient and accurate detection effects.
Patent Information
- Application Number
- CN202510231383.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The existing online detection method for cable appearance particles relies on machine vision technology, which has complex backgrounds and interference with the color and texture of the cable surface, resulting in low particle recognition rate and low detection efficiency.
An online detection method of cable appearance particles is adopted. By obtaining cable appearance images and temperature distribution data, image preprocessing and feature extraction are performed, and defect determination and temperature distribution verification are performed in combination with pre-trained defect classification model and temperature prediction model, and the temperature prediction model is dynamically updated.
It improves the detection efficiency of cable appearance particles, enhances the detection accuracy and reliability, supports continuous improvement of the model, and improves the system's adaptability.
Smart Images

Figure CN119722682B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cable detection, and in particular to an online detection method and system for cable appearance particles. Background Art
[0002] With the increasing demand for cables, particles often appear on the cable surface during the production process. The problem of cable surface particles not only affects its appearance quality, but also indicates potential problems in the production process. In particular, under different production temperature conditions, the physical properties of the raw materials will change, resulting in the formation of granular substances on the cable surface. For example, in a high temperature environment, some additives will melt and re-solidify into small particles; while in a low temperature environment, the material shrinks and causes internal impurities to be exposed to the surface. Therefore, it is particularly important to study an online detection method and system for cable appearance particles that can take temperature factors into account, which helps to monitor the production environment more accurately and adjust process parameters in time to reduce particle defects.
[0003] Existing online detection methods for cable appearance particles mainly rely on machine vision technology. First, high-resolution cameras are installed at key locations on the cable production line to ensure that the cable surface can be fully covered. Then, the images captured by the camera are transmitted to the computer system in real time through the image acquisition card. Next, the captured images are pre-processed using image processing algorithms, including denoising, edge detection and other operations to enhance image quality. After that, feature extraction algorithms are used to identify the existing particles and determine whether the size of these particles exceeds the allowable area range based on the set threshold. Finally, once unqualified cables are detected, the system automatically issues an alarm and marks the defective location for subsequent removal from the production line.
[0004] However, this machine vision-based method also has certain limitations. Complex background and cable surface color, texture and other factors can interfere with the accurate identification of particles. The threshold setting method leads to a low particle recognition rate, resulting in low efficiency in online inspection of cable appearance. Summary of the invention
[0005] The present invention provides an online detection method and system for cable appearance particles, so as to improve the detection efficiency of cable appearance particles.
[0006] In a first aspect, in order to solve the above technical problems, the present invention provides an online detection method for cable appearance particles, comprising:
[0007] Obtain cable appearance images and temperature distribution data;
[0008] Performing image preprocessing on the cable appearance image to obtain a particle contour image;
[0009] Extracting features from the particle contour image to obtain an appearance feature vector;
[0010] Inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution;
[0011] Defect determination is performed according to the defect probability distribution and a preset probability threshold, and defect type and location information is determined;
[0012] Inputting the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution;
[0013] When the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold, outputting the defect type and the location information;
[0014] When the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold, the temperature prediction model is updated according to the temperature distribution data.
[0015] In an optional implementation, performing image preprocessing on the cable appearance image to obtain a particle contour image includes:
[0016] Performing distortion correction according to the cable appearance image to obtain a corrected appearance image;
[0017] Performing noise reduction according to the corrected appearance image to obtain a noise-reduced appearance image;
[0018] Performing threshold segmentation according to the denoised appearance image to obtain a binary image;
[0019] Performing morphological optimization on the binary image to obtain an optimal binary image;
[0020] Contour extraction is performed based on the optimal binary image to obtain a particle contour image.
[0021] In an optional implementation, the extracting features of the particle contour image to obtain an appearance feature vector includes:
[0022] Performing grayscale extraction according to the particle contour image to obtain a grayscale co-occurrence matrix;
[0023] The particle circularity was calculated by the following formula:
[0024]
[0025] in, Indicates the particle circularity, represents pi, represents the particle perimeter, represents the particle area;
[0026] The neighbor density is calculated by the following formula:
[0027]
[0028] in, represents the neighbor density, represents the total number of particles, Indicates the particle number, express The distance from the particle to the nearest particle;
[0029] The contrast ratio is calculated using the following formula:
[0030]
[0031] in, Indicates contrast, represents the row number of the gray-level co-occurrence matrix, represents the column number of the gray-level co-occurrence matrix, Represents the gray-level co-occurrence matrix Line Elements of a column;
[0032] The particle circularity, the neighboring density and the contrast are standardized and then concatenated into an appearance feature vector.
[0033] In an optional implementation, the training process of the defect classification model includes:
[0034] A defect classification model is constructed based on the historical feature vectors, and the model is trained. The training is determined to be complete after the loss function of the detection model meets the conditions, and the trained defect classification model is obtained;
[0035] The appearance feature vector is input into the trained defect classification model to obtain the defect probability distribution.
[0036] In an optional implementation, the performing defect determination according to the defect probability distribution and a preset probability threshold to determine the defect type and location information includes:
[0037] Extracting the probability density of each defect type according to the probability distribution;
[0038] When the probability density is greater than a preset probability threshold, it is determined that a defect type corresponding to the probability density exists.
[0039] In an optional implementation, the training process of the temperature prediction model includes:
[0040] A temperature prediction model is constructed based on historical defect types and temperature anomaly data, and the model is trained. The training is determined to be complete after the loss function of the detection model meets the conditions, and the trained temperature prediction model is obtained;
[0041] The defect type is input into the trained temperature prediction model to obtain the predicted temperature distribution.
[0042] In an optional implementation, before inputting the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution, the method further includes:
[0043] Extracting according to the temperature distribution data and the location information to obtain regional temperature distribution;
[0044] Preprocessing the regional temperature distribution to obtain a corrected temperature distribution;
[0045] Perform temperature anomaly detection according to the corrected temperature distribution to obtain statistical features;
[0046] When the statistical feature is less than a preset temperature anomaly threshold, it is determined that there is no temperature anomaly;
[0047] When the statistical feature is greater than the temperature anomaly threshold, it is determined that a temperature anomaly exists;
[0048] When there is no temperature anomaly, the subsequent steps are not performed and the cable appearance image is acquired again;
[0049] When there is a temperature anomaly, proceed to the next step.
[0050] In a second aspect, the present invention provides an online detection system for cable appearance particles, comprising:
[0051] A data acquisition module, used to acquire cable appearance images and temperature distribution data;
[0052] An image processing module, used for performing image preprocessing on the cable appearance image to obtain a particle contour image;
[0053] A feature extraction module is used to extract features from the particle contour image to obtain an appearance feature vector;
[0054] A defect prediction module, used for inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution;
[0055] A defect determination module, used to determine defect type and location information based on the defect probability distribution and a preset probability threshold;
[0056] A temperature prediction module, used to input the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution;
[0057] A result output module, configured to output the defect type and the location information when the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold;
[0058] The model optimization module is used to update the temperature prediction model according to the temperature distribution data when the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold.
[0059] 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 online detection method of cable appearance particles described in any one of the above is implemented.
[0060] In a fourth aspect, the present invention further provides a computer-readable storage medium, the computer-readable storage medium comprising 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 methods for online detection of cable appearance particles.
[0061] Compared with the prior art, the present invention has the following beneficial effects: the present invention discloses an online detection method and system for cable appearance particles, the method comprising obtaining a cable appearance image and temperature distribution data; performing image preprocessing on the cable appearance image and performing feature extraction to obtain an appearance feature vector; inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution, and performing defect determination in combination with a preset probability threshold to determine the defect type and location information; performing temperature prediction according to the defect type to obtain a predicted temperature distribution; when the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold, outputting the defect type; when the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold, updating the temperature prediction model according to the temperature distribution data. The present method can improve the detection efficiency of cable appearance particles.
[0062] Specifically, in this method, inputting the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution is a core step. This step aims to verify the cable status by comparing the predicted results with the actual measured temperature distribution data, and make further decisions based on this. Specifically, when the temperature difference between the predicted temperature distribution and the measured temperature distribution data is less than the preset temperature difference threshold, this indicates that the current temperature prediction model is accurate and reliable in predicting the defect type. At this point, the system will output the defect type and its corresponding location information to provide accurate guidance for subsequent maintenance work.
[0063] However, if the temperature difference between the predicted temperature distribution and the measured temperature distribution data exceeds the preset temperature difference threshold, it means that the currently used temperature prediction model fails to fully capture the actual operating status of the cable or there are other factors that have not been considered. In this case, it is very necessary to update the temperature prediction model with the measured temperature distribution data. Doing so can not only improve the model's prediction accuracy for similar situations in the future, but also enhance the system's adaptive ability, making it more in line with the actual situation.
[0064] In this way, the online detection method of cable appearance particles can achieve timely response and processing of potential problems while ensuring detection accuracy. In addition, this method also supports the continuous improvement of the model to ensure its long-term effectiveness. Therefore, this dynamic adjustment strategy based on real-time data feedback greatly improves the reliability and efficiency of cable monitoring technology.
[0065] Furthermore, before inputting the defect type into the pre-trained temperature prediction model to obtain the predicted temperature distribution, an extraction operation is first performed based on the collected temperature distribution data and location information to obtain the temperature distribution of a specific area. This step helps to focus on the local area with problems and improve the accuracy of detection.
[0066] Then, a preset temperature anomaly threshold is set to determine whether the cable has temperature anomalies. When the statistical characteristic value is lower than the threshold, it indicates that the cable is working normally and there is no obvious temperature anomaly. No further measures are required at this time, and the system will restart the next round of cable appearance image acquisition. On the contrary, if the statistical characteristic value exceeds the threshold, it is determined that there is a temperature anomaly, and it is necessary to continue with the subsequent steps, such as inputting the defect type into the temperature prediction model, so as to analyze the root cause of the problem more deeply and take appropriate maintenance measures. This step improves the efficiency and response speed of fault detection.
[0067] Furthermore, this method adds a series of data processing and analysis steps before inputting the defect type into the pre-trained temperature prediction model, which significantly improves the accuracy and reliability of the system. First, the regional temperature distribution is extracted based on the temperature distribution data and location information. This step helps to focus on the specific area where the anomaly exists and reduce the interference of irrelevant data. Next, the regional temperature distribution is preprocessed to obtain the corrected temperature distribution. This process includes operations such as removing noise and compensating for environmental factors to ensure the accuracy of the temperature data.
[0068] Subsequently, temperature anomaly detection is performed based on the corrected temperature distribution, and statistical features are extracted from it. This step is critical because it can quantify the degree of temperature anomaly and provide a basis for subsequent judgment. If the statistical feature is less than the preset temperature anomaly threshold, the system determines that there is no temperature anomaly. At this time, no further operation will be triggered, but the cable appearance image will be re-acquired to continue monitoring. On the contrary, if the statistical feature is greater than the temperature anomaly threshold, it indicates that there is a temperature anomaly and it is necessary to initiate subsequent steps for more detailed analysis.
[0069] This method distinguishes between normal and abnormal states by setting clear thresholds, which not only improves the sensitivity and specificity of detection, but also effectively avoids false positives or negatives. In addition, only when the temperature anomaly is confirmed will the subsequent steps be continued. This strategy greatly optimizes the efficiency of resource utilization, reduces unnecessary computing load, and improves detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a schematic flow chart of an online detection method for cable appearance particles provided by the first embodiment of the present invention;
[0071] Figure 2 It is a schematic diagram of a structural system for online detection of cable appearance particles provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0073] With the increasing demand for cables, particles often appear on the cable surface during the production process. The problem of cable surface particles not only affects its appearance quality, but also indicates potential problems in the production process. In particular, under different production temperature conditions, the physical properties of the raw materials will change, resulting in the formation of granular substances on the cable surface. For example, in a high temperature environment, some additives will melt and re-solidify into small particles; while in a low temperature environment, the material shrinks and causes internal impurities to be exposed to the surface. Therefore, it is particularly important to study an online detection method and system for cable appearance particles that can take temperature factors into account, which helps to monitor the production environment more accurately and adjust process parameters in time to reduce particle defects.
[0074] Existing online detection methods for cable appearance particles mainly rely on machine vision technology. First, high-resolution cameras are installed at key locations on the cable production line to ensure that the cable surface can be fully covered. Then, the images captured by the camera are transmitted to the computer system in real time through the image acquisition card. Next, the captured images are pre-processed using image processing algorithms, including denoising, edge detection and other operations to improve image quality. After that, feature extraction algorithms are used to identify the existing particles and determine whether the size of these particles exceeds the allowable area range based on the set threshold. Finally, once unqualified cables are detected, the system automatically issues an alarm and marks the defective location for subsequent removal from the production line.
[0075] However, this machine vision-based method also has certain limitations. Complex background and cable surface color, texture and other factors can interfere with the accurate identification of particles. The threshold setting method leads to a low particle recognition rate, resulting in low efficiency in online inspection of cable appearance.
[0076] To solve the above problems, refer to Figure 1 The first embodiment of the present invention provides an online detection method for cable appearance particles, comprising the following steps:
[0077] S11, obtaining cable appearance images and temperature distribution data;
[0078] S12, performing image preprocessing on the cable appearance image to obtain a particle contour image;
[0079] S13, extracting features from the particle contour image to obtain an appearance feature vector;
[0080] S14, inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution;
[0081] S15, performing defect determination according to the defect probability distribution and a preset probability threshold, and determining the defect type and location information;
[0082] S16, inputting the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution;
[0083] S17, when the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold, outputting the defect type and the location information;
[0084] S18, when the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold, updating the temperature prediction model according to the temperature distribution data.
[0085] In step S11, the cable appearance image and temperature distribution data are obtained.
[0086] In one implementation, a high-resolution industrial camera is used to obtain an image of the cable appearance, and an infrared thermal imager is used to collect temperature distribution data on the cable surface.
[0087] It is worth noting that the storage format of the cable appearance image is JPEG, and the size is controlled within 8 million pixels to balance processing efficiency and processing accuracy. The temperature distribution data is represented in matrix form, where each element corresponds to a pixel in the image and records the temperature value of the point. This format facilitates subsequent data processing and analysis. The "size" of the temperature distribution data refers to the physical area it covers and the temperature resolution. For the physical area, it should at least cover the part of the cable surface captured by the camera; as for the temperature resolution, it depends on the accuracy of the sensor used, and it is required to reach several decimal places in Celsius (such as 0.01°C).
[0088] In step S12, the cable appearance image is preprocessed to obtain a particle contour image.
[0089] In one embodiment, distortion correction is performed on the cable appearance image to obtain a corrected appearance image; noise reduction is performed on the corrected appearance image to obtain a noise-reduced appearance image; threshold segmentation is performed on the noise-reduced appearance image to obtain a binary image; morphological optimization is performed on the binary image to obtain an optimal binary image; contour extraction is performed on the optimal binary image to obtain a particle contour image.
[0090] It is worth noting that the purpose of distortion correction is to eliminate image distortion caused by the lens or other factors and ensure that the shape of the object in the image is accurate. Based on the focal length, principal point coordinates and distortion coefficient of the camera, the Brown-Conrady model is used to correct the barrel or pincushion distortion in the image. The noise reduction operation is implemented based on the Gaussian filter. The purpose of threshold segmentation is to convert the grayscale image into a black and white image to highlight the particle area. The Otsu method is used to automatically select the optimal threshold to maximize the inter-class variance and realize the binary image. The purpose of morphological optimization is to improve the quality of binary images, such as filling small holes and removing isolated points. The dilation operation can expand the boundary of the foreground object, while the erosion operation is the opposite; the combination of the two can be used to remove noise or disconnected parts. For example, the morphological opening operation is to erode first and then dilate, which helps to separate the adhered objects; the closing operation is to dilate first and then erode, which is used to fill the small gaps inside the target. The contour extraction uses the Canny edge detector, which calculates the gradient amplitude and direction, and then applies non-maximum suppression and double threshold technology to determine the final edge position.
[0091] In step S13, feature extraction is performed on the particle contour image to obtain an appearance feature vector.
[0092] In one implementation, grayscale extraction is performed based on the particle contour image to obtain a grayscale co-occurrence matrix;
[0093] The particle circularity was calculated by the following formula:
[0094]
[0095] in, Indicates the particle circularity, represents pi, represents the particle perimeter, represents the particle area;
[0096] The neighbor density is calculated by the following formula:
[0097]
[0098] in, represents the neighbor density, represents the total number of particles, Indicates the particle number, express The distance from the particle to the nearest particle;
[0099] The contrast ratio is calculated using the following formula:
[0100]
[0101] in, Indicates contrast, represents the row number of the gray-level co-occurrence matrix, represents the column number of the gray-level co-occurrence matrix, Represents the gray-level co-occurrence matrix Line Elements of a column;
[0102] The particle circularity, the neighboring density and the contrast are standardized and then concatenated into an appearance feature vector.
[0103] It is worth noting that grayscale extraction is to extract grayscale information from the particle contour image to obtain a grayscale image; each pixel value in the grayscale image represents the brightness of that position. Gray-Level Co-occurrence Matrix (GLCM), also known as grayscale co-occurrence matrix, is a statistical method used to describe the spatial relationship between pixels in an image. GLCM captures the texture features of an image by calculating the frequency of occurrence of different grayscale value combinations at a specific distance and direction. First, define the relative position between two pixels, expressed as (dx, dy), where dx and dy represent the displacement on the x-axis and y-axis, respectively. Different (dx, dy) pairs can be used to describe texture features in different directions. Then, the number of grayscale levels is determined based on the grayscale depth of the image. For example, an 8-bit grayscale image has 256 grayscale levels (0 to 255). Each element of the grayscale co-occurrence matrix records the grayscale conversion frequency.
[0104] In one implementation, the normalization formula is as follows:
[0105]
[0106] in, represents the standardized eigenvalue, represents the original eigenvalue, represents the mean of the eigenvalues, represents the standard deviation of the eigenvalues.
[0107] In step S14, the appearance feature vector is input into a pre-trained defect classification model to obtain a defect probability distribution.
[0108] In one implementation, a defect classification model is constructed based on historical feature vectors, the model is trained, and the training is determined to be complete after the loss function of the detection model meets the conditions, thereby obtaining a trained defect classification model;
[0109] The appearance feature vector is input into the trained defect classification model to obtain the defect probability distribution.
[0110] In one implementation, the defect probability distribution refers to the probability value of each candidate defect type output after being processed by a trained defect classification model for a given cable appearance feature vector. In other words, it represents the probability of the input feature belonging to each known defect category. For example, if there are three predefined defect types (such as oversized particles, surface scratches, and uneven materials), the probability distribution of these three types of defects is output, such as [0.8, 0.1, 0.1], which means that the current feature vector corresponds to the first defect type (oversized particles) with a probability of 80%.
[0111] In one implementation, a defect classification model is trained based on a convolutional neural network. First, a large number of labeled data sets need to be prepared, which contain cable appearance images and their corresponding defect labels. A CNN architecture is designed, including several convolutional layers, pooling layers, and fully connected layers. Hyperparameters such as the number of layers and the number of filters per layer are adjusted according to specific applications. The historical feature vector (i.e., the extracted appearance feature vector) is used as input, and the network weights are optimized through the back propagation algorithm to minimize the loss function. The loss function selects the cross entropy loss to measure the difference between the predicted result and the true label.
[0112] In step S15, defect determination is performed based on the defect probability distribution and a preset probability threshold to determine the defect type and location information.
[0113] In one implementation, the probability density of each defect type is extracted according to the probability distribution;
[0114] When the probability density is greater than a preset probability threshold, it is determined that a defect type corresponding to the probability density exists.
[0115] It is worth noting that the probability distribution is a vector whose number of dimensions is determined by the number of preset defect types. For example, if there are three predefined defect types (such as particles that are too large, surface scratches, and uneven materials), the probability distribution of these three types of defects is output, such as [0.8, 0.1, 0.1]. This means that the current feature vector corresponds to the first defect type (particles that are too large), and its probability density is 80%. The value of each dimension of the probability distribution corresponds to the probability density of a defect type. When the probability density is greater than the preset probability threshold, it is determined that the defect type corresponding to the probability density exists. The probability threshold can be set to 40%, so that there will be at most two probability defects, and this method does not limit this.
[0116] It is worth noting that in the contour extraction process mentioned in step S12, a contour representing the shape of the particle or other defect will be obtained. For each contour, its minimum bounding box can be calculated, so that a rectangular area of the defect can be obtained, and the vertex coordinates of this area are part of the position information. The position is represented by a bounding box, and the position information is a set of four numbers (x_min, y_min, x_max, y_max), which represent the coordinates of the upper left corner and the lower right corner of the bounding box respectively. For example, [480, 280, 520, 320] represents a square area with a width of 40 pixels and a height of 40 pixels.
[0117] In step S16, the defect type is input into a pre-trained temperature prediction model to obtain a predicted temperature distribution.
[0118] In one implementation, a temperature prediction model is constructed based on historical defect types and temperature anomaly data, the model is trained, and the training is determined to be completed after the loss function of the detection model meets the conditions, thereby obtaining a trained temperature prediction model; the defect type is input into the trained temperature prediction model to obtain a predicted temperature distribution.
[0119] In one embodiment, the temperature prediction model is constructed based on a random forest model. First, a large number of cable samples containing different defect types and their corresponding temperature distribution data are collected, and the potential laws between specific defect types and temperature differences are discovered through statistical analysis of these data. Then, the temperature prediction model is constructed and trained using these data, which can not only effectively process high-dimensional data, but also improve the stability and accuracy of the model through integrated learning. Once the model training is completed and reaches the preset standard through loss function evaluation, it can be used in the actual detection process. When the detection system identifies a suspected defect, it automatically extracts the temperature information of the area and compares it with the surrounding normal area to calculate the temperature difference. Then, this temperature difference and the initially determined defect type are input into the trained temperature prediction model to obtain a more accurate predicted temperature distribution.
[0120] In step S17, when the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold, the defect type and the location information are output.
[0121] In one implementation, first, the predicted temperature distribution obtained by the pre-trained temperature prediction model is compared with the temperature distribution data obtained from the actual measurement, and the difference between the two (i.e., the temperature difference) is calculated. If the temperature difference is less than a set threshold, it means that the temperature distributions of the two are very close, and it is considered that the currently used temperature prediction model is accurate and reliable for the prediction of the defect type. In the present invention, the size of the temperature difference threshold is not limited. In this case, the system will output the identified defect type and its specific location information.
[0122] In step S18, when the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold, the temperature prediction model is updated according to the temperature distribution data.
[0123] In one embodiment, if the temperature difference between the predicted temperature distribution and the actually measured temperature distribution exceeds a preset threshold, it indicates that the temperature prediction model currently used fails to fully capture the actual operating status of the cable or there are other factors that have not been taken into account. This situation is caused by environmental changes, production process adjustments, or other unknown variables. In order to improve the performance of the model and make it more reflective of the actual situation, the temperature prediction model needs to be updated using the latest temperature distribution data. This involves fine-tuning the existing model to include the newly collected data points. Doing so will not only improve the model's prediction accuracy for similar situations in the future, but also enhance the system's adaptive capabilities to make it more in line with actual conditions.
[0124] In one embodiment, before the defect type is input into a pre-trained temperature prediction model to obtain a predicted temperature distribution, the method further includes: extracting according to the temperature distribution data and the location information to obtain a regional temperature distribution; preprocessing the regional temperature distribution to obtain a corrected temperature distribution; performing temperature anomaly detection according to the corrected temperature distribution to obtain a statistical feature; when the statistical feature is less than a preset temperature anomaly threshold, determining that there is no temperature anomaly; when the statistical feature is greater than the temperature anomaly threshold, determining that there is a temperature anomaly; when there is no temperature anomaly, not performing subsequent steps and reacquiring the cable appearance image; when there is a temperature anomaly, continuing with subsequent steps.
[0125] It is worth noting that statistical features include: mean, variance, maximum and minimum. Calculate the average temperature value of all pixels in a specific area. If the mean deviates significantly from the normal range, it indicates that there is an overall temperature shift. Variance measures the dispersion of temperature values in the area. A high variance or standard deviation means that there are local hot spots or cold spots in the area, indicating anomalies.
[0126] In summary, the present invention discloses an online detection method and system for cable appearance particles, which aims to improve the detection accuracy of cable surface particle defects by combining image processing technology and temperature data analysis. The method first involves obtaining cable appearance images and temperature distribution data. This process relies on high-resolution industrial cameras and infrared thermal imagers to ensure comprehensive coverage and accurate measurement of the cable surface state. Then, the obtained cable appearance image is subjected to a series of complex preprocessing steps, including distortion correction, noise reduction, threshold segmentation, morphological optimization and contour extraction, and finally a clear particle contour image is obtained. In the feature extraction stage, the grayscale co-occurrence matrix, particle circularity, adjacency density and contrast and other parameters are calculated, and these features are standardized and spliced into appearance feature vectors for subsequent analysis. Next, the probability distribution of each candidate defect type is calculated based on the input appearance feature vector using a pre-trained defect classification model, and then the presence of a specific type of defect and its specific location are determined according to the set probability threshold. In order to further verify the accuracy of the detection results, the identified defect type is also sent as input to another pre-trained temperature prediction model to generate a predicted temperature distribution. By comparing the difference (temperature difference) between the predicted temperature distribution and the actual measured temperature distribution, if the temperature difference is less than the preset threshold, the currently used temperature prediction model is considered to be reliable, and the corresponding defect type and location information is output; conversely, if the temperature difference exceeds the threshold, it indicates that the existing model fails to fully capture the actual operating status of the cable, and the temperature prediction model needs to be updated based on the latest temperature distribution data to enhance the adaptability and accuracy of the system.
[0127] In addition, the present invention also describes in detail how to construct and train the above two key models, the defect classification model and the temperature prediction model. For the defect classification model, it is mainly constructed based on historical feature vectors and implemented through a convolutional neural network (CNN). Through the learning of a large number of annotated data sets, the model can accurately identify various existing cable appearance defects. The temperature prediction model uses a random forest algorithm to establish the connection between the defect type and the temperature anomaly by statistically analyzing the cable samples containing different defect types and their corresponding temperature distribution data. It is worth noting that before the defect type is formally input into the temperature prediction model, it is necessary to extract the temperature distribution of a specific area from the original temperature distribution data, and perform necessary preprocessing operations on it, such as correcting the temperature distribution, detecting temperature anomalies, etc. Only when it is confirmed that there is a temperature anomaly will the subsequent steps be continued. In the whole process, not only the effective processing of image data is emphasized, but also the importance of temperature factors in the detection of cable appearance particles is highlighted. The scientificity and reliability of the overall detection process are improved by combining the two.
[0128] Reference Figure 2The second embodiment of the present invention provides an online detection system for cable appearance particles, comprising:
[0129] A data acquisition module, used to acquire cable appearance images and temperature distribution data;
[0130] An image processing module, used for performing image preprocessing on the cable appearance image to obtain a particle contour image;
[0131] A feature extraction module is used to extract features from the particle contour image to obtain an appearance feature vector;
[0132] A defect prediction module, used for inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution;
[0133] A defect determination module, used to determine defect type and location information based on the defect probability distribution and a preset probability threshold;
[0134] A temperature prediction module, used to input the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution;
[0135] A result output module, configured to output the defect type and the location information when the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold;
[0136] The model optimization module is used to update the temperature prediction model according to the temperature distribution data when the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold.
[0137] Preferably, the data acquisition module is used to:
[0138] Get cable appearance images and temperature distribution data.
[0139] Preferably, the image processing module is used to:
[0140] Performing image preprocessing on the cable appearance image to obtain a particle contour image includes:
[0141] Performing distortion correction according to the cable appearance image to obtain a corrected appearance image;
[0142] Performing noise reduction according to the corrected appearance image to obtain a noise-reduced appearance image;
[0143] Performing threshold segmentation according to the denoised appearance image to obtain a binary image;
[0144] Performing morphological optimization on the binary image to obtain an optimal binary image;
[0145] Contour extraction is performed based on the optimal binary image to obtain a particle contour image.
[0146] Preferably, the feature extraction module is used to:
[0147] Perform feature extraction on the particle contour image to obtain an appearance feature vector, including:
[0148] Performing grayscale extraction according to the particle contour image to obtain a grayscale co-occurrence matrix;
[0149] The particle circularity was calculated by the following formula:
[0150]
[0151] in, Indicates the particle circularity, represents pi, represents the particle perimeter, represents the particle area;
[0152] The neighbor density is calculated by the following formula:
[0153]
[0154] in, represents the neighbor density, represents the total number of particles, Indicates the particle number, express The distance from the particle to the nearest particle;
[0155] The contrast ratio is calculated using the following formula:
[0156]
[0157] in, Indicates contrast, represents the row number of the gray-level co-occurrence matrix, represents the column number of the gray-level co-occurrence matrix, Represents the gray-level co-occurrence matrix Line Elements of a column;
[0158] The particle circularity, the neighboring density and the contrast are standardized and then concatenated into an appearance feature vector.
[0159] Preferably, the defect prediction module is used to:
[0160] Inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution;
[0161] The training process of the defect classification model includes:
[0162] A defect classification model is constructed based on the historical feature vectors, and the model is trained. The training is determined to be complete after the loss function of the detection model meets the conditions, and the trained defect classification model is obtained;
[0163] The appearance feature vector is input into the trained defect classification model to obtain the defect probability distribution.
[0164] Preferably, the defect determination module is used to:
[0165] Defect determination is performed according to the defect probability distribution and a preset probability threshold to determine the defect type and location information, including:
[0166] Extracting the probability density of each defect type according to the probability distribution;
[0167] When the probability density is greater than a preset probability threshold, it is determined that a defect type corresponding to the probability density exists.
[0168] Preferably, the temperature prediction module is used to:
[0169] Inputting the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution;
[0170] The training process of the temperature prediction model includes:
[0171] A temperature prediction model is constructed based on historical defect types and temperature anomaly data, and the model is trained. The training is determined to be complete after the loss function of the detection model meets the conditions, and the trained temperature prediction model is obtained;
[0172] The defect type is input into the trained temperature prediction model to obtain the predicted temperature distribution.
[0173] Preferably, the result output module is used to:
[0174] When the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold, the defect type and the location information are output.
[0175] Preferably, the model optimization module is used to:
[0176] When the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold, the temperature prediction model is updated according to the temperature distribution data.
[0177] It should be noted that the online detection system for cable appearance particles provided in an embodiment of the present invention is used to execute all process steps of the online detection method for cable appearance particles 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.
[0178] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a data acquisition program. When the processor executes the computer program, the steps in the above-mentioned online detection method for cable appearance particles 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 data acquisition module.
[0179] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0180] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0181] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0182] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0183] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0184] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0185] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. An online detection method for cable appearance particles, characterized in that: include: Obtain cable appearance images and temperature distribution data; Performing image preprocessing on the cable appearance image to obtain a particle contour image; Extracting features from the particle contour image to obtain an appearance feature vector; Inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution; Defect determination is performed according to the defect probability distribution and a preset probability threshold, and defect type and location information is determined; Inputting the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution; Wherein, before inputting the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution, the method further includes: Extracting according to the temperature distribution data and the location information to obtain regional temperature distribution; Preprocessing the regional temperature distribution to obtain a corrected temperature distribution; Perform temperature anomaly detection according to the corrected temperature distribution to obtain statistical features; When the statistical feature is less than a preset temperature anomaly threshold, it is determined that there is no temperature anomaly; When the statistical feature is greater than the temperature anomaly threshold, it is determined that a temperature anomaly exists; When there is no temperature anomaly, the subsequent steps are not performed and the cable appearance image is acquired again; When there is a temperature anomaly, proceed to the subsequent steps; When the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold, outputting the defect type and the location information; When the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold, the temperature prediction model is updated according to the temperature distribution data.
2. The online detection method of cable appearance particles according to claim 1, characterized in that: The performing image preprocessing on the cable appearance image to obtain a particle contour image includes: Performing distortion correction according to the cable appearance image to obtain a corrected appearance image; Performing noise reduction according to the corrected appearance image to obtain a noise-reduced appearance image; Performing threshold segmentation according to the denoised appearance image to obtain a binary image; Performing morphological optimization on the binary image to obtain an optimal binary image; Contour extraction is performed based on the optimal binary image to obtain a particle contour image.
3. The online detection method of cable appearance particles according to claim 1 is characterized in that: The step of extracting features from the particle contour image to obtain an appearance feature vector includes: Performing grayscale extraction according to the particle contour image to obtain a grayscale co-occurrence matrix; The particle circularity was calculated by the following formula: in, Indicates the particle circularity, represents pi, represents the particle perimeter, represents the particle area; The neighbor density is calculated by the following formula: in, represents the neighbor density, represents the total number of particles, Indicates the particle number, express The distance from the particle to the nearest particle; The contrast ratio is calculated using the following formula: in, Indicates contrast, represents the row number of the gray-level co-occurrence matrix, represents the column number of the gray-level co-occurrence matrix, Represents the gray-level co-occurrence matrix Line Elements of a column; The particle circularity, the neighboring density and the contrast are standardized and then concatenated into an appearance feature vector.
4. The online detection method of cable appearance particles according to claim 1 is characterized in that: The training process of the defect classification model includes: A defect classification model is constructed based on the historical feature vectors, and the model is trained. The training is determined to be complete after the loss function of the detection model meets the conditions, and the trained defect classification model is obtained; The appearance feature vector is input into the trained defect classification model to obtain the defect probability distribution.
5. The online detection method of cable appearance particles according to claim 1, characterized in that: Determining the defect type and location information according to the defect probability distribution and a preset probability threshold includes: Extracting the probability density of each defect type according to the probability distribution; When the probability density is greater than a preset probability threshold, it is determined that a defect type corresponding to the probability density exists.
6. The online detection method of cable appearance particles according to claim 1, characterized in that: The training process of the temperature prediction model includes: A temperature prediction model is constructed based on historical defect types and temperature anomaly data, and the model is trained. The training is determined to be complete after the loss function of the detection model meets the conditions, and the trained temperature prediction model is obtained; The defect type is input into the trained temperature prediction model to obtain the predicted temperature distribution.
7. An online detection system for cable appearance particles, characterized in that: The method for online detection of cable appearance particles according to any one of claims 1 to 6 comprises: A data acquisition module, used to acquire cable appearance images and temperature distribution data; An image processing module, used for performing image preprocessing on the cable appearance image to obtain a particle contour image; A feature extraction module is used to extract features from the particle contour image to obtain an appearance feature vector; A defect prediction module, used for inputting the appearance feature vector into a pre-trained defect classification model to obtain a defect probability distribution; A defect determination module, used to determine defect type and location information based on the defect probability distribution and a preset probability threshold; A temperature prediction module, used to input the defect type into a pre-trained temperature prediction model to obtain a predicted temperature distribution; A result output module, configured to output the defect type and the location information when the temperature difference between the predicted temperature distribution and the temperature distribution data is less than a preset temperature difference threshold; The model optimization module is used to update the temperature prediction model according to the temperature distribution data when the temperature difference between the predicted temperature distribution and the temperature distribution data is greater than a preset temperature difference threshold.
8. 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 online detection method of cable appearance particles as claimed in any one of claims 1 to 6 is implemented.
9. 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 online detection method for cable appearance particles according to any one of claims 1 to 6.
Citation Information
Patent Citations
LTCC conductor surface coating quality visual detection method
CN117274247A
Defect identification method and system for power transmission line insulator, electronic equipment and storage medium
CN117635596A