Woven fabric texture reconstruction and classification method based on discriminant convolution dictionary learning

Through the method based on discriminant convolutional dictionary learning, the problem of local pattern displacement and dimensional disaster in image analysis processing is solved, and the global representation of woven fabric texture and high accuracy classification are realized.

CN119649350AActive Publication Date: 2025-03-18DONGHUA UNIV +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411678024.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-18
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively capture the displacement of local patterns in image samples in image analysis processing, and faces the problem of dimensional disaster when processing high-dimensional signals, making it difficult to implement dictionary learning methods.

Method used

Using a method based on discriminative convolutional dictionary learning, a discriminative convolutional dictionary learning model is constructed, and the high-pass components are extracted using Tikhonov regularized low-pass filtering operation, and the local convolutional dictionary and classifier weights are optimized in the model to realize the reconstruction and classification of woven fabric textures.

Benefits of technology

This method can effectively utilize the spatial information between image pixels to realize the global representation of woven fabric texture, and give the model a certain discrimination ability, improving the accuracy of image classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649350A_ABST
    Figure CN119649350A_ABST
Patent Text Reader

Abstract

The invention relates to a woven fabric texture reconstruction and classification method based on discriminant convolution dictionary learning, and the method comprises the steps: carrying out the low-pass filtering operation of all woven fabric texture images in a woven fabric texture image training set containing different types of samples, extracting the high-pass component # imgabs0 # and low-pass component # imgabs1 #, constructing a DCDL model, and carrying out the optimization solving of the model; inputting the # imgabs2 # and a corresponding category label into a DCDL model for training, and outputting a learned local convolution dictionary DL and a corresponding local classifier weight WL after training is finished; and finally, performing low-pass filtering operation on a test image yq, extracting # imgabs3 #, calculating a coding coefficient Xq corresponding to a high-pass component # imgabs4 #, reconstructing # imgabs5 # and the image yq through DL and Xq, and determining the category of the image yq through WL and Xq. According to the method, the texture of the woven fabric can be represented and classified at the same time, and classification is accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image analysis and processing, and relates to a woven fabric texture reconstruction and classification method based on discriminative convolution dictionary learning. Background Art

[0002] In sparse coding, each data sample is represented as a linear combination of a small number of dictionary columns (i.e., atoms). This representation cannot capture the displacement of local patterns in image samples. In addition, dictionary learning methods face the curse of dimensionality when dealing with high-dimensional signals, which makes the task difficult to implement. To address these two problems, many algorithms propose to extract overlapping patches from training samples and then train local models on these patches. This patch-based technique is similar to manually convolving the dictionary with the sample. However, patch-based methods are not optimal because the relationship between adjacent patches is ignored, which will result in the learned dictionary containing different shifted versions of the same pattern. Moreover, since each sample element (e.g., image pixel) appears in multiple overlapping patches, the features learned separately may not be consistent. In addition, this representation is usually highly redundant.

[0003] To address these challenges, the Convolutional Dictionary Learning (CDL) model provides an alternative approach that assumes that the signal can be represented by the sum of several filters convolved with the corresponding sparse feature maps, so it has a single numerical feature and translation invariant properties, and can characterize the entire signal. Specifically, the CDL method learns a translation invariant dictionary composed of multiple filters, which can extract the local patterns of samples at different translation positions through convolution. Therefore, the CDL method no longer needs to use overlapping blocks. In the past few years, the CDL model has become a hot topic of extensive research, and its performance has surpassed traditional dictionary learning methods in a variety of image processing applications including super-resolution, image separation, image inpainting, and image fusion.

[0004] The CDL model assumes that a signal It can be approximately represented as the sum of a set of convolutional dictionaries and their corresponding sparse feature codes. In other words, the signal Z can be decomposed into in is the convolution dictionary, represents the corresponding convolutional coding coefficient, n is the number of convolutional dictionaries, * is the convolution operator, and generally m<<M. Therefore, in the CDL model, the optimization solution for the convolutional dictionary and convolutional coding coefficient is defined as the following minimization problem:

[0005]

[0006] When the convolution dictionary d i Given, the problem becomes to find Convolutional Sparse Coding (CSC) tracking task. Expressed in matrix form: Z = DX, where is composed of the local convolution dictionary The global convolution dictionary is formed by shifting 1 pixel downward in the column direction for a total of n times. The local convolution dictionary D L Contains convolution dictionary As its atom, the global coding coefficient (also called global coding vector) X is obtained by The convolution dictionary learning problem (1) can be reformulated as:

[0007]

