A complex texture textile defect recognition method and system based on feature decoupling

By acquiring multi-scale features of textiles through feature decoupling, projecting them onto an orthogonal hidden subspace, and performing manifold alignment and feature fusion, the problems of high false detection rate and large computational load in defect detection of complex textured textiles are solved, and efficient and automated defect identification is achieved.

CN122368049APending Publication Date: 2026-07-10HUANSI INTELLIGENT TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUANSI INTELLIGENT TECH INC
Filing Date
2026-06-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies for defect detection in complex textured textiles suffer from high rates of false positives and false negatives, as well as high computational demands, making it difficult to meet the real-time detection requirements of production lines.

Method used

A feature-based decoupling method is adopted to obtain a multi-scale feature set, project it onto a mutually orthogonal hidden subspace, perform manifold alignment and feature fusion, and adaptive threshold segmentation to achieve automated identification of defect features.

Benefits of technology

It improves the accuracy and robustness of textile defect detection, reduces computing resources and labor costs, and meets the real-time detection needs of production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122368049A_ABST
    Figure CN122368049A_ABST
Patent Text Reader

Abstract

The application relates to a complex texture textile defect recognition method and system based on feature decoupling, and relates to the field of computer technology, which comprises the following steps: obtaining a multi-scale feature set of an original textile image to obtain a complex texture fusion feature; projecting the complex texture fusion feature to two mutually orthogonal hidden subspaces to obtain a reference texture component and an abnormal disturbance component; performing manifold alignment processing on the reference texture component based on a preset texture library to obtain a texture reconstruction feature; performing feature fusion on the texture reconstruction feature and the abnormal disturbance component to obtain a texture residual feature; performing adaptive threshold segmentation on the texture residual feature to obtain a defect feature map of the original textile; and performing connected domain analysis processing on the defect feature map to output a defect detection result. The application has the effects of improving the robustness of textile detection, meeting the needs of real-time detection in a pipeline, and reducing the computing resources and labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and system for identifying defects in complex textured textiles based on feature decoupling. Background Technology

[0002] In the field of textile surface defect detection, especially for textiles with complex textures (e.g., jacquard fabrics, lace, and silk), defect identification is typically performed manually or using image recognition techniques. This involves acquiring images of the textile surface using an industrial camera, then employing image filtering or machine learning classifiers to segment the defective areas from the background texture, thereby determining the presence and location of defects.

[0003] Regarding the aforementioned technologies, it is difficult to accurately identify minute defects on the surface of complex-textured textiles. This is because the background texture of textiles has intricate structural features and randomness, while minute defects (e.g., skipped stitches, tiny holes, and stains) occupy few pixels in the image, making their features easily overlap with the background texture. Manual inspection is easily affected by individual experience and ambient lighting, and the lack of standardized inspection criteria leads to low detection efficiency. Traditional methods struggle to effectively distinguish between variations in the texture itself and actual defects during feature extraction, resulting in high false positive and false negative rates. Conventional image processing methods do not adequately utilize information about minute defects, easily losing crucial defect information. For these reasons, existing detection methods suffer from poor stability and insufficient generalization ability in complex texture scenarios, failing to meet the real-time inspection requirements of production lines. Furthermore, they are computationally intensive, wasting significant computing resources and limiting their deployment in practical industrial scenarios, indicating room for improvement. Summary of the Invention

[0004] To overcome the problems of easy fatigue and missed detection in manual inspection, inconsistent inspection standards, and severe feature aliasing and poor generalization ability of image recognition methods in complex texture backgrounds, this application provides a defect identification method for complex texture textiles based on feature decoupling.

[0005] Firstly, this application provides a defect identification method for complex textured textiles based on feature decoupling, employing the following technical solution: A multi-scale feature set of the original textile image is obtained to obtain complex texture fusion features. These complex texture fusion features are projected onto two mutually orthogonal hidden subspaces to obtain a baseline texture component and anomaly perturbation components. Based on a preset texture library, the baseline texture component is subjected to manifold alignment processing to obtain texture reconstruction features. The texture reconstruction features and the anomaly perturbation components are fused to obtain texture residual features. The texture residual features are subjected to adaptive threshold segmentation to obtain a defect feature map of the original textile. The defect feature map is subjected to connected component analysis processing to output the defect detection results.

[0006] Secondly, this application provides a defect identification system for complex textured textiles based on feature decoupling, employing the following technical solution: The acquisition module is used to acquire original textile images; the memory is used to store the program of the above-mentioned method for identifying defects in complex texture textiles based on feature decoupling; the processor is used to load and execute the program in the memory and implement the above-mentioned method for identifying defects in complex texture textiles based on feature decoupling.

