Cable surface defect automatic detection method and system based on convolutional neural network

By constructing an adaptive texture benchmark library and a temporal discrimination network, combined with a cable speed encoder and a fine defect segmentation network, the problems of cross-batch adaptability and high false alarm rate in cable surface defect detection are solved, achieving efficient and low-cost online adaptive detection.

CN121616558APending Publication Date: 2026-03-06GUANGDONG HUAZHENG ELECTRONIC TECHNOLOGY CO LTD

Patent Information

Application Number
CN202511825779.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing deep learning-based cable surface defect detection solutions suffer from poor cross-batch adaptability, difficulty in distinguishing between real defects and transient pseudo-anomalies, and a lack of online adaptive and controllable update mechanisms, resulting in high false alarm rates and high deployment and update costs.

Method used

By constructing an adaptive normal texture benchmark library, utilizing texture feature encoding networks and temporal discrimination networks, and combining cable speed encoders and fine defect segmentation convolutional neural networks, we can achieve joint analysis of online texture deviation and process parameter deviation, perform defect judgment, and perform incremental updates through human-computer interaction.

Benefits of technology

It improves the accuracy of cross-batch detection, reduces the false alarm rate, enhances the system's adaptability and long-term stability, and reduces training and update costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121616558A_ABST
    Figure CN121616558A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic cable surface defect detection method and system based on a convolutional neural network, and belongs to the technical field of computer vision and deep learning, and the method comprises the following steps: collecting an initial qualified segment image during the production of a new batch of cables, and extracting a library texture feature vector through a pre-trained texture feature coding network, unsupervised clustering is carried out, and cluster centers left after the abnormal clusters are removed and statistics of the cluster centers are stored in a normal texture self-adaptive reference library of the batch; collecting a cable surface expansion image on line, dividing the image into image blocks, inputting the image blocks into the texture feature coding network to obtain a detection texture feature vector, obtaining a texture deviation degree according to the detection texture feature vector and each cluster center in the normal texture adaptive reference library, and judging whether the texture deviation degree is a texture abnormal point or not; and carrying out connected domain analysis on texture abnormal points of the same-frame expanded image to obtain candidate abnormal regions. The problem that real defects and instantaneous noise are difficult to distinguish in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and deep learning technology, and in particular to an automatic detection method and system for cable surface defects based on convolutional neural networks. Background Technology

[0002] As a crucial carrier of electrical energy or signal transmission, cables are susceptible to surface defects (such as twisted patterns, dents, scratches, pinholes, and sheath bubbles). These defects directly impact the insulation performance and mechanical strength of cables, and in severe cases, can even lead to electrical faults and safety accidents. Therefore, efficient and reliable surface defect detection during cable production is of paramount importance.

[0003] Traditional cable surface defect detection relies heavily on manual visual inspection, which suffers from low detection efficiency, high labor intensity, strong subjectivity of detection results, and easy omissions and false detections, making it difficult to meet the needs of modern high-speed and mass production.

[0004] With the development of computer vision and deep learning technologies, solutions have gradually emerged that use industrial cameras to acquire images and combine them with convolutional neural network models to identify and locate defects on cable surfaces. Some existing technologies, by deploying multi-camera arrays and designing semantic segmentation models, can replace manual inspection to a certain extent, improving inspection accuracy and automation. Other technical solutions improve inspection speed and robustness by using multi-sensor and multi-modal feature fusion, or by optimizing network structure and quantization acceleration.

[0005] For example, Chinese invention patent CN115980068A discloses a deep learning-based cable surface defect detection system. This system uses three cameras in conjunction with a semi-circular light source to acquire images of the cable surface. It employs a semantic segmentation network with pyramid pooling and attention fusion modules to achieve pixel-level segmentation and localization of cable surface defects, and displays the defect type, area, and location on an interface for online automatic detection and alarm.

[0006] For example, Chinese invention patent CN120411030A discloses a method for detecting surface defects in cables. This method constructs a multi-sensor detection system consisting of a linear array camera, an infrared thermal imager, a laser vibrometer, and a microwave sensor. It achieves multi-modal data fusion through time synchronization and spatial calibration, and combines an improved EfficientNet-Lite3 and a multi-scale YOLOv8-Nano detection head to perform real-time detection and three-level early warning of surface defects in cables, thereby improving the defect detection rate and real-time performance under complex working conditions.

[0007] For example, Chinese invention patent CN113160184A discloses a deep learning-based method for intelligent cable surface defect detection using drones. This method utilizes drones to collect cable images and construct a defect image database. It employs an improved YOLOv3 model to perform target detection and classification of cable surface defects, enabling long-distance, non-contact inspection in power grid scenarios. This method improves the automation and accuracy of cable defect identification using drones.

[0008] However, existing deep learning-based cable surface defect detection solutions still have the following prominent problems in practical applications:

[0009] Poor cross-batch adaptability: There are significant differences in the sheath material, color, surface texture, and printing style of cables between different production batches. Existing methods usually rely on fixed models and training datasets built offline. When production batches are changed or process conditions change, the model recognition performance often drops significantly, requiring the collection of a large number of samples and retraining, resulting in high deployment costs and long update cycles.

[0010] It is difficult to distinguish between genuine defects and transient false anomalies. The production line is subject to interference from factors such as lighting fluctuations, water mist, oil stains, and dust particles, which can easily create local texture anomalies or bright and dark spots in a single frame or a few frames of images. Traditional depth models based on single frames or local windows cannot fully utilize the temporal continuity of the cable along its length, often misjudging transient interference as defects, resulting in a high false alarm rate.

[0011] Lacking online adaptive and controllable update mechanisms, most existing solutions adopt the approach of "training a fixed model and using it for a long time," lacking the ability to learn from new defect types or new working conditions that arise in the field. Although some systems support manual annotation and model retraining, this usually requires downtime, data export, and offline training, resulting in high update costs and an opaque process, which is not conducive to long-term maintenance and optimization. Summary of the Invention

[0012] To address the problem of distinguishing between real defects and transient noise in existing technologies, this invention provides an automatic detection method and system for cable surface defects based on convolutional neural networks. The technical solution is as follows:

[0013] During the production of a new batch of cables, images of initial qualified sections are collected. Texture feature vectors from a pre-trained texture feature encoding network are extracted, and unsupervised clustering is performed. The cluster centers and their statistics after removing abnormal clusters are stored in the normal texture adaptive benchmark library for that batch. Online acquisition of the cable surface unfolded image is performed, divided into image blocks, and input into the texture feature encoding network to obtain detection texture feature vectors. Texture deviation is obtained based on the detected texture feature vectors and the cluster centers in the normal texture adaptive benchmark library, and it is determined whether a point is a texture anomaly. Connectivity analysis is performed on texture anomaly points in the same frame of unfolded image to obtain candidate anomaly regions. Using a cable speed encoder, the candidate anomaly regions are mapped onto the cable length coordinate axis, dividing the cable length into multiple length units. The proportion of texture anomaly points and the average texture deviation within each length unit are statistically analyzed, forming a length sequence arranged in order of length. The temporal feature sequence is input into a pre-trained temporal discriminant network to obtain the probability that each length unit belongs to a defect segment. Based on the defect probabilities of multiple consecutive length units, it is determined whether it is a real defect candidate segment. For each real defect candidate segment, the region of interest containing the defect candidate segment is extracted from the unfolded image and input into a fine defect segmentation convolutional neural network to obtain a pixel-level defect segmentation mask. The geometric and texture features of each connected defect region are extracted and combined with the high-level features of the encoding end of the fine defect segmentation convolutional neural network. The above features are input into the defect classification sub-network to obtain the probability of each defect category and the corresponding defect classification confidence. For each defect region, the comprehensive confidence is obtained by combining the texture deviation, the defect probability of the length unit, and the defect classification confidence. When the comprehensive confidence is higher than the preset defect judgment threshold, the region is judged as a defect and the detection result is output.

