Disclosure of Invention
In order to solve the problems in the background art, the invention provides a DCT-based weighted adaptive tensor data complement method, which comprises the following steps:
s1: storing the visual data to be complemented as an original tensor to be complemented in a three-dimensional form, and storing the original tensor to be complementedMapping to obtain initialized target tensor->Target tensor->Copying to obtain N copy tensors, wherein N=3;
s2: tensor of the objectThe mth copy tensor->Decomposition into singular values using DCT-based mode-m SVD (Singular Value Decomposition, SVD)Tensor and calculate +.>The method comprises the steps of (1) establishing a first tensor complement model by taking the mode-m multi-rank minimum of all copy tensors as an optimization target, wherein m=1, 2 and 3;
s3: will beThe mode-m multi-rank of the model is converted into a nuclear norm expression to obtain a second tensor complement model;
s4: solving a second tensor completion model by adopting an augmented Lagrangian method and an alternate direction multiplier ADMM method to obtain a target tensorThe optimal solution of the (4) is obtained to obtain the final complement result.
Further, the original tensor to be complemented is formedMapping to obtain initialized target tensor->Comprising the following steps:
wherein, omega is an index set,representing a linear projection operator, i.e. setting the value of the missing element position to 0, the value of the known element position remains unchanged, +.>Is->Is complementary to (a)And (3) operating.
Further, the first tensor complement model includes:
wherein ,λm Representing the mth copy tensorRegularization parameter, ω, of mode-m multi-rank m Representing copy tensor +.>Weight of->For intermediate process tensor +.>For the target tensor->Tensors to be complemented for the original; />Is a vector with length of copy tensor +.>Tensor S after mode-mSVD decomposition m The number of slices in the mth dimension, where the mode-mSVD decomposition of the tensor is defined as:
is tensor->Conjugate transpose of m Representing a mode-mDCT transform tensor product;
wherein ,r i represents the i-th rank of the multiple ranks, < +.>Representing tensor->Mode-m tensor transform of +.>I-th slice representing tensor S in the m-th dimension, +.>Representing an ith slice of the tensor S in an mth dimension after mode-m tensor transformation, and rank (·) represents the rank of the matrix;
Zhang Liangthe mode-m tensor transform of (c) is defined as follows:
wherein ,for linear transformation operator, ++>Representing the real number field, n m Representing tensor->Size in the m-th dimension.
Further, the second tensor complement model includes:
wherein ,representing tensor->Nuclear norms at the mth modality.
Further, the solving the second tensor complement model includes:
introducing an augmented lagrangian operator into the second tensor complement model to obtain an augmented lagrangian function expressed as:
wherein Λ is an augmented Lagrangian operator, 1 (·) is an indication function, ρ is a penalty coefficient, and II·II F The Frobenius norm representing the tensor;
for a pair ofAnd Λ to update the solution, ++>And Λ the updated formula under the ADMM framework is as follows:
ρ [k+1] =ηρ [k]
when (when)When threshold represents a preset threshold value, the current +.>And obtaining a final complement result, wherein k represents the iteration times, and eta represents a constant coefficient.
Further, the regularization parameters and the weight parameters of the second tensor complement model are adaptively updated in the solving process of the second tensor complement model, and the updating process is as follows:
s41: defining a target tensorSingular value tensor after mode-mSVD decomposition +.>Definitions->The parameter of the p-th slice in the m-th dimension is +.>Then:
where j > i, j+.m, i+.m, diag denote converting the vector into a diagonal matrix,representation->P-th slice in the m-th dimension, < >>Representation->Number of slices in the m-th dimension, n i Representing tensor->Size in the ith dimension, n j Representing tensor->Size in the j-th dimension, n m Representing tensor->Size in the m-th dimension;
s42: calculation ofWhen exceeding threshold T->And lambda is the minimum value of m and ωm The updated formula of (c) is as follows:
where μ represents a constant parameter.
The invention has at least the following beneficial effects
Compared with the tensor complement method based on DFT, the DCT has the advantages of lower calculation complexity and less real number, and the complement efficiency of tensor is greatly improved; and carrying out self-adaptive updating on parameters in the model through each iteration, wherein the lower the weight of regularized parameters obtained by the mode with better low-rank representation effect is, the smaller the value is. When the singular value distribution of the m-mode cosine transform tensor SVD is reduced faster (or slower) than other modes, the low rank of the m-th mode is stronger (or weaker) than that of the other modes, so that the tensor complement precision is improved.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the illustrations provided in the following embodiments merely illustrate the basic idea of the present invention by way of illustration, and the following embodiments and features in the embodiments may be combined with each other without conflict.
Referring to fig. 1, the present invention provides a DCT-based weighted adaptive tensor data completion method, comprising:
s1: storing the visual data to be complemented as an original tensor to be complemented in a three-dimensional form, and storing the original tensor to be complementedMapping to obtain initialized target tensor->Target tensor->Copying to obtain N copy tensors, wherein N=3;
in this embodiment, the visual data to be complemented is incomplete original visual data, such as a color image, a color video, and the like, and the method is applied to the problem of the complementation of the original visual data, and the original visual data is unavoidably caused by the reasons of acquisition equipment or signal interference, and the like, so that a certain influence is generated on the later visual data processing flow, the working efficiency of staff is reduced, and the original visual file with the missing items is read in through a Matlab software piece and stored as a tensor in a three-dimensional form to obtain an original tensor to be complemented; the index positions of all known pixel points of the visual data to be complemented are taken to form an observation index set omega, and the tensor to be complemented is obtained according to the originalTarget tensor after initialization->So that the mapping relation satisfies: /> wherein ,Ω⊥ Complement to Ω, missing index set, +.>Representing the target tensor +.>Is a known entry of->Known entry representing the original tensor to be complemented,/->Representing the target tensor +.>Is a missing entry for (1); thus the original to-be-complemented tensor +.>Mapping to obtain initialized target tensor->Comprising the following steps: />Wherein omega is an index set, and ∈>Representing a linear projection operator, i.e. setting the value of the missing element position to 0, the value of the known element position remains unchanged, +.>Is->Is a complementary operation of (a).
The copying of the tensor in this embodiment can be done using a clone () function and a delete () function, which has three copy tensors for the three-dimensional tensor.
S2: tensor of the objectThe mth copy tensor->Decomposing into singular value tensors using DCT-based mode-m SVD and calculating +.>The method comprises the steps of (1) establishing a first tensor complement model by taking the mode-m multi-rank minimum of all copy tensors as an optimization target, wherein m=1, 2 and 3; the m-mode SVD based on DCT is used, and complementary information existing in all modes of tensors is effectively utilized to obtain better complement performance. Meanwhile, a tensor SVD based on DCT (discrete cosine transform) may provide lower complexity than other transforms (such as FFT).
The tensor completion problem in step S2 is to finally complete the missing part of the tensor by observing a small part of the data of the unknown tensor. Tensor complementation is a special case of tensor perception in fact, which is equivalent to replacing the tensor of the tensor perception with tensor of a single element, knowing the specific position of each sampling result, using a single mode for visual data may lead to little effective information of the mode under a certain missing condition, and the information of the single mode is reduced due to different missing forms, so that the tensor is complemented by integrating the information of three modes of the tensor.
Further, the first tensor complement model includes:
wherein ,λm Representing the mth copy tensorRegularization parameter, ω, of mode-m multi-rank m Representing copy tensor +.>Weight of->For intermediate process tensor +.>For the target tensor->Tensors to be complemented for the original; />Is a vector with length of copy tensor +.>Tensor S after mode-mSVD decomposition m The number of slices in the mth dimension, where the mode-mSVD decomposition of the tensor is defined as:
is tensor->Is used for the conjugate transpose of (a),* m representing a mode-mDCT transform tensor product;
wherein ,r i represents the i-th rank of the multiple ranks, < +.>Representing tensor->Mode-m tensor transform of +.>Representing tensor->Ith slice in the mth dimension, +.>Representing an ith slice of the tensor S in an mth dimension after mode-m tensor transformation, and rank (·) represents the rank of the matrix;
Zhang Liangthe mode-m tensor transform of (c) is defined as follows:
wherein ,for linear transformation operator, ++>Representing the real number field, n m Representing tensor->Size in the m-th dimension.
S3: will beThe mode-m multi-rank of the model is converted into a nuclear norm expression to obtain a second tensor complement model;
further, the second tensor complement model includes:
wherein ,representing tensor->Nuclear norms at the mth modality. The tensor kernel norm is the best convex approximation of the tensor multi-rank, and the kernel norm minimization can obtain the best approximate solution of the tensor multi-rank.
S4: solving a second tensor completion model by adopting an augmented Lagrangian method and an alternate direction multiplier ADMM method to obtain a target tensorThe optimal solution of the (4) is obtained to obtain the final complement result.
Further, the second tensor complement model includes:
wherein ,representing tensor->Nuclear norms at the mth modality.
Referring to fig. 2, further, the solving the second tensor complement model includes:
introducing an augmented lagrangian operator into the second tensor complement model to obtain an augmented lagrangian function expressed as:
wherein Λ is an augmented Lagrangian operator, 1 (·) is an indication function, ρ is a penalty coefficient, and II·II F The Frobenius norm representing the tensor;
for a pair ofAnd Λ to update the solution, ++>And Λ the updated formula under the ADMM framework is as follows:
ρ [k+1] =ηρ [k]
when (when)When threshold represents a preset threshold value, the current +.>And obtaining a final complement result, wherein k represents the iteration times, and Λ represents a constant coefficient. the value of threshold in the present invention is 0.8.
Further, the regularization parameters and the weight parameters of the second tensor complement model are adaptively updated in the solving process of the second tensor complement model, and the updating process is as follows:
s41: defining a target tensorSingular value tensor after mode-mSVD decomposition +.>Definitions->The parameter of the p-th slice in the m-th dimension is +.>Then:
where j > i, j+.m, i+.m, diag denote converting the vector into a diagonal matrix,representation->P-th slice in the m-th dimension, < >>Representation->Number of slices in the m-th dimension, n i Representing tensor->Size in the ith dimension, n j Representing tensor->Size in the j-th dimension, n m Representing tensor->Size in the m-th dimension;
s42: calculation ofWhen exceeding threshold T->And lambda is the minimum value of m and ωm The updated formula of (c) is as follows:
where μ represents a constant parameter. In the present invention, μ has a value of 1.75.
Preferably, a specific embodiment for solving the second tensor complement model initializes parameters corresponding to the three modesΛ=0,ρ [0] >0,η>0,ρ [0] The value of 0.01 in the present invention, and the value of η in the present invention is 1.3, and the final output-complemented tensor χ is solved by using the above-described method for solving the second tensor-complement model, as shown in fig. 2.
Compared with the tensor complement method based on DFT, the DCT has the advantages of lower calculation complexity and less real number, and the complement efficiency of tensor is greatly improved; and carrying out self-adaptive updating on parameters in the model through each iteration, wherein the lower the weight of regularized parameters obtained by the mode with better low-rank representation effect is, the smaller the value is. When the singular value distribution of the m-mode cosine transform tensor SVD is reduced faster (or slower) than other modes, the low rank of the m-th mode is stronger (or weaker) than that of the other modes, so that the tensor complement precision is improved.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
Finally, it is noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the present invention, which is intended to be covered by the claims of the present invention.