[0007] The above-described embodiments of this disclosure have the following beneficial effects: The feature-decoupling-based defect identification method for complex textured textiles according to some embodiments of this disclosure improves the robustness of textile detection, meets the needs of real-time detection in production lines, reduces computational resources and labor costs, and improves the accuracy of textile defect identification. Specifically, the reasons for the inaccurate textile defect detection results and high computational resource consumption are: in complex texture backgrounds, minute defect features are easily overlapped with the background texture, making it difficult for existing methods to effectively distinguish them. Single-scale feature extraction does not adequately utilize minute detail information, leading to the loss of key defect information. Traditional image recognition methods rely on manual parameter tuning and multiple runs, resulting in high computational redundancy, poor generalization ability, and large computational load, making it difficult to adapt to the production needs of multi-variety, high-speed production lines. Therefore, the feature-decoupling-based defect identification method for complex textured textiles according to some embodiments of this disclosure first obtains a multi-scale feature set of the original textile image to obtain complex texture fusion features. This achieves the preservation of texture structure and defect details, avoids the problem of losing minute defect information in single-scale feature extraction, and provides a complete feature foundation for subsequent feature decoupling. Secondly, the complex texture fusion features are projected onto two mutually orthogonal hidden subspaces to obtain the baseline texture component and the anomalous perturbation component. This decouples the defect features from the background texture at the feature level, effectively solving the problem of high false detection rates caused by feature aliasing in complex texture backgrounds. Then, based on a pre-defined texture library, the baseline texture component is manifold aligned to obtain texture reconstruction features. This enhances the model's ability to model normal texture patterns, enabling it to quickly adapt to different patterns and varieties of textiles, improving the generalization ability and adaptability of the detection method to product changes. Next, the texture reconstruction features and the anomalous perturbation components are fused to obtain texture residual features. This highlights the difference between the defect area and the normal texture, reduces the impact of interference factors (e.g., illumination fluctuations and hardware state changes) on the detection results, and improves the robustness of defect detection. Furthermore, adaptive threshold segmentation is performed on the texture residual features to obtain the defect feature map of the original textile. This achieves automated defect segmentation without manual parameter setting, avoiding inconsistent detection standards caused by differences in human experience and subjective judgment. Finally, connected component analysis is performed on the aforementioned defect feature map to output the defect detection results. This completes end-to-end automated defect detection from image input to defect output. It improves the robustness of textile inspection, can be used for defect rejection control in production lines, meets the real-time inspection needs of production lines, and reduces computational resources and labor costs. Attached Figure Description

[0008] Figure 1 This is a flowchart of some embodiments of a defect identification method for complex textured textiles based on feature decoupling according to the present disclosure. Detailed Implementation

[0009] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can 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 this disclosure. 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.

[0010] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0011] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0012] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0013] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0014] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0015] refer to Figure 1 The diagram illustrates a flow 100 of some embodiments of a feature-decoupling-based defect identification method for complex textured textiles according to the present disclosure. This feature-decoupling-based defect identification method for complex textured textiles includes the following steps: Step 101: Obtain the multi-scale feature set of the original textile image to obtain complex texture fusion features.

[0016] In some embodiments, the execution entity (e.g., an electronic device) of the above-described feature decoupling-based defect identification method for complex textured textiles can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as multiple software programs or software modules to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0017] In some embodiments, the executing entity can acquire a multi-scale feature set of the original textile image to obtain complex texture fusion features. The original textile image can be a surface image of the textile acquired through an industrial camera device. The multi-scale features can be multiple feature maps of different resolutions extracted from the original image.

[0018] In practice, pre-trained convolutional neural networks (e.g., ResNet and VGG) can be used as the backbone network to extract feature maps from different layers of the network. For example, firstly, feature maps from shallow layers (e.g., layer 2) are selected as small-scale features to preserve details of subtle textures and minor defects. Secondly, feature maps from deeper layers (e.g., layers 4 and 5) are selected as large-scale features to capture the overall texture structure and contextual information. Then, upsampling is used to adjust the feature maps at each scale to the same spatial resolution. Global average pooling is then performed on each scale feature map to obtain channel description vectors. The channel description vectors of each scale feature map are concatenated and input into a fully connected layer. After normalization using the Softmax function, the fusion weights for each scale are obtained. Finally, a weighted summation of the feature maps at each scale is performed to obtain the complex texture fusion features.

[0019] Step 102: Project the complex texture fusion features onto two mutually orthogonal hidden subspaces to obtain the baseline texture component and the anomalous perturbation component.

[0020] In some embodiments, the execution entity can project the complex texture fusion feature onto two mutually orthogonal hidden subspaces to obtain a reference texture component and an anomalous perturbation component. The reference texture component can be a feature belonging to the normal background texture component within the complex texture fusion feature. The anomalous perturbation component can be a feature deviating from the normal background texture component (defect region) within the complex texture fusion feature.