[0014] The specific analysis process of texture deviation is as follows: the similarity between the detected texture feature vector corresponding to each image block and the cluster centers in the normal texture adaptive benchmark library is calculated to obtain the similarity set of each detected texture feature vector relative to each cluster center; the largest one is taken and converted into texture deviation through a preset linear transformation function.

[0015] In this process, the texture deviation can be replaced by the joint deviation index. While acquiring the surface image of the initial qualified cable segment and extracting the library texture feature vector, one or more process parameters corresponding to the initial qualified segment, such as cable running speed, traction tension, extruder die temperature, and sheath wire diameter, are simultaneously collected and combined into a process parameter vector. The library texture feature vector of each image block is concatenated with its corresponding process parameter vector to form a library joint feature vector. Unsupervised clustering analysis is then performed based on this library joint feature vector to construct a texture-process joint normal pattern map and corresponding process parameter statistics. Finally, the detected texture feature vector of the current image block is concatenated with the current process parameter vector to form a detection joint feature vector, yielding the texture deviation and process parameter deviation of the current image block, respectively. The deviation degree is calculated, and the joint deviation index is calculated according to a preset joint deviation function. The specific calculation process of the process parameter deviation degree includes: collecting the process parameter vector within the initial qualified segment; calculating the normal mean and standard deviation for each dimension of the cable process parameter; standardizing the process parameter in each dimension of the detection process parameter vector by subtracting its normal mean and dividing by the standard deviation; calculating the distance between the standardized process parameter vector and the zero vector (a vector with all dimensional components equal to 0), indicating that the standardized process parameter is in a normal center state; converting the distance into the process parameter deviation degree using a preset monotonically increasing transformation function. When the joint deviation index exceeds a preset joint deviation threshold, the corresponding image block is marked as a texture anomaly point; when calculating the overall confidence level, the joint deviation index replaces the texture deviation degree as the input indicator characterizing the degree of texture-process joint anomaly.

[0016] The specific process of connected component analysis is as follows: Pixels marked as texture anomalies in the same frame of the unfolded image are divided into connected components according to their spatial adjacency. Using four-neighbor or eight-neighbor connection rules, interconnected anomaly pixels are aggregated into a candidate anomaly region. For each candidate anomaly region, the number of anomaly pixels contained within the region is counted. The number of anomaly pixels is used to characterize the area of ​​the candidate anomaly region. The maximum span of the candidate anomaly region along the length of the unfolded image is calculated. The maximum span is used to characterize the extension length of the candidate anomaly region along the cable length direction. When the area of ​​the candidate anomaly region is less than a preset noise area removal threshold, and / or the extension length is less than a preset noise length removal threshold, the candidate anomaly region is determined to be an isolated noise region caused by transient interference and is removed. Only candidate anomaly regions with an area not less than the noise area removal threshold and an extension length not less than the noise length removal threshold are retained as candidate anomaly regions for subsequent processing.

[0017] The fine-grained defect segmentation convolutional neural network is a semantic segmentation network with an encoder-decoder structure. Its encoding end includes multiple convolutional layers and downsampling layers to extract multi-scale features. The decoding end recovers spatial resolution step-by-step through upsampling and skip connections, outputting a pixel-level defect segmentation mask with the same size as the region of interest. The value of each pixel in the pixel-level defect segmentation mask represents the probability that the pixel belongs to the background or to each defect category. Geometric features, texture features, and high-level features are concatenated and input into a defect classification sub-network. The maximum value among the probabilities of each defect category output by the defect classification sub-network is defined as the defect classification confidence. Geometric features include one or more of the following: the area of ​​the defect region, the length and width of the bounding rectangle, the projected length along the cable length direction, and the shape factor. Texture features are obtained by pooling the corresponding positions of the defect region on the high-level feature map at the encoding end of the fine-grained defect segmentation convolutional neural network.

[0018] The specific classification process of the comprehensive confidence level is as follows: the texture deviation, the defect probability of the length unit, and the defect classification confidence level are used to construct an interpretation vector. According to the preset weighted or non-linear combination rules, the interpretation vector is mapped to the comprehensive confidence level. Based on two preset thresholds: the defect judgment threshold and the normal judgment threshold, the comprehensive confidence level interval is divided into an automatic pass interval, an automatic alarm interval, and a manual confirmation interval. When the comprehensive confidence level is greater than or equal to the defect judgment threshold, the corresponding defect area is judged as a defect and the detection result is automatically output. When the comprehensive confidence level is less than or equal to the normal judgment threshold, the corresponding defect area is judged as normal and automatically passes. When the comprehensive confidence level is greater than the normal judgment threshold but less than the defect judgment threshold, the corresponding defect area is judged as a disputed sample and added to the sample pool for manual confirmation.

[0019] The incremental update process based on human-computer interaction involves outputting the region of interest image and / or pixel-level defect segmentation mask corresponding to the defect candidate region in the sample pool to be manually confirmed on the human-computer interaction terminal. Only if the sample to be confirmed is confirmed as normal is the sample used to incrementally update the normal texture adaptive benchmark library; otherwise, the sample is added to the observation buffer without triggering a benchmark library update. When a sample is marked as a defect, the defect category can be further selected. For samples marked as normal, their detected texture feature vectors are incrementally updated to the normal texture cluster with the highest similarity to them, thereby updating the cluster centers and statistics of the normal texture adaptive benchmark library. For samples marked as defects, they are added to the defect sample library for subsequent retraining or fine-tuning of the fine defect segmentation convolutional neural network and / or defect classification sub-network. Based on the statistical changes of samples in the defect sample library, the high and / or low thresholds of the comprehensive confidence level in step S5 are adjusted to improve the overall detection system's adaptability and stability during long-term operation.

[0020] Applications include systems using automatic detection methods for cable surface defects based on convolutional neural networks:

[0021] Among them, the benchmark library construction module is used to collect initial qualified segment images when producing a new batch of cables, extract library texture feature vectors through a pre-trained texture feature encoding network, and perform unsupervised clustering. The remaining cluster centers and their statistics after removing abnormal clusters are stored in the normal texture adaptive benchmark library of this batch.

[0022] The texture anomaly detection and candidate region generation module is used to acquire the unfolded image of the cable surface online, divide it into image blocks, input it into the texture feature encoding network to obtain the detected texture feature vector, obtain the texture deviation degree based on the detected texture feature vector and the cluster centers in the normal texture adaptive benchmark library, determine whether it is a texture anomaly point, and perform connected component analysis on the texture anomaly points of the unfolded image in the same frame to obtain candidate anomaly regions.

[0023] The length mapping and temporal feature construction module is used to map candidate abnormal regions onto the cable length coordinate axis using a cable speed encoder, divide the cable length into multiple length units, and count the proportion of texture abnormal points and the average texture deviation in each length unit to form a length temporal feature sequence arranged in length order. This sequence is then input into a pre-trained temporal discrimination network to obtain the probability that each length unit belongs to a defect segment. Based on the defect probabilities of multiple consecutive length units, it is determined whether the segment is a real defect candidate segment.

[0024] The temporal discrimination and real defect candidate segment determination module is used to identify each segment as a real defect candidate segment in the length mapping and temporal feature construction module. It extracts the region of interest containing the defect candidate segment from the unfolded image and inputs it into the fine defect segmentation convolutional neural network to obtain a pixel-level defect segmentation mask. It extracts the geometric and texture features of each connected defect region and combines them with the high-level features of the encoding end of the fine defect segmentation convolutional neural network. The above features are then input into the defect classification sub-network to obtain the probability of each defect category and the corresponding defect classification confidence.

[0025] The defect segmentation, classification, and result output module is used to obtain a comprehensive confidence score for each defect region by combining the texture deviation, the defect probability of the length unit, and the defect classification confidence score. When the comprehensive confidence score is higher than the preset defect judgment threshold, the region is judged as a defect and the detection result is output.