[0008] like Figure 1 As shown in the figure, the local block coordinate descent method (LoBCoD) proposed in the literature 1 (ALocal Block Coordinate Descent Algorithm for the CSCModel[C].2019IEEE / CVF Conference on Computer Vision and Pattern Recognition) decomposes the global encoding vector X into M non-overlapping n-dimensional local encoding vectors Therefore, the signal Z can be expressed as in represents the operator for extracting the ith m-dimensional vector in Y, then This means that the vector D L x i operator placed at the i-th position and fill the remaining elements with zeros. On the other hand, the m-dimensional vector P extracted from the signal Z i Z=P i DX=Ωγ i ,in is a D L At its center is a flat dictionary. is a vector containing the local code x i The stripe vector at its center. In short, the stripe vector γ i Responsible for coding P i Everything in Z, while the local encoding vector xi It is only responsible for encoding part of the information. The research in Reference 2 (Convolutional Dictionary Learning via Local Processing [C]. 2017 IEEE International Conference on Computer Vision) shows that if all the stripe vectors γ i are sparse, then the convolutional sparse coding problem has a unique solution and can be solved by the Orthogonal Matching Pursuit (OMP) or Basic Pursuit (BP) algorithm. Therefore, the global CSC problem (2) can be transformed into a problem about the local coding vector x i and the local convolution dictionary D L The minimization problem is:

[0009]

[0010] In order to solve the problem efficiently, instead of optimizing all local encoding vectors at once, they transform the local encoding vector x i Considered as a set of coordinates extracted from the global encoding vector X, for each x i Therefore, when D L When , the update rule for each local encoding vector is:

[0011]

[0012] definition is the local encoding vector x i The residual when not contributing, the optimization problem (4) can be rewritten as:

[0013]

[0014] Since the above minimization problem involves global variables such as R i , which can be decomposed into the following local problems:

[0015]

[0016] The reason is that, based on the observation, the local encoding vector x i The update rule of is only affected by its corresponding m-dimensional vector P i R i (Corresponding to the original image The core idea of ​​the group coordinate descent algorithm is to minimize the penalty term for a given coordinate group at each step, while keeping the latest values ​​of other coordinate groups unchanged. This is also a preprocessing stage, and the subsequent stages will update the local encoding vector in the next step based on the latest value of the local encoding vector in the previous step. In addition, this method can ensure that during the update process, each There will be no overlap between the local coding vectors of the sub-blocks of the dimensional image, so they can be updated in parallel, which is generally implemented using the LARS efficient batch processing algorithm. Specifically, the local coding vectors {x i} as a set and define it as the Lth i Layer, the LARS algorithm traverses these layers in turn and updates their respective local encoding vector sets in parallel. It is worth noting that this parallel update method can ensure that the number of internal iterations depends only on the vector P i R i The dimension m is not the local encoding vector x i The number M. Therefore, for a The total number of layers is m.

[0017] A common strategy for optimizing CDL models is to alternate between encoding vectors and dictionary update steps within a predefined number of iterations. The purpose of the dictionary update step is to constrain each convolutional dictionary d to be i (dictionary atom), find the minimum value of the quadratic term in formula (3), that is:

[0018]

[0019] As a random online dictionary updating method, LoBCoD usually uses a small step size and finds only a few x i Instead of moving forward in the direction of the global gradient after completing the entire tracking phase, the dictionary is updated after each dictionary update. i Normalize.

[0020] The traditional (convolutional) dictionary learning method belongs to the unsupervised type, that is, the labels of the training samples are not considered in the filter training stage, and its role is only used as a feature extractor. In order to complete the classification task, some scholars have proposed a discriminant (convolutional) dictionary learning method that adds discriminant terms in the optimization process. For example, the Fisher discrimination dictionary learning method proposed in document 3 (Fisher discrimination dictionary learning for sparse representation [C]. 2011 international conference on computer vision) regards the complete dictionary as consisting of category sub-dictionaries and imposes Fisher discrimination criterion constraints on it. The DL-COPAR method proposed in document 4 (A classification-oriented dictionary learning model: Explicitly learning the particularity and commonality across categories [J]. Pattern Recognition, 2014, 47 (2): 885-898.) adds a shared dictionary to the Fisher discrimination dictionary learning method to extract similar background features of the input image. Furthermore, the CSDL method proposed in reference 5 (Learning category-specific dictionary and shared dictionary for fine-grained image categorization[J].IEEE Transactions on Image Processing, 2013, 23(2):623-634.) weights the incoherent terms of the objective function with the number of features to reduce the impact of feature size in dictionary learning.The D-KSVD method proposed in reference 6 (Discriminative K-SVD for dictionary learning in face recognition [C]. 2010 IEEE computer society conference on computer vision and pattern recognition) and the LC-KSVD method proposed in reference 7 (Label consistent K-SVD: Learning a discriminative dictionary for recognition [J]. IEEE transactions on pattern analysis and machine intelligence, 2013, 35 (11): 2651-2664.) add classification error loss terms to the objective function to improve the discriminability of the dictionary. The disadvantages of the above methods are that, first, they can only effectively process local blocks of the input image and cannot take the global image as the overall input model. Second, they increase the complexity of the model objective function, the optimization process is more difficult and time-consuming, and it is easy to fall into the local optimum instead of the global optimum.

[0021] In addition, some scholars have proposed to use other classifiers to complete the classification task. Reference 8 (Convolutional sparse coding classification model for image classification [C]. 2016 IEEE International Conference on Image Processing) and Reference 9 (Convolutional sparse coding for face recognition [C]. 2017 4th International Conference on Information, Cybernetics and Computational Social Systems) proposed a convolutional sparse coding classification (CSCC) model that introduced labels during the training phase and used it for image classification tasks. The CSCC model combines the convolutional sparse coding framework with the traditional sparse representation classification (SRC) method. However, the model relies on an ADMM solver operating in the Fourier frequency domain, and therefore loses its connection with the block-based paradigm.

[0022] In order to meet this challenge, the paper 10 (Convolutional Dictionary Learning via Local Processing [C]. 2017 IEEE International Conference on Computer Vision) proposed a slice-based dictionary learning (SBDL) method. This method starts from a local perspective and does not need to convert the time domain into the frequency domain. Instead, it directly trains the filter in the time domain. Compared with the CSCC method using Fourier transform, the SBDL method shows stronger performance. However, this method only considers the reconstruction error and the sparsity of the convolutional coding coefficients, which makes it perform well in application fields such as image reconstruction and image fusion, but does not optimize the convolutional coding coefficients for classification tasks. In other words, although the learned convolutional dictionary has a strong representation ability, it lacks a certain discrimination ability.

[0023] In summary, existing (convolutional) dictionary learning methods show some obvious limitations and deficiencies in image reconstruction and classification tasks, resulting in significant restrictions in practicality and wide applicability.

[0024] Therefore, it is of great significance to study a woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning to solve the problems existing in the prior art. Summary of the invention

[0025] The purpose of the present invention is to solve the problems existing in the prior art and to provide a woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning.

[0026] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0027] A woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning is proposed. Firstly, all woven fabric texture images in the woven fabric texture image training set containing samples of different categories are subjected to low-pass filtering based on Tikhonov regularization to extract their high-pass components and low-pass components, and a discriminative convolutional dictionary learning model (DCDL) is constructed and the model is optimized and solved. Then, the high-pass components and corresponding category labels corresponding to the woven fabric texture sample images in the training set are input into the discriminative convolutional dictionary learning model for training. After the training, the learned local convolutional dictionary D is output. L and the corresponding local classifier weight W L ; Finally, for the test image y q , first perform a low-pass filtering operation based on Tikhonov regularization to extract the low-pass component Then calculate its high-pass component The corresponding coding coefficient X q , and finally through D L and X q For high-pass components and the test image y q Reconstruction, through W L and X q To determine the test image y q Category of;