[0021] In some optional implementations of certain embodiments, the execution entity can project the complex texture fusion features onto two mutually orthogonal hidden subspaces to obtain the reference texture component and the anomalous perturbation component, which may include the following steps: The first step is to determine the feature tensor of the aforementioned complex texture fusion features. This feature tensor can be a multidimensional numerical matrix representing the complex texture fusion features. Alternatively, it can be a high-dimensional data representation obtained by tensorizing the complex texture fusion features.

[0022] As an example, complex texture blending features could be Then the eigenvector can be... Among them, the above This could be the number of channels. (The above...) It can be height. (The above) It can be the width. For example, the original textile image could be 224×224. Then the feature tensor could be 512×28×28.

[0023] The second step involves adaptive weight estimation of the aforementioned feature tensor to obtain a dynamic projection operator. This dynamic projection operator can be a matrix that adjusts the mapping direction in real time based on the statistical distribution of the input features.

[0024] The third step involves using the dynamic projection operator to map the feature tensor to the first hidden subspace, obtaining the reference texture component. The first hidden subspace can be a feature space representing the defect-free distribution of the textile. The reference texture component can be the background texture information of the textile in the image, conforming to normal production processes. In practice, matrix multiplication can be used for this mapping process.

[0025] The fourth step involves constructing an orthogonal complement space mapping matrix based on the aforementioned reference texture components to obtain the anomaly detection orientation operator. This anomaly detection orientation operator can be a transformation matrix that projects the signal onto a subspace perpendicular to the standard texture direction. The orthogonal complement space mapping matrix can be an operator that projects the feature tensor onto a subspace orthogonal to the reference texture components.

[0026] Fifth, the aforementioned feature tensor is mapped to the second hidden subspace using the anomaly detection orientation operator to obtain the anomaly perturbation component. The second hidden subspace can be a feature space representing the distribution of defects and anomaly regions in the textile. The second hidden subspace can also be a complement space orthogonal to the first hidden subspace.

[0027] In some optional implementations of certain embodiments, the execution entity may perform adaptive weight estimation on the feature tensor to obtain a dynamic projection operator, which may include the following steps: The first step is to perform global average pooling on the aforementioned feature tensor to obtain the channel description vector. This channel description vector can be a vector that retains the correlation information between channels after compressing the spatial dimension. The global average pooling process can be performed by averaging the spatial dimensions of the feature tensor.

[0028] The second step involves performing a nonlinear transformation mapping on the aforementioned channel description vectors to obtain the channel attention weights. These channel attention weights can represent the importance of each channel feature in constructing the baseline space. This nonlinear transformation mapping can be used to learn channel importance weights, enabling the model to adaptively focus on channels that contribute significantly to texture representation. In practice, a two-layer fully connected network and an activation function (e.g., the ReLU activation function) can be used to implement the nonlinear transformation mapping.

[0029] The third step involves weighting and recombining the preset reference projection matrix based on the aforementioned channel attention weights to obtain a preliminary projection matrix. This reference projection matrix can be a matrix defining the basic projection direction.

[0030] As an example, the reference projection matrix could be Channel attention weights can be The initial projection matrix after weighted recombination can be... The first projection matrix mentioned above... A line can be Among them, the above It can be the first of the initial projection matrices. Row vectors. (The above) It can be the first Each channel has its own attention weight. (The above...) It can be the first of the reference projection matrix Row vectors.

[0031] The fourth step is to apply a normalization constraint to the initial projection matrix to obtain the dynamic projection operator. This normalization constraint can be a method used to ensure the numerical stability of the projection operator.

[0032] As an example, each row of the initial projection matrix can be normalized using the L2 norm to obtain the dynamic projection operator.

[0033] In some optional implementations of certain embodiments, the execution entity may construct an orthogonal complement space mapping matrix based on the aforementioned reference texture components to obtain an anomaly detection orientation operator, which may include the following steps: The first step is to perform dimensionality processing on the aforementioned baseline texture components to obtain a one-dimensional texture feature vector. This dimensionality processing can be achieved by flattening the high-dimensional baseline texture components into a one-dimensional vector form.

[0034] The second step involves performing an outer product operation on the aforementioned one-dimensional texture feature vectors to obtain the texture space projection matrix. This outer product operation can be used to construct the projection matrix of the subspace spanned by the baseline texture. In practice, the texture space projection matrix can be... Among them, the above It can be a one-dimensional texture feature vector. (The above...) It can be the transpose of a one-dimensional texture feature vector. The above... It can be the square of the L2 norm of the vector.