[0026] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0027] 1. By constructing an adaptive normal texture benchmark library during new batch production of cables, compared to traditional solutions that simply use offline-built fixed models and training datasets, this invention can more accurately identify significant differences in cable sheath materials, colors, surface textures, and printing styles between different production batches. It automatically updates the reference range for normal appearances, eliminating the need for large-scale re-annotation and model retraining with each batch change, thus saving training costs and improving the practicality of cross-batch cable models. For example, existing models are trained on batches of cables with matte black sheaths and dot-matrix printing. When the production line switches to a new batch with light gray sheaths, bold printing, and a more glossy sheath, the fixed model often misclassifies many normal areas as defects, or is forced to raise the threshold to reduce false alarms, resulting in missed detections of minor scratches and bubble-like defects. When using the solution of this invention, it is only necessary to automatically build the library using the initial qualified segment of about 30 to 50m after the new batch is turned on. The sheath color, texture and printing style of the new batch will be absorbed as the normal mode of the batch, so as to achieve the effect of maintaining a low false alarm rate and a high detection rate without large-scale re-annotation and retraining of the model.

[0028] 2. By using a cable speed encoder to bind image information with real length coordinates, texture anomalies in each frame are mapped to length unit features arranged along the cable length direction. A temporal discriminant network performs continuity analysis on the length unit sequence, identifying a segment as a real defect candidate only when the defect probability in multiple adjacent length intervals continuously exceeds a threshold. Compared to existing technologies that determine defects based solely on a single frame or a densely populated area of ​​anomalies, this invention can distinguish real defects from transient noise, significantly reducing the probability of misjudging defects. For example, a scratch defect on the same production line may be continuous for approximately 0.3m along the length direction, while occasional water mist may only affect an image area of ​​approximately 10mm in a particular frame. Traditional methods that rely solely on the density of anomalies in a single frame will simultaneously issue a "suspicious defect" warning for both situations. This invention, by introducing length units and temporal discrimination, outputs a consistently high defect probability for the length unit sequence where the scratch is located, identifying it as a real defect segment. Meanwhile, it outputs a low and discontinuous defect probability for water mist interference that only appears within a single length unit, thus avoiding triggering a defect alarm. This significantly reduces the false alarm rate caused by instantaneous pseudo-anomalies without sacrificing the detection rate.

[0029] 3. By calculating the comprehensive confidence score and explanatory vector composed of texture deviation or joint deviation index, temporal defect probability, and classification confidence score, samples with comprehensive confidence scores in the middle range and significant discrepancies among the indicators are aggregated into "controversial samples" awaiting manual confirmation. These samples are quickly labeled through a human-computer interaction terminal. Samples confirmed as normal are used to incrementally update the normal texture benchmark library, while samples confirmed as defects are used to expand the defect sample library and adjust thresholds. Compared with existing technologies that rely solely on the confidence score output by a single model or randomly select a small number of samples for verification based on human experience, this invention can prioritize the allocation of limited human-computer verification resources to the most uncertain samples that are most prone to false positives or false negatives, thereby maximizing the labeling value and improving the overall adaptive capability and long-term stability of the detection system, all at the same manual labeling cost. For example, in a batch of inspections, the combined confidence scores of two candidate defect regions are both approximately 0.6. If only a single confidence threshold is used, both would simply be categorized as "awaiting review" or directly approved. However, this invention further differentiates them using explanatory vectors: Sample A exhibits high texture deviation and temporal defect probability, but low classification confidence, indicating it resembles a defect in appearance and length continuity, but its category determination is unstable, making it more likely a new defect pattern or boundary sample. Sample B, on the other hand, shows low texture deviation, discontinuous temporal defect probability, and high classification confidence, making it more likely an overreaction of the model under local noise. Based on this, the system prioritizes sample A for operator annotation and updates the benchmark library or threshold settings according to the annotation results. Sample B, however, can have its priority reduced or be observed in subsequent batches. This allows for a more targeted improvement in the model's ability to identify key boundary samples and novel defects without increasing manual workload.

[0030] 4. By calculating the comprehensive deviation amount from the texture deviation and the process deviation, compared to existing technologies that rely solely on image texture features or set fixed alarm thresholds for process parameters, this invention combines the cable surface appearance with process conditions such as extrusion temperature, traction tension, and wire diameter at the anomaly determination level. When only the process is slightly adjusted within the allowable range and the corresponding image texture changes slightly (e.g., texture deviation is approximately 0.4 while process deviation is only 0.05), the comprehensive deviation amount remains at a low level and does not trigger a defect alarm, thus avoiding misjudging normal process adjustments as surface defects. However, when a section of cable simultaneously exhibits pitting on the sheath surface, a significant increase in roughness, and corresponding extrusion temperature and traction tension deviating from the normal process range (e.g., texture deviation is approximately 0.4 and process deviation is approximately 0.3), the comprehensive deviation amount is amplified and significantly exceeds the alarm threshold. The system can prioritize identifying such high-risk situations with both appearance and process anomalies, achieving higher sensitivity in identifying real dangerous defects. This reduces false alarms caused by process fluctuations while improving risk identification capabilities under complex operations. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 Flowchart of an automatic cable surface defect detection method based on convolutional neural networks provided in this application embodiment;

[0033] Figure 2 A schematic diagram of the structure of an automatic cable surface defect detection system based on a convolutional neural network provided in an embodiment of this application;

[0034] Figure 3 This is a schematic diagram of the structure of the texture feature encoding network provided in an embodiment of this application.

[0035] Figure 4 A schematic diagram of the structure of a timing discrimination network is provided for the embodiments of this application.

[0036] Figure 5 This is a schematic diagram of the structure of the fine defect segmentation network provided in an embodiment of this application.

[0037] Figure 6 This is a schematic diagram of the defect classification subnetwork provided in an embodiment of this application. Detailed Implementation

[0038] Embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of the present disclosure are shown in the drawings, it should be understood that embodiments of the present disclosure may be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure.

[0039] It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure. In the description of the embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "this embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects.

[0040] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0041] like Figure 1 The diagram shown is a flowchart of an automatic cable surface defect detection method based on a convolutional neural network provided in this application embodiment. The method includes the following steps:

[0042] Embodiment 1 of the present invention: This embodiment provides an automatic detection method for cable surface defects based on convolutional neural networks. The processing flow of this method may include the following steps:

[0043] S1: When a new batch of cables begins production, after the production line is running stably, an initial qualified section of a preset length (e.g., 30m to 50m) is selected from the batch of cables. This section is manually inspected to ensure that the surface is free of defects and conforms to normal texture standards. A camera captures unfolded images of the cable surface within this length range. These unfolded images are obtained by photographing the cable surface as a planar image to obtain a complete surface view. The unfolded images are divided into multiple image blocks of fixed dimensions. Consistency screening is then performed, discarding image blocks whose similarity to normal texture is below a preset threshold (e.g., 95th percentile), retaining only data that conforms to normal texture characteristics. The qualified sections selected in this way are highly consistent and representative, and can serve as the basis for an adaptive benchmark library of normal textures.

[0044] Each image patch is input into a pre-trained texture feature encoding network, such as Figure 3 The diagram shows a schematic of the texture feature encoding network provided in this application embodiment, specifically a residual block structure for texture feature encoding used in cable surface defect detection. Its working principle and input-output relationship are as follows: The cable surface image block, as input, is first fed into a first 3×3 convolutional layer. After preliminary extraction of local texture details, the feature distribution is stabilized by a first batch normalization layer, and then a nonlinear transformation is completed through a ReLU activation layer. Subsequently, the features enter a second 3×3 convolutional layer to further extract abstract texture features. After being normalized again by a second batch normalization layer, the signal is superimposed with the original input image block signal through a residual connection to avoid gradient vanishing and retain effective features. The superposition result is then activated by the last ReLU layer, outputting a fixed-dimensional texture feature vector ("output: texture feature vector"). This vector will serve as the basis for subsequent normal texture library clustering and online similarity calculation, used to distinguish between normal and defective textures on the cable surface.