[0028] The constructed discriminative convolutional dictionary learning model is:

[0029]

[0030] Among them, Y is the training sample set, D is the global convolution dictionary, X is the global encoding coefficient, λ is the regularization parameter used to control the sparsity of the convolutional encoding coefficient, and γ is the regularization parameter that controls the proportion of the balanced classifier loss in the total loss function; is the total number of training sample sets, n i is the number of samples in the i-th training sample set, and C is the number of categories of samples in the training sample set; Represents the training sample y i,jThe true label of (the jth sample in the i-th sample set), for the jth sample y in the i-th sample set i,j , and its corresponding convolutional coding coefficient is If y i,j belongs to category c (i.e. when i = c), then H i,j The other elements in are 0; is the training sample y i,j The predicted label of To predict the label and the true label H i,j The cross-entropy discriminant loss function of the difference between L There is no corresponding relationship between the actual labels of the training samples. i,j =WX i,j Compute the output of the independent classifier

[0031]

[0032] Among them, X i,j is the convolutional coding coefficient corresponding to the jth sample in the i-th class sample set, and W is the global classifier weight;

[0033] The discriminative convolutional dictionary learning model constructed by the present invention directly decomposes the input image into two key components: a series of convolution kernels (convolutional dictionary) and a corresponding feature map (convolutional coding coefficient). By performing convolution operations on these two components and then adding the results, a reconstructed image corresponding to the original input image can be obtained. Since the convolution operation is translationally invariant (corresponding to the periodicity of woven fabric texture), it can effectively utilize the spatial information between image pixels and naturally capture the local pattern of the texture and its spatial continuity (corresponding to the spatial randomness of the woven fabric texture), thereby achieving a global representation of the woven fabric texture. In addition, in order to give the model a certain discriminative ability, an independent classifier is designed. The independent classifier can be combined with the convolutional coding coefficient learning to obtain the classifier weight. The model construction idea is as follows: Figure 2 It is worth noting that the discriminative convolutional dictionary learning model is an end-to-end model. Instead of training an independent classifier after outputting the convolutional coding coefficients, the model optimizes the convolutional dictionary, convolutional coding coefficients, and classifier weight set as a whole in the same loss function.