[0035] The third step is to construct the identity matrix based on the dimensions of the aforementioned feature tensors. This identity matrix can be an identity matrix with the same dimensions as the flattened feature tensors.

[0036] As an example, the dimension of the flattened feature tensor can be... Then the identity matrix can be... The aforementioned identity matrix can have diagonal elements of 1 and all other elements of 0.

[0037] The fourth step is to determine the difference between the aforementioned unit identity matrix and the aforementioned texture space projection matrix to obtain the orthogonal projection operator. This orthogonal projection operator can be used to remove components belonging to the background texture from complex texture fusion features, while retaining anomalous perturbation components that deviate from the normal texture (defective texture), thereby achieving explicit decoupling between defective features and the background texture.

[0038] The fifth step involves performing singular value decomposition on the orthogonal projection operator to obtain the null basis vectors. This singular value decomposition can be a method used to extract the null basis of the orthogonal projection operator.

[0039] The sixth step involves a linear combination of the aforementioned null space basis vectors to obtain the anomaly detection orientation operator. This anomaly detection orientation operator can be used to map the feature tensor to the subspace containing the anomaly perturbation (textile defect texture).

[0040] Step 103: Based on the preset texture library, perform manifold alignment processing on the reference texture components to obtain texture reconstruction features.

[0041] In some embodiments, the execution entity may perform manifold alignment processing on the reference texture components based on a preset texture library to obtain texture reconstruction features. These texture reconstruction features may be features in the reference texture components that maintain consistency with the normal texture pattern of the textile.

[0042] In some optional implementations of certain embodiments, the execution entity may perform manifold alignment processing on the reference texture components based on a preset texture library to obtain texture reconstruction features, which may include the following steps: The first step is to determine the query feature vector of the aforementioned baseline texture component. This query feature vector can be a feature vector used for retrieval from a texture library. In practice, the baseline texture component can be pooled to obtain the query feature vector.

[0043] As an example, the aforementioned baseline texture component could be Among them, the above This could be the number of channels. (The above...) It can be height. (The above) It can be the width. Then the query feature vector can be... .

[0044] The second step involves performing a nearest neighbor search on the aforementioned query feature vector within the pre-defined texture library to obtain a local neighborhood prototype set. This pre-defined texture library can be a collection of feature vectors exhibiting various normal texture patterns of textiles. The nearest neighbor search can involve searching for a set of vectors in the texture library that are similar to the query feature vector. In practice, the nearest neighbor search can be performed using the K-nearest neighbor algorithm.

[0045] The third step is to determine the geodesic distances between the corresponding vectors of each local neighborhood prototype in the aforementioned local neighborhood prototype set, thus obtaining the local topological inclination matrix. Here, the geodesic distance can be the shortest path distance measured along the surface on the manifold. The geodesic distance can be used to characterize the geometric relationships of the local neighborhood prototypes in the manifold space. The local topological inclination matrix can be a matrix used to describe the geometric relationships between each local neighborhood prototype in the local neighborhood prototype set.

[0046] As an example, the aforementioned local neighborhood prototype set could be The vector of a local neighborhood prototype in the aforementioned local neighborhood prototype set can be... Geodesic distance can be The local topological correlation matrix can be... ,element It can be represented as Among them, the above It can be the first The local neighborhood prototype and the first The geodesic distance between local neighborhood prototypes. (The above) It can be a scale parameter, which can be used to control the size of the neighborhood range.

[0047] Fourth, based on the aforementioned local topological correlation matrix, the query feature vector is projected into the tangent space to obtain the first tangent vector. This first tangent vector can be the projected coordinates of the query feature vector in the local tangent space.

[0048] As an example, first, a set of weights can be determined. , making Minimum, of which, the above It can be a local topological incidence matrix The normalization of the above It can be a query feature vector, as mentioned above. It can be the first in the local topological correlation matrix The local neighborhood prototypes of each vector are then determined. The solution is then obtained to yield the first tangent vector.

[0049] The fifth step involves performing a matrix transformation on the first tangent vector to obtain a tangent space base representing the local texture flow direction. This tangent space base can be a set of orthogonal basis vectors. It can depict a subspace representing the direction of local texture change. In practice, singular value decomposition can be performed on the first tangent vector to determine the direction of change, thus obtaining the tangent space base.

[0050] Step 6: Determine the vertical projection residual of the query feature vector onto the tangent space base to obtain the nonlinear distortion component. This nonlinear distortion component can be a vector in the query feature vector that cannot be represented by the tangent space base.

[0051] As an example, the query feature vector could be The tangent space basis can be Then the projection coefficients It can be The reconstructed vector can be... Nonlinear distortion components can be The projection coefficients mentioned above can be the projection coordinates of the query feature vector on the tangent space basis.