[0045] In a specific embodiment, taking a single-channel grayscale image with an input image patch size of 64×64 pixels as an example, the network includes several convolutional layers, non-linear activation layers, and downsampling layers, connected sequentially from top to bottom. Each convolutional layer uses a 3×3 convolutional kernel with a stride of 1, and is followed by a ReLU activation function. Some convolutional layers are followed by cascaded 2×2 max-pooling layers to reduce the feature map size. After multiple convolutional and pooling operations, a global average pooling layer is set at the end of the encoder to compress the multi-channel feature map into a fixed-length one-dimensional vector. Then, through one or more fully connected layers, the dimension is mapped to d dimensions to obtain the texture feature vector. Where i is the sample number and d represents the dimension of the vector. Let be the value of the d-th dimension in the i-th sample. The number of image blocks in the initial qualified segment; in this embodiment of the invention, d can be any suitable positive integer such as 32, 64, 128, etc. Those skilled in the art can select it according to hardware resources and detection accuracy requirements, without constituting a limitation on the scope of protection of the present invention.

[0046] For all library texture feature vectors Using an unsupervised clustering algorithm (such as K-means), we obtain K cluster centers: Where k represents the cluster number, j represents the dimension number, and K represents the number of cluster centers obtained using an unsupervised clustering algorithm (such as K-means). This represents the number of samples in the k-th cluster. This represents the value of the i-th sample in the j-th feature dimension. Let be the value of the k-th cluster center in the j-th dimension. Simultaneously, statistical measures such as the number of samples, mean, and variance within each cluster are calculated. Clusters are filtered based on the number of samples within each cluster and the deviation of the cluster center from the overall sample distribution (the distance between the cluster center and the mean of all samples). If the number of samples in a cluster is less than a preset minimum sample size threshold... Furthermore, the distance between the cluster center and the mean of all samples is greater than a preset cluster center deviation threshold. If the cluster is deemed abnormal, it will be removed. The centers of the remaining clusters and their statistics will be stored in the normal texture adaptive benchmark library for this batch, serving as a normal reference for subsequent online detection.

[0047] S2: In the online detection phase, the system divides the real-time acquired image of the cable surface into image blocks of the same size, and inputs each image block into the same texture feature encoding network to obtain the detection texture feature vector. , This represents the value of the detected texture feature vector in the d-th dimension. With each cluster center in the benchmark library Calculate the similarity. Taking cosine similarity as an example, it can be expressed as: ; j=1,2,…,d, This is represented by the value of the detected texture feature vector in the j-th dimension. For the value of the k-th cluster center in the j-th dimension, we obtain the similarity set. ,in: ; This represents the value with the highest cosine similarity. The texture deviation of this image patch is defined as: Preferably, ,when Greater than the preset texture deviation threshold When the value is 0.3 (or determined adaptively by historical statistics), the corresponding image block is identified as a texture anomalous block and marked as a texture anomalous point at the pixel level. For all pixels marked as texture anomalous points in the same frame of the unfolded image, a binary mask image is first constructed, where anomalous pixels have a value of 1 and non-anomalous pixels have a value of 0. On the binary mask image, connected component analysis is performed based on a preset pixel spatial adjacency relationship (preferably using a four-neighbor or eight-neighbor connection rule). In this embodiment, a connected component refers to a binary mask image where any two pixels with a value of 1 can be connected through a path composed of pixels with a value of 1, and adjacent pixels on the path satisfy the four-neighbor or eight-neighbor adjacency relationship. By scanning the binary mask image once or multiple times, a group of interconnected anomalous pixels that meet the above conditions are assigned the same label, and each group of anomalous pixels with the same label is aggregated into a candidate anomalous region. For each candidate anomalous region, the number of anomalous pixels A (as an area indicator) is counted, and the maximum span L of the region in the unfolded image length direction (as the extension length along the cable direction) is calculated. like: (Noise area removal threshold) or If the noise length rejection threshold is set, the candidate abnormal region is considered as an isolated noise region caused by instantaneous interference such as water mist and dust and is rejected. Only candidate abnormal regions with an area and length not less than the threshold are retained for subsequent processing.

[0048] S3: Use a cable speed encoder to obtain the cable running speed. and the timestamp corresponding to each frame of the image. The production start time is taken as... Then in time The cumulative length of the cable surface pulled out It is given by the following formula: In practical engineering, both the encoder and the camera operate with a fixed sampling period, so the integral can be discretized and approximated as: Where 'a' represents the sampling time number (discrete-time index). Let be the cable speed at the a-th sampling time. The time interval between two adjacent samples. To correspond to timestamps The sampling sequence number. Through the above relationship, each frame of the image can be uniquely mapped to a certain length range on the cable length coordinate axis (e.g., the center length corresponding to that frame). (or a certain length range). To model the continuity of defects along the length direction, the entire cable is divided into fixed lengths. (For example =10mm) is divided into multiple length units: ];in, , b represents the number (index) of the length unit. This represents the b-th length unit, where T is the total number of length units in this production run. The length is determined based on the length position corresponding to each frame of the image. The frame that belongs to the length range Texture outliers or image patches are classified into length units. In the middle. For the b-th length unit. Statistics: The total number of pixels or image blocks included in the statistics within this length unit is... The number of texture anomalous points (or anomalous blocks) identified in step S2 is: The percentage of texture anomalies within this unit. The average texture deviation of all texture aberration blocks within this unit: In the formula, This represents the average texture deviation of all texture aberration blocks within the b-th length unit. This represents the texture deviation of the q-th anomalous block within the b-th segment. Construct the length-unit feature vector: Arrange the features of each length unit in order of cable length to obtain the length time series feature sequence: Input F into a pre-trained temporal discriminant network, such as... Figure 4The diagram shows the structure of the temporal discrimination network provided in this application embodiment, illustrating the deep learning model architecture and the entire data flow logic for defect segment discrimination in the length direction: The input layer receives a length temporal feature sequence containing features of each length unit (including morphological features, texture differences, and expandable defect probability); the CNN layer extracts local features of the sequence through convolutional layers, then compresses the dimension through max pooling layers, and outputs local feature subsequences; the BiLSTM layer uses a bidirectional long short-term memory network to perform bidirectional temporal modeling of the local feature subsequences, while capturing historical and future feature dependencies in the length direction, generating a hidden state sequence that integrates contextual information, solving the temporal correlation problem that "defects must appear continuously to be real segments"; the AM layer (attention mechanism layer) assigns weights to the hidden states and performs weighted summation, focusing on key defects. The network first constructs a feature unit; the final output layer maps the global features to the defect probability of each length unit through a fully connected layer, outputting a temporal probability sequence. This output can be combined with the rule of "probability threshold + minimum continuous length" to further determine the start and end positions of the true defect segment and output ROI information. In this embodiment, the temporal discrimination network used is a BiLSTM network (Bidirectional Long Short-Term Memory network). This network is used to process the length temporal feature sequence F and determine whether each length unit belongs to a defect segment. BiLSTM is a deep learning model suitable for time series data, capable of capturing both forward and backward contextual information. The input of this network is the length temporal feature sequence F=[f1, f2, ..., fT], which learns temporal features through a bidirectional LSTM layer and outputs the probability that each length unit belongs to a defect segment. That is, through the network for each length unit Output real number score The score, mapped by the Sigmoid function, is the probability that the b-th length unit belongs to a defect segment: ;in, The larger the value, the more likely it is to be a defective segment. To avoid misjudging a single length unit due to isolated noise, a time-series defect probability sequence is used. Perform continuity assessment. Set: a threshold M for the number of consecutive length units (e.g., M=3); and a threshold for the probability of temporal defects. (For example =0.7). When there exists an index interval [s, e] of a certain length that satisfies: When the interval is continuous, the cable length corresponding to that interval is determined as a candidate segment for a real defect. Here, s represents the start index of the interval, and e represents the end index of the interval. That is, only when at least M adjacent length units simultaneously satisfy the condition of "defect probability not lower than the threshold" is the region considered to have a real defect with physical length and continuity, thereby effectively suppressing false alarms caused by single-point or single-frame noise.