[0034] As the preferred technical solution:

[0035] The above-mentioned woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning has the following specific steps:

[0036] (1) For a woven fabric texture image training set containing C samples, define is the i-th type training sample set, where is the jth sample of the i-th category, n i Yes i The number of samples, that is, the number of training samples of the i-th category; define the local convolution dictionary set D L =[d1,…,d p ,…,d n ],in is the pth convolution dictionary, n is the number of different dictionary atoms in the local convolution dictionary set; defines the convolution coding coefficient set of the i-th sample in Contains M local encoding vectors, used to reconstruct sample y i,j ;

[0037] (2) performing a low-pass filtering operation based on Tikhonov regularization (Tikhonov regularization is a prior art, see the literature Tikhonov regularization and total least squares [J]. SIAM journal on matrix analysis and applications, 1999, 21 (1): 185-194.) on all woven fabric texture images in the training set to extract their high-pass component and low-pass component;

[0038] (3) Construct a discriminative convolutional dictionary learning model and iteratively update and solve the model using the gradient descent method; the discriminative convolutional dictionary learning model includes a reconstruction error term and a classifier loss term; the classifier Z i,j =WX i,j It is just a simple linear transformation. It can be replaced by various more complex nonlinear transformations based on neural networks. However, considering that the texture structure of woven fabrics is relatively simple, such a complex network structure is not needed, otherwise it may cause overfitting problems. The solution includes the solution of local encoding vectors, local convolutional dictionaries and local classifier weights.

[0039] (4) Hyperparameter initialization, i.e. setting the local convolution dictionary D L Neutron Dictionary d p The size and number of, as well as the regularization parameter λ used to control the sparsity of the convolutional coding coefficients, the regularization parameter γ used to balance the proportion of the classifier loss in the total loss function, and the maximum number of iterations;

[0040] (5) The high-pass components and corresponding category labels corresponding to the woven fabric texture sample images in the training set are input into the discriminative convolutional dictionary learning model for training until the training round reaches the maximum number of iterations, that is, the training is stopped; after the training of the discriminative convolutional dictionary learning model is completed, the learned local convolutional dictionary D is output L and the corresponding local classifier weight W L ;

[0041] (6) For the test image y q First, perform a low-pass filtering operation based on Tikhonov regularization to extract its low-pass component Then calculate its high-pass component The corresponding coding coefficient X q , and finally through D L and X q For high-pass components and the test image y q Reconstruction, through W L and X q To determine the test image y q Category.

[0042] In the above-mentioned woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning, the low-pass filtering operation based on Tikhonov regularization in step (2) is formulated as the following optimization problem:

[0043]

[0044] Among them, σ represents the Tikhonov regularization coefficient, which is used to balance the ratio between data fidelity and smoothness, and G i It is an operator that calculates the discrete gradient of the image in the i-th dimension; this optimization problem is usually solved by numerical optimization methods such as gradient descent or conjugate gradient.

[0045] As described above, in the method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning, in step (3), the discriminative convolutional dictionary learning model is iteratively updated and solved using the gradient descent method. In each iteration, the local convolutional dictionary D L and the local classifier weight W L The update steps are as follows:

[0046]

[0047] in, is an operator that normalizes dictionary atoms, η represents the step size of each iterative update, Denote the objective function (8) for the local convolution dictionary D L The gradient of The objective function (8) represents the weight W of the local classifier. L gradient.

[0048] The specific solution process is as follows: For the global discriminant optimization problem of formula (8), use the local encoding vector Local convolution dictionary D L and the local classifier weight W L It can be expressed as:

[0049]

[0050] By fixing Right D L and W L Update and fix D L and W L right Update to achieve alternating optimization D L , W L and First, suppose D L and W L is fixed, then for the jth sample of the ith category, its kth local encoding vector The update rule can be written as:

[0051]

[0052] Similar to the LoBCoD method, each local encoding vector x k is considered as a set of coordinates taken from the global encoding vector X, and each set of coordinates is optimized separately:

[0053]

[0054] Similarly, define and

[0055]

[0056] For D L The goal of updating is to find the minimum value of the quadratic term in (14) while satisfying the constraint of normalizing all dictionary atoms:

[0057]

[0058] Update W L The goal of this stage is to solve the following optimization problem:

[0059]

[0060] Due to D L and WL The update process of is independent, and these two update stages are performed simultaneously. In order to solve equations (18) and (19) more efficiently, the projected fastest gradient descent method can be used. Specifically, first derive the objective function in equation (18) relative to D L The gradient of is:

[0061]

[0062] The objective function in formula (17) is relative to W L The gradient of is:

[0063]

[0064] Then, along the above gradient direction, take a smaller step size η to update D L and W L , and at the same time in each iteration the current D L Normalize all columns of until convergence. The mathematical expression for updating the local convolution dictionary is:

[0065]

[0066] in is an operator that normalizes dictionary atoms. The mathematical expression for updating the weights of the local classifier is:

[0067]

[0068] As described above, in the method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning, the local convolutional dictionary D in step (4) L Neutron Dictionary d p The size and number of are 5×5 and 80 respectively, the regularization parameter λ for controlling the sparsity of the convolutional coding coefficients is 0.01, the regularization parameter γ for balancing the proportion of the classifier loss in the total loss function is 1.0, and the maximum number of iterations is 200.

[0069] As described above, a woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning is implemented by using D L and X q For high-pass components and the test image y q Reconstruction is performed, specifically, the high-pass component is reconstructed by equation (22), and the test image is reconstructed by equation (23);

[0070]

[0071] in, for The local encoding vector of Contains M local encoding vectors.

[0072] As described above, a woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning is described in step (6). L and X q To determine the test image y q The category of the test image y is determined by formula (24) q Category of;

[0073]

[0074] in, The index corresponding to the largest element in is the sample y to be queried q Category No.

[0075]

[0076] As described above, in the woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning, the woven fabric texture image is a grayscale image with a bit depth of 8 bits or more.

[0077] Beneficial effects:

[0078] The invention discloses a woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning. The discriminative convolutional dictionary learning model constructed draws on the convolution operation in the convolutional neural network, and can effectively utilize the spatial information between image pixels to achieve the global representation of the woven fabric texture. Meanwhile, through the design of an independent classifier and the convolutional coding coefficient learning to obtain the classifier weight, the constructed model is endowed with the classification ability of the fabric texture. Moreover, the model is an end-to-end model, that is, instead of training the independent classifier after outputting the convolutional coding coefficient, the convolutional dictionary, the convolutional coding coefficient and the classifier weight set are optimized as a whole in the same loss function, so that the woven fabric texture can be represented and classified at the same time, and the classification is accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 It is a schematic diagram of the local group coordinate descent (LoBCoD) model;

[0080] Figure 2 This is a diagram of the idea of ​​constructing the discriminative convolutional dictionary learning model of the present invention;

[0081] Figure 3 It is a flow chart of a woven fabric texture reconstruction and classification method based on discriminative convolution dictionary learning of the present invention;

[0082] Figure 4 is a schematic diagram of a woven fabric texture sample;

[0083] Figure 5 It is a curve showing the change of the loss function value during the training process of the discriminative convolutional dictionary learning model of the present invention;

[0084] Figure 6 is the local convolution dictionary D L Visualization results, where (a) shows the untrained local convolution dictionary, and (b) shows the trained local convolution dictionary;

[0085] Figure 7 is the local classifier weight W L Visualization results, where (a) shows the untrained local classifier weights, and (b) shows the trained local classifier weights;

[0086] Figure 8 (a) is the high-pass component corresponding to the woven fabric texture sample image, Figure 8 (b) is the high-pass component reconstructed using the present invention, Figure 8 (c) is the original woven fabric texture sample image, Figure 8 (d) is a sample image of woven fabric texture reconstructed using the present invention.

[0087] Fig. 9 (a) is the low-pass component of the plain fabric texture sample, Fig. 9 (b) is the visualization result of the corresponding convolutional coding coefficients;

[0088] Fig.10 (a) is the low-pass component of eight five-fly weft satin fabric texture samples. Fig.10 (b) is the visualization result of the corresponding convolutional coding coefficients;

[0089] Fig.11 (a) is the low-pass component of the perforated tissue texture sample, Fig.11 (b) is the visualization result of the corresponding convolutional coding coefficients;

[0090] Fig.12 (a) is the low-pass component of the honeycomb texture sample, Fig.12 (b) is the visualization result of the corresponding convolutional coding coefficients;

[0091] Fig.13 (a) is the low-pass component of the wick tissue texture sample, Fig.13 (b) is the visualization result of the corresponding convolutional coding coefficients;

[0092] Fig.14 (a) is the low-pass component of the horizontal convex stripe texture sample, Fig.14 (b) is the visualization result of its corresponding convolutional coding coefficients. DETAILED DESCRIPTION

[0093] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0094] A woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning, the specific steps are as follows:

[0095] (1) For a woven fabric texture image training set containing C samples, define is the i-th type training sample set, where is the jth sample of the i-th category, n i Yes i The number of samples; define the local convolution dictionary set D L =[d1,…,d p ,…,d n ],in is the pth convolution dictionary, n is the number of different dictionary atoms in the local convolution dictionary set; defines the convolution coding coefficient set of the i-th sample in Contains M local encoding vectors, used to reconstruct sample y i,j ;