[0052] Step 7: Perform nullification compensation on the aforementioned nonlinear distortion components to obtain the corrected manifold embedding coordinates. The nullification compensation process can be a procedure that integrates information from the nonlinear distortion components into the manifold embedding coordinates.

[0053] As an example, this can be achieved through a compensation function. For nonlinear distortion components Perform calibration Among them, the above It can be the manifold embedded coordinates, as mentioned above. A linear regression model can be used.

[0054] Step 8: Based on a preset manifold inverse mapping operator, the manifold embedding coordinates are restored to their initial dimensions to obtain the texture reconstruction features. The preset manifold inverse mapping operator can be a transformation function that maps the manifold embedding coordinates back to the original feature space.

[0055] Step 104: Perform feature fusion on the texture reconstruction features and the above-mentioned abnormal perturbation components to obtain texture residual features.

[0056] In some embodiments, the execution entity may perform feature fusion on the texture reconstruction features and the anomalous perturbation components to obtain texture residual features. These texture residual features may be features retained after filtering out normal textures. In textile production scenarios, these texture residual features can represent defect information in textiles (e.g., scratches, cracks, and stains).

[0057] In some optional implementations of certain embodiments, the execution entity may perform feature fusion on the texture reconstruction features and the anomalous perturbation components to obtain texture residual features, which may include the following steps: The first step is to determine the anomalous region mask for the aforementioned anomalous perturbation components. This anomalous region mask can be a matrix used to identify potentially defective regions within the anomalous perturbation components. This anomalous region mask can be used to locate the positions of potential defects.

[0058] The second step involves selectively masking the texture reconstruction features using the aforementioned abnormal region mask to obtain background suppression features. These background suppression features can be obtained by selectively masking the texture reconstruction features.

[0059] The third step is to determine the heterogeneity distribution between the aforementioned background suppression features and the aforementioned complex texture fusion features, thereby obtaining a preliminary residual map. This heterogeneity distribution can be a distribution map measuring the difference between the background suppression features and the complex texture fusion features. In practice, the heterogeneity distribution can be obtained by calculating the Euclidean distance pixel-by-pixel, serving as the preliminary residual map. A larger Euclidean distance indicates a higher probability of defects.

[0060] The fourth step involves performing spatial sharpening gain processing on the preliminary residual map to obtain texture residual features. This sharpening gain processing can be a filtering operation on the edges of defective regions in the preliminary residual map. The texture residual features can be the residual feature map after sharpening enhancement.

[0061] In some optional implementations of certain embodiments, the execution entity may determine the abnormal region mask of the abnormal disturbance component by including the following steps: The first step is to determine the original disturbance feature map of the above-mentioned abnormal disturbance components.

[0062] The second step involves spatial variance reduction of the original perturbation feature map to obtain local energy distribution features. This variance reduction can be a method of determining the local variance of the feature map in the spatial dimension. The local energy distribution features, obtained after variance reduction, reflect the spatial energy distribution of the anomalous perturbation. In practice, a sliding window approach can be used to calculate the variance of eigenvalues ​​in the neighborhood at each spatial location of the original perturbation feature map to obtain the local energy distribution features.

[0063] The third step involves modeling the aforementioned local energy distribution characteristics to obtain a potential defect probability map. This modeling process can be achieved by converting the local energy distribution characteristics into a probabilistic form using a mathematical model. The potential defect probability map can then be the probability distribution map obtained after this modeling process. In practice, the Sigmoid function can be used to convert the local energy distribution characteristics into a probabilistic form.

[0064] The fourth step is to determine the global average response value of the aforementioned potential defect probability map to obtain the adaptive dynamic threshold. This adaptive dynamic threshold can be a segmentation threshold used to distinguish between defective and background regions.

[0065] As an example, a potential defect probability map can be represented as follows: The adaptive dynamic threshold can be calculated as follows: Among them, the above It can be a potential defect probability map in The value of the position. (Above) It can be a preset adjustment coefficient, which can be a value between 0.5 and 2.0.

[0066] The fifth step involves applying a function mapping to the potential defect probability map using the aforementioned adaptive dynamic threshold to obtain a primary region mask. This primary region mask can be an initial binary mask after threshold segmentation. This initial binary mask can be used to identify preliminarily determined candidate defect regions. In practice, the potential defect probability map can be converted into a binary mask based on the adaptive dynamic threshold to obtain the primary region mask.

[0067] Step 6: Perform morphological closing operations on the aforementioned primary region mask to obtain candidate regions. These candidate regions can be connected regions obtained after morphological closing operations. In practice, the structuring element for the morphological closing operation can be a circular or square kernel, and the kernel size can be set based on the defect scale. For example, the kernel size can be set to... Pixel.