[0049] S4: For each real defect candidate segment, extract the Region of Interest (ROI) containing that defect candidate segment from the original unfolded image, and input the ROI into a fine-grained defect segmentation convolutional neural network. For example... Figure 5 The diagram shows the structure of the fine defect segmentation network provided in this application embodiment. The network architecture and workflow of the ROI image pixel-level defect detection model are as follows: The input is a single-channel ROI image (size 64×64) cropped from the original image and resized to a fixed size. First, the encoding branch (consisting of alternating 3×3 convolution + ReLU activation layer and 2×2 max pooling layer) completes the layer-by-layer abstraction and downsampling of defect features, with the number of feature channels expanded to a maximum of 1024. Then, the decoding branch (consisting of 2×2 transposed convolution upsampling, copy-and-crop fusion of corresponding layer features from the encoding branch, and 3×3 convolution + ReLU thinning) restores the feature map size. Finally, a pixel-level defect probability map with the same size as the input ROI is output through a 1×1 convolution (single-class defects are single-channel, and multi-class defects are multi-channel).

[0050] Based on the pixel labels in the mask, the following features are extracted from each connected defect region: geometric features (area, length and width of the bounding rectangle, projected length along the cable length direction, shape factor, etc.) and texture features (average pooling or max pooling is performed on the high-level feature map at the encoding end to obtain the feature vector at the corresponding feature positions of the region). The geometric features (such as area, aspect ratio, etc.) and texture features (such as surface roughness, etc.) extracted from the segmented defect regions are concatenated and input into the defect classification sub-network. Figure 6 The diagram shows the structure of the defect classification sub-network provided in this embodiment. Based on ResNet-34 residual blocks, it is used to classify cable defect regions and output confidence scores. The model input is a clipped image of the cable defect region obtained through U-Net segmentation (which can be combined with defect geometric feature vectors to enhance feature representation). The main path of the residual block within the dashed box completes high-order feature extraction through two concatenations: a batch normalization layer and a 3×3 convolutional layer. Simultaneously, a 1×1 convolutional layer performs dimension matching on the input cable defect region clipped image to form skip connections. The original input features are added to the main path output features and activated by ReLU, which alleviates the gradient vanishing problem in deep networks and enhances feature reuse. Finally, the model outputs a category probability distribution, and the defect type and classification confidence score are obtained by taking the maximum value. This structure uses defect type labels as supervision and is trained offline using multi-class cross-entropy. During online inference, the output defect type and the confidence scores from the detection and segmentation modules together constitute a decision vector, supporting the final determination of cable defects.

[0051] S5: For each defective region, use the texture deviation index corresponding to that region. (Can be represented by the average texture deviation of blocks within the region), temporal defect probability index (For example, within this section) (maximum or average value) and defect classification confidence level Constructing the interpretation vector: Among them, the probability index of timing defects If the defects have strong temporal suddenness or local concentration, that is, the defects are more serious within a certain period of time, the maximum value should be selected so that the most prominent defects can be captured; if the defects are relatively uniform and widely distributed, that is, the defects are continuous or distributed as a whole within a certain range, the average value should be selected to reduce the response to local noise.

[0052] Example A: Under certain special process conditions, localized severe defects may occur, such as sudden mechanical damage in a production process, leading to a concentration of surface defects. In this case, the system should be able to accurately capture this sudden defect at that moment. The maximum probability of the time-series defect is selected as... The most severe defective segments are highlighted by their maximum values.

[0053] Example B: In other cases, the cable surface may experience relatively uniform stress or friction, resulting in a more even distribution of defects throughout the production process. In this case, the average value can smooth the time-series data and avoid excessive sensitivity to occasional local anomalies; therefore, the average value of the time-series defect probability is chosen as the average value. The stability of the detection is balanced by averaging, and the response to occasional noise is reduced.

[0054] The overall confidence level is obtained by using a linear weighting method: ;

[0055] in, and The weights of texture deviation, temporal defect probability, and defect classification confidence as a percentage of overall confidence are respectively used to set a defect judgment threshold (i.e., the high threshold). ) Normal judgment threshold

[0056]

[0057] Example 2 of the present invention: Based on Example 1, this embodiment further introduces a texture-process joint deviation index to improve the sensitivity to potential defects caused by process fluctuations. The overall process of this embodiment is basically the same as that of Example 1, with the main difference being the processing of process parameters and the joint deviation index in steps S1, S2, and S5. In step S1, while acquiring the surface image of the initial qualified section of the cable and extracting the library texture feature vector, process parameter data corresponding to the initial qualified section is synchronously collected from the process control system of the production line (such as the extruder controller, traction machine controller, online diameter measuring instrument, etc.). Preferably, the process parameters may include at least one or more of the following: cable running speed, traction tension, extruder die temperature, and sheath wire diameter.

[0058] Arrange the process parameters corresponding to this moment in a fixed order to form a process parameter vector:

[0059] =( , , ..., ); where Q represents the number of dimensions of the process parameters, This represents the scalar value of the Q-th process parameter. For each image patch within the initial acceptable segment, its texture feature vector is... With the corresponding process parameter vector Perform a concatenation to form a joint feature vector of the library: =[ ; ]; Use the joint feature vector of all libraries Unsupervised clustering analysis was performed, with K-means clustering being the preferred method. The joint feature space was divided into multiple joint normal pattern clusters, and the joint cluster center and its statistics for each cluster were obtained.

[0060] Compared to the clustering based solely on texture features in Example 1, this example introduces process parameters to jointly model the "normal texture-normal process combination," constructing a texture-process joint normal pattern map. Specifically, the normal mean and standard deviation of the process parameter vectors within the initial qualified segment are statistically analyzed dimension-by-dimensionally for subsequent standardized calculations of process parameter deviations. In step S2, in the online detection stage, in addition to extracting the detection texture feature vector of the current image block... In addition, the process parameter vector corresponding to the time period of the image block is read in real time from the process control system. Deviation of process parameters Calculation: Based on the statistical results of process parameters in the initial qualified segment, the normal mean of the u-th dimension process parameter is denoted as... The standard deviation is For the detection process parameter vector The u-th dimension component Standardization shall be carried out in the following manner: Where u represents the dimension number of the process parameter, u = 1, 2, ..., Q. The standardized detection process parameter vector is obtained as follows: In the formula This is represented as the Q-th dimension component of the standardized testing process parameter vector. Where, when... = hour, The test process parameters are completely in their initial normal center state. Represents the zero vector, that is Depending on the needs, one or more of Euclidean distance, Mahalanobis distance, or Manhattan distance can be used to calculate... With the zero vector Detection distance between For example, the Euclidean distance is in the form of: ;