[0096] Among them, the woven fabric texture image is a grayscale image with a bit depth of 8 bits or more;

[0097] (2) Perform a low-pass filtering operation based on Tikhonov regularization on all woven fabric texture images in the training set to extract their high-pass and low-pass components.

[0098] The low-pass filtering operation based on Tikhonov regularization is formulated as the following optimization problem:

[0099]

[0100] Among them, σ represents the Tikhonov regularization coefficient, G i is the operator that calculates the discrete gradient of the image in the i-th dimension, y q is the test image;

[0101] (3) Construct a discriminative convolutional dictionary learning model and iteratively update the model using the gradient descent method to solve it; the discriminative convolutional dictionary learning model includes a reconstruction error term and a classifier loss term; the solution includes the solution of the local encoding vector, the local convolutional dictionary and the local classifier weight;

[0102] The constructed discriminative convolutional dictionary learning model is:

[0103]

[0104] Among them, Y is the training sample set, D is the global convolution dictionary, X is the global encoding coefficient, λ is the regularization parameter used to control the sparsity of the convolutional encoding coefficient, and γ is the regularization parameter that controls the proportion of the balanced classifier loss in the total loss function; is the total number of training sample sets, n i is the number of samples in the i-th training sample set, and C is the number of categories of samples in the training sample set; Represents the training sample y i,j The true label if y i,j Belongs to category c, then H i,j The other elements in are 0; is the training sample y i,j The predicted label of To predict the label and the true label H i,j The cross entropy discriminant loss function of the difference between ;

[0105]

[0106] Among them, X i,j is the convolutional coding coefficient corresponding to the jth sample in the i-th class sample set, and W is the global classifier weight;

[0107] The discriminative convolution dictionary learning model is iteratively updated using the gradient descent method. In each iteration, the local convolution dictionary D L and the local classifier weight W L The update steps are as follows:

[0108]

[0109] in, is an operator that normalizes dictionary atoms, η represents the step size of each iterative update, Denote the objective function (ii) for the local convolution dictionary D L The gradient of Represents the objective function (ii) for the local classifier weight W L The gradient of

[0110] (4) Hyperparameter initialization, i.e. setting the local convolution dictionary D L Neutron Dictionary d pThe size and number of, as well as the regularization parameter λ used to control the sparsity of the convolutional coding coefficients, the regularization parameter γ used to balance the proportion of the classifier loss in the total loss function, and the maximum number of iterations;

[0111] Among them, d p The size and number of are 5×5 and 80 respectively, λ=0.01,γ=1.0, and the maximum number of iterations is 200;

[0112] (5) The high-pass components and corresponding category labels corresponding to the woven fabric texture sample images in the training set are input into the discriminative convolutional dictionary learning model for training until the training round reaches the maximum number of iterations, that is, the training is stopped; after the training of the discriminative convolutional dictionary learning model is completed, the learned local convolutional dictionary D is output L and the corresponding local classifier weight W L ;

[0113] (6) For the test image y q First, perform a low-pass filtering operation based on Tikhonov regularization to extract its low-pass component Then calculate its high-pass component The corresponding coding coefficient X q , and finally reconstruct the high-pass component through formula (ⅶ) Reconstruct the test image y through formula (ⅷ) q , determine the test image y through formula (ⅸ) q Category of;

[0114]

[0115] in, for The local encoding vector of Contains M local encoding vectors; The index corresponding to the largest element in is the sample y to be queried q Category No.

[0116] The following is a specific embodiment to illustrate a woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning of the present invention, as follows:

[0117] Figure 3 The method of the present invention is not limited to the hardware and programming language used to run it, and can be written in any language, so other working modes will not be described in detail.

[0118] This embodiment is built on a high-performance computing server for model training. The specific hardware configuration is a 32-core Intel E5-2620v4 CPU, running at a frequency of 2.10GHz, equipped with 64GB of system memory, four NVIDIA GeForce RTX 2080 graphics cards, and each graphics card has 8GB of video memory. In terms of software environment, the development and training of the model are based on the Ubuntu 22.04 operating system, using the Python 3 programming environment, the Pytorch 2.1.2 deep learning platform, and using CUDA 12.3 for GPU acceleration, realizing a woven fabric texture reconstruction and classification method based on discriminative convolution dictionary learning in the present invention.

[0119] (1) Collect 100 images of woven fabric textures of 16 different categories with a bit depth of 8 bits, including plain weave, one-up-three-down right twill, eight-piece five-fly weft satin, fancy square weave, four-up-two-down reinforced twill, two-up-one-down two-up-three-down composite twill, reed twill, reinforced satin I, reinforced satin II, checkered weave, crepe weave, openwork weave, honeycomb weave, loose weave, wicker weave and transverse rib weave, for a total of N=1600 images. The categories are numbered sequentially from 01 to 16, and their size is 512×512 pixels;