[0068] Step 7: Perform Gaussian spatial weighted filtering on the candidate regions to obtain anomaly region masks. These anomaly region masks can be continuous value masks obtained after Gaussian filtering.

[0069] As an example, a Gaussian kernel weight can be assigned to each pixel within the candidate region, with higher weights for pixels closer to the region center and lower weights for edge pixels, so that the mask value transitions smoothly from the region center to the edge, thus obtaining an abnormal region mask.

[0070] In some optional implementations of certain embodiments, the execution entity may selectively mask the texture reconstruction features using the aforementioned abnormal region mask to obtain background suppression features, which may include the following steps: The first step is to determine the weight matrix corresponding to the spatial location index of the aforementioned anomaly region mask. This weight matrix can be a weight distribution matrix representing the importance of each spatial location.

[0071] The second step is to smooth the weight matrix to obtain a probability distribution graph. This probability distribution graph can be a smoothed weight graph. In practice, a Gaussian filter can be applied to the weight matrix to obtain the probability distribution graph.

[0072] The third step is to perform element-wise inversion on the above probabilistic distribution map to obtain the background weight allocation map. This background weight allocation map can be a weight distribution map for suppressing abnormal regions. In practice, the element-wise inversion operation can be performed by subtracting 1 from each element in the probabilistic distribution map.

[0073] The fourth step involves element-wise multiplication of the background weight allocation map and the texture reconstruction features to obtain preliminary masking features. These preliminary masking features can be the feature map after weighted masking.

[0074] The fifth step involves filtering the initial masking features to obtain a spatially enhanced feature layer. This spatially enhanced feature layer can be the filtered feature map. In practice, median filtering can be used for this filtering process.

[0075] Step 6: Map the aforementioned spatial enhancement feature layer to a zero-mean feature space to obtain the centered background features. The zero-mean feature space can be any feature space with a mean of zero. The centered background features can be feature maps that have undergone centering processing.

[0076] As an example, first, the mean of the spatial enhancement feature layer in each channel can be determined. Then, this mean is subtracted from the corresponding channel. Finally, the centered background feature is obtained.

[0077] Step 7: Perform local threshold extraction on the above-mentioned centralized background features to obtain a local suppression intensity map. The local threshold extraction can be performed by calculating statistics (e.g., mean, variance) within the local neighborhood of the centralized background features.

[0078] Step 8: Use the local suppression intensity map to perform pixel-by-pixel scaling and calibration on the spatial enhancement feature layer to obtain the background suppression feature.

[0079] As an example, the aforementioned local suppression intensity map could be Spatial augmentation feature layers can be The background suppression feature can be... Among them, the above It can be a preset adjustment coefficient, which can be used to control the suppression intensity. For example, the above... It can be set to a value between 0.5 and 2.0.

[0080] Step 105: Perform adaptive threshold segmentation on the texture residual features to obtain the defect feature map of the original textile.

[0081] In some embodiments, the execution entity can perform adaptive thresholding segmentation on the texture residual features to obtain a defect feature map of the original textile. The adaptive thresholding segmentation can be a process of determining the separation value based on the statistical properties of the texture residual features themselves, converting the feature map into a binary image. The defect feature map can be a binary image after thresholding segmentation. The defect feature map can be used to identify the location and contour of defect regions.

[0082] As an example, firstly, the Otsu method can be used to determine the adaptive threshold for texture residual features. Then, the normalized residual map is binarized using the adaptive threshold to obtain an initial defect feature map. Finally, morphological processing can be applied to the initial defect feature map to optimize the continuity of the defect region. In textile production scenarios, morphological processing can fill in tiny holes inside defect regions and remove isolated noise points.

[0083] Step 106: Perform connected component analysis on the defect feature map and output the defect detection results.

[0084] In some embodiments, the aforementioned execution entity may perform connected component analysis on the aforementioned defect feature map and output defect detection results.

[0085] As an example, firstly, pixel connectivity rules can be determined (e.g., using an 8-neighborhood connectivity rule). Then, a seed-filling algorithm can be used to label connected components in the defect feature map, resulting in a set of connected components. Next, features are extracted from each connected component, including feature parameters (e.g., area, bounding box coordinates, and centroid coordinates). These feature parameters can be used to describe the geometric properties and spatial location of each defect region. Furthermore, based on the extracted feature parameters, each connected component is filtered to remove false defect regions caused by noise. Finally, bounding boxes for the defect regions can be drawn on the original textile image to generate a visual detection result image, serving as the defect detection result. In practice, the defect detection results can be used for rejection control of textiles produced on an assembly line.