[0061] Then, the distance is transformed using a pre-defined monotonically increasing transformation function h(·). Converted to deviation of process parameters : =h( In one specific embodiment, h(·) is a saturation function: ;in The preset process deviation from the normalization scale is used to ensure The numerical range is [0, 1]. , The process parameter deviation distance within the initial qualified segment is adaptively determined based on statistical results. Specifically, for each image block in the initial qualified segment, and standard deviation The normalization scale is determined using the following formula: Where z is a positive integer, preferably z is 3. This embodiment uses the "mean + 3 times the standard deviation" method, which can cover most process fluctuations under normal operating conditions. When the process deviation of the test sample is close to or exceeds... When this occurs, it can be considered that there is a significant process abnormality. Theoretically, in addition to the above-mentioned saturation function, linear or piecewise linear forms can also be selected according to the on-site control strategy and noise reduction requirements: for example, in scenarios where process parameters fluctuate relatively uniformly and alarms need to be approximately proportional to the degree of deviation, a linear function can be used; while in scenarios where "slight deviations should not be frequently intervened, but once an abnormal window is entered, the risk needs to be quickly increased," a piecewise linear function is more suitable.

[0062] Texture deviation Joint Deviation Index Calculation of texture deviation The calculation method can be consistent with that in Example 1, that is, based on the detection texture feature vector. The similarity between the texture cluster centers in the normal texture adaptive benchmark library and the texture cluster centers is used to obtain the similarity set { }, take the maximum value And obtained through the monotonically decreasing function g(·): =g( Preferably, the following can be used: =1− ; In obtaining texture deviation Deviation from process parameters Subsequently, this embodiment defines the joint deviation index. This is used to characterize the degree to which the current image patch deviates from the normal pattern within the texture-process joint space. The joint deviation function f(·) can take a linearly weighted form, for example: Where α∈[0,1] is a weighting coefficient used to adjust the influence of texture deviation and process deviation on the joint deviation index; when α is large, texture anomalies are emphasized more, and when α is small, process anomalies are emphasized more. A nonlinear combination form can also be used, for example:

[0063] The above form means that when any dimension deviates significantly, the joint deviation index will also increase significantly. When Exceeding the preset joint deviation threshold At that time, the corresponding image block is marked as a texture-process joint anomaly block and marked as an anomaly point at the pixel level, participating in subsequent connected component analysis and defect candidate region generation. Preferably, this embodiment can use In the alternative embodiment one, based solely on texture deviation... The abnormal judgment criteria enhance the ability to identify complex scenarios such as "normal texture but abnormal process" or "slight deviation in texture and significant deviation in process".

[0064] In step S5, this embodiment will combine the deviation index. As the primary input indicator for the intensity of segment-level texture-process anomalies, it is used to calculate the overall confidence level. Specifically, when constructing the interpretation vector, the texture deviation index from Example 1 can be used. Replace with joint deviation index ,For example:

[0065] E=( , , );in, It can be derived from the image block within the defect segment. The values ​​are obtained by summing them up using methods such as average, maximum value, or quantiles. It is a probability index for time-series defects. A confidence index for defect classification is then used. Then, using linear weighting or other non-linear combinations, the explanatory vectors are mapped to a comprehensive confidence score C, based on... and A three-stage judgment process is employed. By introducing a joint deviation index, the system's ability to identify potential defects caused by process fluctuations and changes in equipment status can be improved without altering the overall processing framework.

[0066] Embodiment 3 of the present invention: Based on Embodiments 1 and 2, this embodiment further introduces an incremental update mechanism based on human-computer interaction. The overall detection process of this embodiment can still refer to steps S1 to S5 of Embodiments 1 or 2. The difference is that for samples with a comprehensive confidence level in the middle range, a manual confirmation and incremental update process of the model / benchmark library are introduced.

[0067] In step S5, for each defect region, the overall confidence level C is calculated using the interpretation vector E, and then determined based on a high threshold. With low threshold Make a determination based on the interval of C: For the aforementioned disputed samples, this embodiment does not immediately make a final judgment. Instead, it stores the corresponding Region of Interest (ROI) image and the pixel-level defect segmentation mask output by the fine-grained defect segmentation convolutional neural network into a sample pool awaiting manual confirmation. It also records the corresponding texture feature vector, process parameter vector, joint deviation index, and the initial judgment result given by the current system. At an appropriate time during production (e.g., at the end of a shift or during periods of low production line load), operators can access the sample pool awaiting manual confirmation through a human-machine interface terminal to review each sample individually.

[0068] The human-computer interaction terminal can simultaneously display the following: the original unfolded image or ROI image; the overlay display of a fine defect segmentation mask (pseudo-color or contour overlay); the defect category prediction and corresponding classification confidence given by the system; and the components of the comprehensive confidence C and the explanatory vector E. Based on experience and process requirements, operators manually label each sample to be confirmed: when the region is confirmed to be normal, the sample is marked as "normal"; when a defect is confirmed to exist in the region, it is marked as "defect," and a specific defect type can be further selected from a preset defect category list, such as twisted texture, dent, scratch, bubble, etc. The labeling results will be saved as supervisory information for subsequent incremental updates. For samples marked as "normal" in manual review, this embodiment treats them as new normal samples for updating the normal texture adaptive benchmark library. Specifically, the detection texture feature vector of the image patch corresponding to the sample is obtained. (and the optional process parameter vector in Example 2) The similarity between the target cluster and the center of each normal texture cluster is calculated based on similarity or distance metrics, and the target cluster with the highest similarity is found.

[0069] In one specific embodiment, the most similar cluster index can be determined using cosine similarity. : Here, argmax refers to the value of the argument that makes the function reach its maximum value. This is the cluster center feature vector of the k-th texture cluster in the normal texture adaptive benchmark library. Let be the similarity function defined in Example 1. Let the current number of samples in this cluster be . The cluster center is After introducing new normal samples, incremental updates are performed using the following recursive method: ; That is, the new cluster center is equivalent to the weighted average of the old cluster centers (weighted by the number of old samples + features of new samples). When expanding by dimension, the update formula for the j-th dimension component is: ;

[0070] Through the aforementioned incremental updates, the normal texture adaptive benchmark library will gradually absorb new "normal patterns" introduced due to changes in material batches and process fine-tuning, thereby reducing the probability of similar samples being misjudged as abnormal in subsequent detections. For samples marked as "defective" during manual review, this embodiment adds them to the defect sample library as a source of training data for retraining or online fine-tuning of the fine-grained defect segmentation convolutional neural network and the defect classification sub-network. Within a certain time window (e.g., after several production batches), newly labeled samples can be extracted from the defect sample library and combined with the original training set to form an incremental training set. Network parameters are then fine-tuned using methods such as mini-batch gradient descent. To prevent the model from forgetting historical patterns, a suitable number of representative old samples can be mixed for joint training.

[0071] Based on this, this embodiment can also utilize manually verified normal / defective samples to set the overall confidence threshold, i.e. and Adaptive adjustments are made. Specifically: the set of comprehensive confidence scores for samples manually labeled as "normal" is denoted as... Their mean and standard deviation are as follows: ; Where m represents the number of the normal sample, Let be the overall confidence level of the m-th sample that was manually labeled as "normal". Let be the normal sample size. Let the set of overall confidence scores for samples manually labeled as "defective" be denoted as , with its mean and standard deviation as follows: ; ;

[0072] Where n represents the number of the defective sample, The overall confidence level of the nth sample that is manually labeled as "defective" is... This represents the number of defective samples. Based on the above statistics, the high and low thresholds for the overall confidence score can be adaptively set or adjusted as follows: ; ;in, and This is a preset coefficient, preferably a positive number between 0.5 and 2. Through reasonable selection... and This ensures that the overall confidence level of most normal samples is distributed within the range of Below, the overall confidence level of most defective samples is distributed as follows: In this way, the defect recall rate can be improved while ensuring that the false positive rate is controllable.

[0073] Embodiment 4 of the present invention: Based on the above embodiments, this embodiment further provides a method for constructing a cable surface health index based on comprehensive indicators, which is used to quantitatively evaluate the appearance quality of the entire cable or a certain production batch, and to provide a decision-making basis for quality traceability and process optimization in the production process.

[0074] In steps S3 and S5 of Embodiment 1 or Embodiment 2, each length unit has been obtained. The relevant indicators include: the probability that the length unit belongs to a defective segment. ; Confidence level of defect classification for the corresponding defect area (if any) In addition to defect category information, this embodiment defines a length unit-level health score to quantify the apparent quality of each length unit. Health score It can be regarded as a measure of "defect-free level". The closer the value is to 1, the healthier it is, and the closer it is to 0, the less healthy it is.

[0075] Preferably, it can be constructed in the following form : ;in, , , The weight coefficients are non-negative and, ; To determine the effective classification confidence for the most severe defect region within the b-th length unit, when there is no defect region within that length unit, we can take... ;and, The deviation index for the b-th length unit is used to uniformly represent texture deviation or joint deviation under different embodiments, and its value is defined as follows: ;

[0076] in, for The obtained texture deviation of the b-th length unit, The texture-process joint deviation, as defined in Example 2, is used to simultaneously reflect the impact of texture and process deviations on health. Through appropriate selection... , , The value of can be adjusted according to the specific application focus, adjusting the contribution of each factor to the health score. For example, when emphasizing apparent consistency, increasing can help. Increase when emphasizing the risk of continuous defects Increase when emphasizing the severity of defects .

[0077] After obtaining the health score for each length unit Then, an overall health index can be constructed for the entire cable or a production batch of cables. A simple approach is to use a length-weighted average:

[0078] Where T represents the total number of length units in the cable, and b is the number of the length unit. Higher weights can also be assigned to defective sections as needed, for example, for... Units below a certain threshold are weighted and amplified to make the overall health index more sensitive to serious defects.

[0079] ;in, The weight coefficient for the b-th length unit can be determined based on the length unit's health score and a preset threshold. The relationship is segmented, for example: ;in, This is the health score threshold for length units, used to distinguish between length units with lower and higher health levels. The specific value can be set according to historical statistical data and enterprise quality standards. For example, it can be 0.75 or 0.8. This invention does not limit it.

[0080] According to health index The range of values ​​can be used to classify the apparent quality of cables into several levels, such as:

[0081] Among them, cables with a quality grade of "Excellent" can be released directly; cables with a quality grade of "Good" are recommended for focused spot checks; cables with a quality grade of "Medium" are recommended for comprehensive re-inspection; and cables with a quality grade of "Poor" are recommended to be scrapped entirely or reworked. The above thresholds can be adjusted based on historical statistical data and company quality standards to suit different product specifications and customer requirements.

[0082] By linking the cable surface health index with information such as production batch number, process formula, and raw material batch, the following applications can be achieved: Batch comparison and trend analysis: comparing different production batches... Statistical and trend analysis allows for timely tracing of a continuous decline in the health index of a batch back to changes in process parameters, abnormal equipment status, or raw material issues. Process optimization and formulation evaluation: When conducting new process formulation trials or optimizing equipment parameters, the health index can be used as a quantitative indicator; under the same conditions, solutions with higher health indices are prioritized. Quality early warning and dynamic parameter adjustment: When the health index is calculated in real-time during online monitoring... When a local health index shows a continuous downward trend, a process warning can be triggered, prompting operators to check process parameters such as extrusion temperature, traction speed, and cooling conditions. Combined with the joint deviation index in Example 2, the local process settings can be automatically adjusted to prevent the expansion of defects.

[0083] By constructing and applying the aforementioned health index, this invention can not only identify and classify individual defects, but also quantitatively manage the apparent quality of the entire production process at a higher level, further enhancing the system's practical value and promotional significance.

[0084] like Figure 2This is a schematic diagram of the structure of an automatic cable surface defect detection system based on a convolutional neural network provided in this application embodiment. The system includes: a benchmark library construction module, used to collect initial qualified segment images during the production of a new batch of cables, extract texture feature vectors from the library using a pre-trained texture feature encoding network, perform unsupervised clustering, and store the remaining cluster centers and their statistics in the normal texture adaptive benchmark library for that batch; a texture anomaly detection and candidate region generation module, used to collect unfolded images of the cable surface online, divide them into image blocks, input them to the texture feature encoding network to obtain detection texture feature vectors, obtain texture deviation based on the detection texture feature vectors and the cluster centers in the normal texture adaptive benchmark library, determine whether they are texture anomaly points, and perform connected component analysis on texture anomaly points in the same frame of unfolded images to obtain candidate anomaly regions; and a length mapping and temporal feature construction module, used to map candidate anomaly regions onto the cable length coordinate axis using a cable speed encoder, divide the cable length into multiple length units, and statistically analyze the proportion and average texture anomaly points in each length unit. The system constructs a temporal feature sequence based on the deviation of the length unit, which is then input into a pre-trained temporal discrimination network to obtain the probability that each length unit belongs to a defect segment. Based on the defect probabilities of multiple consecutive length units, it determines whether a segment is a true defect candidate. The temporal discrimination and true defect candidate segment determination module identifies each segment identified as a true defect candidate in the length mapping and temporal feature construction module. It extracts the region of interest containing the defect candidate segment from the unfolded image and inputs it into a fine-grained defect segmentation convolutional neural network to obtain a pixel-level defect segmentation mask. It extracts the geometric and texture features of each connected defect region and combines them with the high-level features from the encoding end of the fine-grained defect segmentation convolutional neural network. These features are then input into a defect classification sub-network to obtain the probability of each defect category and the corresponding defect classification confidence score. The defect segmentation, classification, and result output module calculates a comprehensive confidence score for each defect region by combining the texture deviation, the defect probability of the length unit, and the defect classification confidence score. When the comprehensive confidence score is higher than a preset defect determination threshold, the region is identified as a defect, and the detection result is output.

[0085] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A cable surface defect automatic detection method based on a convolutional neural network, characterized in that, The method comprises the following steps: S1: when a new batch of cable production is started, an initial qualified section image is collected, a library texture feature vector is extracted by a pre-trained texture feature coding network, and unsupervised clustering is performed, and after abnormal clusters are removed, the remaining cluster centers and their statistics are stored in the normal texture adaptive reference library of the batch; S2: an online cable surface development image is collected and divided into image blocks, which are input into the texture feature coding network to obtain a detection texture feature vector, a texture deviation degree is obtained according to the detection texture feature vector and each cluster center in the normal texture adaptive reference library, and it is judged whether it is a texture abnormal point, and a connected domain analysis is performed on the texture abnormal points of the same frame development image to obtain a candidate abnormal area; S3: the candidate abnormal area is mapped to a cable length coordinate axis by using a cable speed encoder, the cable length is divided into a plurality of length units, the proportion of texture abnormal points and the average texture deviation degree in each length unit are counted, a length time sequence feature sequence arranged in length order is constructed, and the length time sequence feature sequence is input into a pre-trained time sequence discrimination network to obtain the probability that each length unit belongs to a defective section, and it is judged whether it is a real defect candidate section according to the defect probabilities of a plurality of continuous length units; S4: for each real defect candidate section determined in S3, a region of interest containing the defect candidate section is intercepted from the development image and input into a fine defect segmentation convolutional neural network to obtain a pixel-level defect segmentation mask, the geometric features and texture features of each connected defect area are extracted, the above features are input into a defect classification subnetwork in combination with the high-level features of the coding end of the fine defect segmentation convolutional neural network, and the probability of each defect category and the corresponding defect classification confidence are obtained; S5: for each defect area, a comprehensive confidence is obtained by comprehensively considering the texture deviation degree, the defect probability of the length unit and the defect classification confidence, and when the comprehensive confidence is higher than a preset defect judgment threshold, the area is judged as a defect and a detection result is output. 2.The CNN-based cable surface defect automatic detection method of claim 1, wherein, The specific analysis process of the texture deviation degree is as follows: The detection texture feature vector corresponding to each image block is respectively calculated with the similarity of each cluster center in the normal texture adaptive reference library to obtain a similarity set of each detection texture feature vector relative to each cluster center; the maximum one is taken, and the maximum similarity value is converted into a texture deviation degree by a preset linear transformation function. 3.The CNN-based cable surface defect automatic detection method of claim 2, wherein, Steps S1, S2 and S5 further comprise a calculation process and an application process of a joint deviation index: In step S1, while the initial qualified section cable surface image is obtained and the library texture feature vector is extracted, one or more process parameters corresponding to the initial qualified section are synchronously collected, such as cable running speed, traction tension, extruder die temperature and sheath wire diameter, and the process parameters are combined into a process parameter vector; the library texture feature vector of each image block is connected with the process parameter vector corresponding thereto to form a library joint feature vector, and unsupervised clustering analysis is performed based on the library joint feature vector to construct a texture-process joint normal mode atlas and corresponding process parameter statistics; In step S2, the detected texture feature vector of the current image block is connected with the current process parameter vector to form a detected joint feature vector, the texture deviation degree and the process parameter deviation degree of the current image block are obtained respectively, and a joint deviation index is calculated according to a preset joint deviation function; when the joint deviation index exceeds a preset joint deviation threshold, the corresponding image block is marked as a texture abnormal point; In step S5, when calculating the comprehensive confidence, the joint deviation index is replaced by the texture deviation degree as an input index representing the joint texture-process abnormality degree. 4.The cable surface defect automatic detection method based on convolutional neural network according to claim 3, wherein, The specific calculation process of the process parameter deviation degree includes: In step S1, the process parameter vector collected in the initial qualified section is used to respectively calculate the normal mean and standard deviation of each dimension process parameter of the cable; In step S2, each dimension process parameter in the detected process parameter vector is standardized, the standardization is to obtain a standardized detected process parameter vector by subtracting the normal mean of each process parameter and dividing by the standard deviation, and the distance between the standardized detected process parameter vector and a zero vector is calculated, the zero vector is a vector with all dimensions being 0, which is used to represent that the standardized process parameter is in a normal center state; the distance is converted into a process parameter deviation degree by a linear transformation function. 5.The CNN-based cable surface defect automatic detection method of claim 1, wherein, The specific process of the connected domain analysis in step S2 is as follows: The pixels marked as texture abnormal points in the same frame expansion image are divided into connected domains according to the spatial adjacency relationship, and the four-neighbor or eight-neighbor connection rule is used to aggregate the mutually connected abnormal pixels into a candidate abnormal region; For each candidate abnormal region, the number of abnormal pixels contained in the candidate abnormal region is counted, the number of abnormal pixels is used to represent the area of the candidate abnormal region, and the maximum span of the candidate abnormal region in the length direction of the expansion image is calculated, the maximum span is used to represent the extension length of the candidate abnormal region along the length direction of the cable; When the area of the candidate abnormal region is less than a preset noise area rejection threshold or the extension length is less than a preset noise length rejection threshold, the candidate abnormal region is determined as an isolated noise region caused by transient interference and is rejected, only the candidate abnormal region with an area not less than the noise area rejection threshold and an extension length not less than the noise length rejection threshold is retained as a candidate abnormal region for subsequent processing. 6.The CNN-based cable surface defect automatic detection method of claim 1, wherein, The fine defect segmentation convolutional neural network is: The fine defect segmentation convolutional neural network in step S4 is a semantic segmentation network with an encoder-decoder structure, the encoding end includes multiple convolutional layers and down-sampling layers, which are used to extract multi-scale features, the decoding end restores the spatial resolution by up-sampling and skip connection step by step, and outputs a pixel-level defect segmentation mask with the same size as the region of interest; The value of each pixel position in the pixel-level defect segmentation mask is used to represent the probability that the pixel belongs to the background or belongs to each defect category. 7.The CNN-based cable surface defect automatic detection method of claim 1, wherein, The specific analysis process of the defect classification confidence is as follows: The maximum value in each defect category probability output by the defect classification sub-network is defined as the defect classification confidence; The geometric features include one or more of the area of the defect region, the length and width of the circumscribed rectangle, the projection length along the cable length direction, and the shape factor. The texture features are obtained by performing pooling on the positions corresponding to the defect region in the high-level feature map at the encoding end of the fine defect segmentation convolutional neural network. 8.The CNN-based cable surface defect automatic detection method of claim 1, wherein, The specific classification process of the comprehensive confidence in step S5 is as follows: The texture deviation degree, the defect probability of the length unit, and the defect classification confidence constitute an explanation vector, the explanation vector is mapped into a comprehensive confidence according to a preset weighting or nonlinear combination rule, and the comprehensive confidence interval is divided into an automatic passing interval, an automatic alarm interval, and a manual confirmation interval according to two preset thresholds: a defect determination threshold and a normal determination threshold, wherein when the comprehensive confidence is greater than or equal to the defect determination threshold, the corresponding defect region is determined as a defect and the detection result is automatically output, when the comprehensive confidence is less than or equal to the normal determination threshold, the corresponding defect region is determined as normal and automatically passed, and when the comprehensive confidence is greater than the normal determination threshold and less than the defect determination threshold, the corresponding defect region is determined as a controversial sample and added to a manual confirmation sample pool. 9.The CNN-based cable surface defect automatic detection method of claim 8, wherein, The method further includes an incremental updating process based on human-computer interaction: After step S5, the region of interest image and / or pixel-level defect segmentation mask corresponding to the defect candidate region in the manual confirmation sample pool are output on a human-computer interaction terminal, and only when the sample to be confirmed is confirmed as normal, the sample is used for incremental updating of the normal texture adaptive reference library; otherwise, the sample is added to an observation buffer pool without triggering reference library updating, and the defect category can be further selected when the sample is marked as a defect; For the sample marked as normal, the detection texture feature vector is incrementally updated into the normal texture cluster with the highest similarity, so as to update the cluster center and statistics of the normal texture adaptive reference library; For the sample marked as a defect, the sample is added to a defect sample library for subsequent retraining or fine-tuning of the fine defect segmentation convolutional neural network and / or the defect classification sub-network, and the defect determination threshold and / or the normal determination threshold of the comprehensive confidence in step S5 are adjusted according to the statistical changes of the samples in the defect sample library, so as to improve the adaptive ability and stability of the overall detection system in the long-term running process.

10. A system applying the method for automatic detection of cable surface defects based on convolutional neural network according to any one of claims 1-9, characterized in that, The method comprises: a reference library construction module, a texture anomaly detection and candidate region generation module, a length mapping and time sequence feature construction module, a time sequence discrimination and real defect candidate segment determination module, and a defect segmentation, classification, and result output module; The reference library construction module is configured to, when a new batch of cables is produced, collect initial qualified segment images, extract library texture feature vectors through a pre-trained texture feature encoding network, and perform unsupervised clustering, and store the cluster centers and statistics of the remaining clusters after removing abnormal clusters into the normal texture adaptive reference library of the batch. The texture anomaly detection and candidate region generation module is configured to collect cable surface unwinding images online, divide the images into image blocks, input the image blocks into the texture feature coding network to obtain a detected texture feature vector, obtain a texture deviation degree according to the detected texture feature vector and each cluster center in the normal texture adaptive reference library, determine whether it is a texture abnormal point, perform connected domain analysis on the texture abnormal points of the same frame unwinding image, and obtain a candidate abnormal region; The length mapping and time sequence feature construction module is configured to map the candidate abnormal region to a cable length coordinate axis by using a cable speed encoder, divide the cable length into a plurality of length units, count the proportion of texture abnormal points and the average texture deviation degree in each length unit, construct a length time sequence feature sequence arranged in length order, and input the length time sequence feature sequence into a pre-trained time sequence discrimination network to obtain a probability that each length unit belongs to a defect segment, and determine whether it is a real defect candidate segment according to the defect probabilities of a plurality of continuous length units; The time sequence discrimination and real defect candidate segment determination module is configured to determine each length unit in the length mapping and time sequence feature construction module as a real defect candidate segment, cut a region of interest containing the defect candidate segment from the unwinding image, input the region of interest into a fine defect segmentation convolutional neural network, obtain a pixel-level defect segmentation mask, extract geometric features and texture features of each connected defect region, combine high-level features of the fine defect segmentation convolutional neural network coding end, input the features into a defect classification subnetwork, and obtain a probability of each defect category and a corresponding defect classification confidence. The defect segmentation, classification and result output module is configured to obtain a comprehensive confidence by comprehensively considering the texture deviation degree, the defect probability of the length unit and the defect classification confidence for each defect region, determine the region as a defect when the comprehensive confidence is higher than a preset defect determination threshold, and output a detection result.

Citation Information

Patent Citations

  • Unmanned aerial vehicle intelligent inspection cable surface defect detection method based on deep learning

    CN113160184A

  • Cable surface defect detection system based on deep learning

    CN115980068A

  • Cable surface defect detection method

    CN120411030A

Cited By

  • Asphalt pavement paving defect identification method based on video image

    CN121837265A

  • Cable surface defect detection method

    CN121962153A