[0120] (2) 80 images are randomly selected from each category of woven fabric texture images as the training set, and the remaining images are used as the test set. All woven fabric texture images in the training set are subjected to a low-pass filtering operation based on Tikhonov regularization, and their high-pass components and low-pass components are extracted and displayed in Figure 8 (a) and Figures 9 to 14 (a);

[0121] (3) Construct a discriminative convolutional dictionary learning model and use the gradient descent method to iteratively update the model; the discriminative convolutional dictionary learning model includes a reconstruction error term and a classifier loss term; the solution includes the solution of the local encoding vector, the local convolutional dictionary and the local classifier weight. The solution results of the local convolutional dictionary and the local classifier weight are shown in Figure 6 (b) with Figure 7 (b); The convolutional coding coefficients composed of these local coding vectors are shown in Figures 9 to 14 (b);

[0122] The constructed discriminative convolutional dictionary learning model is:

[0123]

[0124] Among them, n i =80, C=16, Training sample set One of its column vectors represents the jth training set sample from the i-th class. The training set samples from different classes (column vectors) can be reassembled into a size of The matrix is ​​shown in Figure 4 ; It consists of a local convolution dictionary Constructed, constructed as Figure 1 As shown, D L Each column in can be reassembled into a The matrix is ​​shown in Figure 6 ; One of its column vectors is the convolutional coding coefficient corresponding to the j-th training set sample of the i-th category; is the global classifier weight, which is composed of the local classifier weight Constructed and displayed in Figure 7 ; For the real label H i,j , if y i,j Belongs to category c, then H i,j The other elements in are 0;

[0125] (4) Hyperparameter initialization, i.e. setting the local convolution dictionary D L Neutron Dictionary d p The size and number of, as well as the regularization parameter λ used to control the sparsity of the convolutional coding coefficients, the regularization parameter γ used to balance the proportion of the classifier loss in the total loss function, and the maximum number of iterations;

[0126] Among them, d p The size and number of are 5×5 and 80 respectively, λ=0.01,γ=1.0, and the maximum number of iterations is 200;

[0127] (5) Inputting the high-pass components and corresponding category labels corresponding to the woven fabric texture sample images in the training set into the discriminative convolutional dictionary learning model for training until the training round reaches the maximum number of iterations, i.e., stopping the training; Figure 5 The figure shows a smooth curve in which the loss function value gradually decreases as the number of iterations increases during the training process. It can be seen from the figure that the loss function value decreases significantly during the iteration process and tends to be flat after about 200 iterations, indicating that the model has reached a convergence state.

[0128] After the discriminative convolutional dictionary learning model is trained, the learned local convolutional dictionary D is output L and the corresponding local classifier weight W L ;like Figure 6 Shown is the local convolution dictionary D L The visualization results are as follows: Figure 7 Shown is the local classifier weight WL Visualization results of

[0129] (6) For the test image y q First, perform a low-pass filtering operation based on Tikhonov regularization to extract its low-pass component Then calculate its high-pass component The corresponding coding coefficient X q , and finally through D L and X q For high-pass components and the test image y q Reconstruction, through W L and X q To determine the test image y q Category of;

[0130] Table 1 shows the average reconstruction and classification performance indicators of woven fabric texture images with different organizational structures, where PSNR (Peak Signal-to-Noise Ratio) is the peak signal-to-noise ratio and SSIM (Structural Similarity) is the structural similarity.

[0131] Table 1

[0132]

[0133] It can be seen from the data in Table 1 that, first, the method of the present invention can perform excellently in the reconstruction tasks of various types of woven fabric textures. Specifically, the peak signal-to-noise ratio of each category reached above 31.9 dB, the structural similarity was higher than 97.5%, and the average peak signal-to-noise ratio and structural similarity were 34.02 dB and 98.0984%, respectively; second, the model also showed a high accuracy in the woven fabric texture classification task, indicating that the model has a strong texture analysis and recognition ability. Specifically, the classification accuracy of each category was higher than 99%, and the average classification accuracy was 99.19%.

Claims