[0086] The above-described embodiments of this disclosure have the following beneficial effects: The feature-decoupling-based defect identification method for complex textured textiles according to some embodiments of this disclosure improves the robustness of textile detection, meets the needs of real-time detection in production lines, reduces computational resources and labor costs, and improves the accuracy of textile defect identification. Specifically, the reasons for the inaccurate textile defect detection results and high computational resource consumption are: in complex texture backgrounds, minute defect features are easily overlapped with the background texture, making it difficult for existing methods to effectively distinguish them. Single-scale feature extraction does not adequately utilize minute detail information, leading to the loss of key defect information. Traditional image recognition methods rely on manual parameter tuning and multiple runs, resulting in high computational redundancy, poor generalization ability, and large computational load, making it difficult to adapt to the production needs of multi-variety, high-speed production lines. Therefore, the feature-decoupling-based defect identification method for complex textured textiles according to some embodiments of this disclosure first obtains a multi-scale feature set of the original textile image to obtain complex texture fusion features. This achieves the preservation of texture structure and defect details, avoids the problem of losing minute defect information in single-scale feature extraction, and provides a complete feature foundation for subsequent feature decoupling. Secondly, the complex texture fusion features are projected onto two mutually orthogonal hidden subspaces to obtain the baseline texture component and the anomalous perturbation component. This decouples the defect features from the background texture at the feature level, effectively solving the problem of high false detection rates caused by feature aliasing in complex texture backgrounds. Then, based on a pre-defined texture library, the baseline texture component is manifold aligned to obtain texture reconstruction features. This enhances the model's ability to model normal texture patterns, enabling it to quickly adapt to different patterns and varieties of textiles, improving the generalization ability and adaptability of the detection method to product changes. Next, the texture reconstruction features and the anomalous perturbation components are fused to obtain texture residual features. This highlights the difference between the defect area and the normal texture, reduces the impact of interference factors (e.g., illumination fluctuations and hardware state changes) on the detection results, and improves the robustness of defect detection. Furthermore, adaptive threshold segmentation is performed on the texture residual features to obtain the defect feature map of the original textile. This achieves automated defect segmentation without manual parameter setting, avoiding the problem of inconsistent detection standards caused by differences in human experience and subjective judgment. Finally, connected component analysis is performed on the aforementioned defect feature map to output the defect detection results. This completes end-to-end automated defect detection from image input to defect output. It improves the robustness of textile inspection, can be used for defect rejection control in production lines, meets the real-time inspection needs of production lines, and reduces computational resources and labor costs.

[0087] Based on the same inventive concept, embodiments of this application provide a defect identification system for complex textured textiles based on feature decoupling, including: The acquisition module is used to acquire raw textile images; A memory for storing a program for a defect identification method for complex textured textiles based on feature decoupling; The processor and memory can load and execute programs to implement a defect identification method for complex textured textiles based on feature decoupling.

[0088] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0089] This application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as a method for identifying defects in complex textured textiles based on feature decoupling.

[0090] Computer storage media include, for example, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media that can store program code.

[0091] Based on the same inventive concept, embodiments of this application provide a smart terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded and executed by the processor to identify defects in complex textured textiles based on feature decoupling.

[0092] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0093] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.

Claims

1. A method for defect identification in complex textured textiles based on feature decoupling, characterized in that, include: Obtain multi-scale feature sets from the original textile images to obtain complex texture fusion features; The complex texture fusion features are projected onto two mutually orthogonal hidden subspaces to obtain the baseline texture component and the anomalous perturbation component. Based on a preset texture library, manifold alignment processing is performed on the reference texture components to obtain texture reconstruction features. The step of performing manifold alignment processing on the reference texture components based on a preset texture library to obtain texture reconstruction features includes: determining the query feature vector of the reference texture components. Based on the query feature vector, a nearest neighbor search is performed on the preset texture library to obtain a local neighborhood prototype set; Determine the geodesic distance between the corresponding vectors of each local neighborhood prototype in the local neighborhood prototype set to obtain the local topological correlation matrix; Based on the local topological association matrix, the query feature vector is projected into the tangent space to obtain the first tangent vector; Perform matrix transformation on the first tangent vector to obtain the tangent space base that represents the local texture flow direction; Determine the vertical projection residual of the query feature vector onto the tangent space base to obtain the nonlinear distortion component; The nonlinear distortion components are nullified to obtain the corrected manifold embedding coordinates; Based on a preset manifold inverse mapping operator, the manifold embedding coordinates are restored to the initial dimension to obtain texture reconstruction features; The texture reconstruction features and the anomalous perturbation components are fused to obtain texture residual features; Adaptive threshold segmentation is performed on the texture residual features to obtain the defect feature map of the original textile. The defect feature map is subjected to connected component analysis, and the defect detection results are output.