1. A woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning, characterized by: Firstly, all the woven fabric texture images in the woven fabric texture image training set containing samples of different categories are subjected to low-pass filtering based on Tikhonov regularization, and their high-pass components and low-pass components are extracted. A discriminative convolutional dictionary learning model is constructed and the model is optimized and solved. Then, the high-pass components and corresponding category labels corresponding to the woven fabric texture sample images in the training set are input into the discriminative convolutional dictionary learning model for training. After the training, the learned local convolutional dictionary D is output. L and the corresponding local classifier weight W L ; Finally, for the test image y q , first perform a low-pass filtering operation based on Tikhonov regularization to extract the low-pass component Then calculate its high-pass component The corresponding coding coefficient X q , and finally through D L and X q For high-pass components and the test image y q Reconstruction, through W L and X q To determine the test image y q Category of; The constructed discriminative convolutional dictionary learning model is: Among them, Y is the training sample set, D is the global convolution dictionary, X is the global encoding coefficient, λ is the regularization parameter used to control the sparsity of the convolutional encoding coefficient, and γ is the regularization parameter that controls the proportion of the balanced classifier loss in the total loss function; is the total number of training sample sets, n i is the number of samples in the i-th training sample set, and C is the number of categories of samples in the training sample set; Represents the training sample y i,j The true label if y i,j Belongs to category c, then H i,j The other elements in are 0; is the training sample y i,j The predicted label of To predict the label and the true label H i,j The cross entropy discriminant loss function of the difference between ; Among them, X i,j is the convolutional coding coefficient corresponding to the jth sample in the i-th class sample set, and W is the global classifier weight.

2. The method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning according to claim 1, characterized in that: The specific steps are as follows: (1) For a woven fabric texture image training set containing C samples, define is the i-th type training sample set, where is the jth sample of the i-th category, n i Yes i The number of samples; define the local convolution dictionary set D L =[d1,…,d p ,…,d n ],in is the pth convolution dictionary, n is the number of different dictionary atoms in the local convolution dictionary set; defines the convolution coding coefficient set of the i-th sample in Contains M local encoding vectors, used to reconstruct sample y i,j ; (2) Perform a low-pass filtering operation based on Tikhonov regularization on all woven fabric texture images in the training set to extract their high-pass component and low-pass component; (3) Construct a discriminative convolutional dictionary learning model and iteratively update the model using the gradient descent method to solve it; the discriminative convolutional dictionary learning model includes a reconstruction error term and a classifier loss term; the solution includes the solution of the local encoding vector, the local convolutional dictionary and the local classifier weight; (4) Hyperparameter initialization, i.e. setting the local convolution dictionary D L Neutron Dictionary d p The size and number of, as well as the regularization parameter λ used to control the sparsity of the convolutional coding coefficients, the regularization parameter γ used to balance the proportion of the classifier loss in the total loss function, and the maximum number of iterations; (5) The high-pass components and corresponding category labels corresponding to the woven fabric texture sample images in the training set are input into the discriminative convolutional dictionary learning model for training until the training round reaches the maximum number of iterations, that is, the training is stopped; after the training of the discriminative convolutional dictionary learning model is completed, the learned local convolutional dictionary D is output L and the corresponding local classifier weight W L ; (6) For the test image y q First, perform a low-pass filtering operation based on Tikhonov regularization to extract its low-pass component Then calculate its high-pass component The corresponding coding coefficient X q , and finally through D L and X q For high-pass components and the test image y q Reconstruction, through W L and X q To determine the test image y q Category.

3. The method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning according to claim 2, characterized in that: The low-pass filtering operation based on Tikhonov regularization in step (2) is formulated as the following optimization problem: Among them, σ represents the Tikhonov regularization coefficient, G i It is an operator that calculates the discrete gradient of an image in the i-th dimension.

4. The method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning according to claim 2, characterized in that: In step (3), the discriminative convolutional dictionary learning model is iteratively updated using the gradient descent method. In each iteration, the local convolutional dictionary D L and the local classifier weight W L The update steps are as follows: in, is an operator that normalizes dictionary atoms, η represents the step size of each iterative update, Denote the objective function (8) for the local convolution dictionary D L The gradient of The objective function (8) represents the weight W of the local classifier. L gradient.

5. The method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning according to claim 2, characterized in that: Step (4) p The size and number of are 5×5 and 80 respectively, λ=0.01,γ=1.0, and the maximum number of iterations is 200.

6. The method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning according to claim 2, characterized in that: In step (6), D L and X q For high-pass components and the test image y q Reconstruction is performed, specifically, the high-pass component is reconstructed by equation (22), and the test image is reconstructed by equation (23); in, for The local encoding vector of Contains M local encoding vectors.

7. The method for woven fabric texture reconstruction and classification based on discriminative convolutional dictionary learning according to claim 2, characterized in that: In step (6), W L and X q To determine the test image y q The category of the test image y is determined by formula (24) q Category of; in, The index corresponding to the largest element in is the sample y to be queried q Category No.

8. A woven fabric texture reconstruction and classification method based on discriminative convolutional dictionary learning according to claim 1 or 2, characterized in that: The woven fabric texture image is a grayscale image with a bit depth of 8 bits or more.

Citation Information

Patent Citations

  • Image decomposition method based on convolution and K-SVD dictionary joint sparse coding

    CN112734763A

  • Textile defect image classification method based on intra-class difference suppression discrimination dictionary learning

    CN115018814A

  • Image classification method based on adaptive local ordinal preserving analysis dictionary learning

    CN115601591A