2. The method for defect identification of complex textured textiles based on feature decoupling according to claim 1, characterized in that, The step of projecting the complex texture fusion features onto two mutually orthogonal hidden subspaces to obtain the baseline texture component and the anomalous perturbation component includes: Determine the feature tensor of the complex texture fusion feature; The feature tensor is subjected to adaptive weight estimation to obtain a dynamic projection operator; The feature tensor is mapped to the first hidden subspace using the dynamic projection operator to obtain the reference texture component; An orthogonal complement space mapping matrix is ​​constructed based on the aforementioned reference texture components to obtain an anomaly detection orientation operator; The feature tensor is mapped to the second hidden subspace using the anomaly detection orientation operator to obtain the anomaly perturbation component.

3. The method for defect identification of complex textured textiles based on feature decoupling according to claim 2, characterized in that, The step of performing adaptive weight estimation on the feature tensor to obtain the dynamic projection operator includes: The feature tensor is subjected to global average pooling to obtain the channel description vector; The channel description vector is subjected to a nonlinear transformation mapping to obtain the channel attention weights; The preset reference projection matrix is ​​weighted and reorganized based on the channel attention weights to obtain a preliminary projection matrix; The initial projection matrix is ​​subjected to normalization constraint processing to obtain the dynamic projection operator.

4. The method for defect identification of complex textured textiles based on feature decoupling according to claim 2, characterized in that, The step of constructing an orthogonal complement space mapping matrix based on the reference texture components to obtain the anomaly detection orientation operator includes: The reference texture components are subjected to dimensionality processing to obtain a one-dimensional texture feature vector; Perform an outer product operation on the one-dimensional texture feature vector to obtain the texture space projection matrix; Based on the dimension of the feature tensor, construct an identity matrix; The difference between the unit identity matrix and the texture space projection matrix is ​​determined to obtain the orthogonal projection operator; The orthogonal projection operator is subjected to singular value decomposition to obtain the null space basis vectors; Based on the linear combination of the null space basis vectors, an anomaly detection orientation operator is obtained.

5. The method for defect identification of complex textured textiles based on feature decoupling according to claim 1, characterized in that, The step of fusing the texture reconstruction features and the anomalous perturbation components to obtain texture residual features includes: Determine the abnormal region mask for the abnormal disturbance component; The texture reconstruction features are selectively masked using the abnormal region mask to obtain background suppression features; Determine the heterogeneity distribution between the background suppression features and the complex texture fusion features to obtain a preliminary residual map; The preliminary residual map is subjected to spatial dimension sharpening gain processing to obtain texture residual features.

6. The method for defect identification of complex textured textiles based on feature decoupling according to claim 5, characterized in that, The step of determining the abnormal region mask of the abnormal disturbance component includes: Determine the original disturbance feature map of the anomalous disturbance component; The original perturbation feature map is subjected to spatial dimension variance processing to obtain local energy distribution features; The local energy distribution characteristics are modeled to obtain a potential defect probability map; Determine the global average response value of the potential defect probability map to obtain an adaptive dynamic threshold; The potential defect probability map is processed by function mapping using the adaptive dynamic threshold to obtain a primary region mask; The primary region mask is subjected to morphological closing operation to obtain candidate regions; The candidate regions are subjected to Gaussian space-weighted filtering to obtain anomaly region masks.

7. The method for defect identification of complex textured textiles based on feature decoupling according to claim 5, characterized in that, The step of selectively masking the texture reconstruction features using the abnormal region mask to obtain background suppression features includes: Determine the weight matrix corresponding to the spatial location index of the abnormal region mask; The weight matrix is ​​smoothed to obtain a probability distribution map; Perform element-wise inversion on the probabilistic distribution map to obtain the background weight allocation map; The background weight allocation map and the texture reconstruction features are multiplied element-wise to obtain preliminary masking features; The initial shielding features are filtered to obtain a spatial enhancement feature layer; The spatial enhancement feature layer is mapped to the zero-mean feature space to obtain the centered background features; The centralized background features are subjected to local threshold extraction to obtain a local suppression intensity map; The spatial enhancement feature layer is scaled and calibrated pixel-by-pixel using the local suppression intensity map to obtain background suppression features.

8. A defect identification system for complex textured textiles based on feature decoupling, characterized in that, include: The acquisition module is used to acquire raw textile images; A memory for storing a program of a method for identifying defects in complex textured textiles based on feature decoupling as described in any one of claims 1 to 7; The processor and the program in the memory can be loaded and executed by the processor to implement the defect identification method for complex textured textiles based on feature decoupling as described in any one of claims 1 to 7.