Abnormality detection method and device for image data and storage medium
By fusing spectral and spatial features and optimizing the alternating direction multiplier algorithm, the problem of difficult identification of abnormal targets in scenes with strong background noise in traditional methods is solved, achieving high-precision anomaly detection and fast calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2025-07-09
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional image anomaly detection methods struggle to accurately identify anomalous targets in scenes with strong background noise and where the anomalous target is similar to the background. They neglect the close correlation between spectral features and spatial context information, resulting in poor detection performance.
By fusing spectral and spatial features of image data, a joint feature matrix is constructed. The alternating direction multiplier algorithm is used for low-rank sparse decomposition. Combined with a multi-feedback mechanism and non-convex regularization strategy, the anomaly detection model is optimized, and the model parameters are dynamically adjusted to improve detection accuracy.
It improves the accuracy and precision of abnormal target identification in complex backgrounds, enhances the model's adaptability to dynamic backgrounds, reduces the number of iterations, and improves computational and detection efficiency.
Smart Images

Figure CN120852791B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus and storage medium for anomaly detection of image data. Background Technology
[0002] In anomaly detection tasks based on image data, the core idea is to effectively distinguish between background components and anomalous targets in an image. Typically, anomalous targets appear as pixels or regions with low probability distribution characteristics and high spectral / spatial variability, while background information exhibits strong low-rank structure characteristics and spatial continuity, with relatively smooth and predictable changes.
[0003] However, traditional image anomaly detection methods often model spectral features and spatial context information separately. This means they first extract and analyze spectral features individually, then process the spatial information independently, ignoring the close correlation and complementarity between the two. This results in poor detection performance against complex backgrounds, especially in scenes with strong background noise and where the anomaly is similar to the background, making it difficult to accurately identify anomalous targets. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide an anomaly detection method, apparatus, and storage medium for image data, to eliminate or improve one or more defects existing in the prior art. It can solve the problem of difficulty in accurately identifying anomalous targets in scenes with strong background noise and where the anomalous target is similar to the background.
[0005] One aspect of the present invention provides an anomaly detection method for image data, the method comprising the following steps:
[0006] Spectral and spatial features are extracted from the image data respectively. The extracted spectral and spatial features are then fused to construct a joint feature matrix containing both spatial and spectral information.
[0007] The joint feature matrix is input into a pre-constructed anomaly detection model. The anomaly detection model uses the alternating direction multiplier algorithm to solve the low-rank sparse decomposition problem, separating the background low-rank and anomalous sparse components from the joint feature matrix. The objective function of the low-rank sparse decomposition includes a data fidelity term, a regularization term, and a band weight term. The regularization term includes low-rank constraints and sparsity constraints, and the band weight term applies to the low-rank constraints in a weighted manner. During the model solution process, iterative optimization is used, sequentially updating the background low-rank tensor, the anomalous sparse tensor, and the Lagrange multipliers. The sparsity constraint weights are adjusted based on the sparsity of the updated anomalous sparse tensor, and the band weight term is adjusted using the entropy weight method. The penalty parameters of the alternating direction multiplier algorithm are adjusted based on the convergence of the background reconstruction error of the background low-rank tensor. The above iterative process is repeated until the preset termination condition is met.
[0008] When the preset termination condition is met, the L2 norm is calculated pixel by pixel based on the abnormal sparse tensor currently output by the anomaly detection model to obtain the anomaly score map corresponding to the image data. The abnormal targets in the image data are determined by comparing the score threshold with the anomaly score map.
[0009] In some embodiments of the present invention, the L2 norm is calculated pixel-by-pixel based on the abnormal sparse tensor currently output by the anomaly detection model to obtain an anomaly score map corresponding to the image data. Anomaly targets in the image data are determined by comparing the score threshold with the anomaly score map, including:
[0010] By using a pre-built background dictionary, sparse coding is performed on the non-zero elements in the abnormally sparse tensor to obtain the sparse coding result.
[0011] Calculate the reconstruction error between each non-zero element and its corresponding sparse coding result;
[0012] Abnormal sparse tensors are filtered by a preset noise threshold, and non-zero elements with reconstruction errors less than the preset noise threshold are removed.
[0013] The L2 norm is calculated pixel-by-pixel based on the filtered abnormal sparse tensor to obtain the anomaly score map; the anomaly score map includes the anomaly score of the background region and the anomaly score of the abnormal region.
[0014] The score threshold is obtained by multiplying the median of the abnormal scores in the background region by a preset coefficient.
[0015] Each score in the anomaly score map is compared with a score threshold, and the abnormal regions in the image data with scores greater than the score threshold are identified as abnormal targets.
[0016] In some embodiments of the present invention, after comparing each score in the abnormal score map with a score threshold, and identifying abnormal regions in the image data with scores greater than the score threshold as abnormal targets, the method further includes:
[0017] Based on the current background low-rank tensor and background dictionary, calculate the anomaly detection residual corresponding to the current background region to obtain the residual matrix;
[0018] The residual standard deviation is calculated based on each element in the residual matrix;
[0019] The elements in the residual matrix are filtered based on the residual standard deviation. The background region pixels corresponding to the residuals with amplitudes greater than twice the residual standard deviation are identified and removed from the background region.
[0020] Based on the remaining background region pixels, an online non-negative matrix factorization algorithm is used to iteratively optimize the background dictionary, and dictionary atoms with a usage frequency lower than a preset threshold are deleted.
[0021] In some embodiments of the present invention, a non-convex low-rank approximation strategy is introduced into the alternating direction multiplier method algorithm; after the background low-rank tensor is updated, the updated background low-rank tensor is subjected to non-convex regularization processing by generalized weighted singular value thresholding; the non-convex regularization processing uses a non-convex penalty function to approximate the low-rank characteristics.
[0022] In some embodiments of the present invention, spectral feature extraction and spatial feature extraction are performed on the image data, including:
[0023] Principal component analysis is used to extract spectral features from image data to obtain global-scale spectral features.
[0024] The spectral characteristics at the local scale are obtained by calculating the first and / or second derivatives between the bands.
[0025] Spatial features are extracted from image data by using multiple convolutional kernels of different scales to obtain spatial features at different scales.
[0026] In some embodiments of the present invention, reaching a preset termination condition includes:
[0027] In each iteration, the reconstruction residual is calculated based on the currently updated background low-rank tensor, anomalous sparse tensor, and joint feature matrix;
[0028] When the relative rate of change of the reconstructed residual obtained in the current iteration is less than the rate of change threshold, the reconstructed residual is determined to have converged, and the preset termination condition is met.
[0029] In some embodiments of the present invention, if the reconstructed residual does not meet the convergence condition after reaching a preset number of iterations, the method further includes:
[0030] Adjust the threshold used to determine the rate of change of the residual so that the adjusted rate of change threshold is higher than the original rate of change threshold.
[0031] In some embodiments of the present invention, after determining abnormal targets in the image data by comparing a scoring threshold and an abnormal scoring map, the method further includes:
[0032] The abnormal target is identified, and the target identification result is obtained;
[0033] Based on the target recognition results, abnormal target information is labeled in the image data, including the type, location information, or confidence level information of the abnormal target.
[0034] Another aspect of the present invention provides an anomaly detection apparatus for image data, the apparatus comprising: a processor, a memory, and a computer program / instructions stored in the memory, the processor being configured to execute the computer program / instructions, and when the computer program / instructions are executed, the apparatus performing the steps of the aforementioned anomaly detection method for image data.
[0035] Another aspect of the present invention provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the aforementioned anomaly detection method for image data.
[0036] The present invention provides an anomaly detection method and apparatus for image data, which can solve the problem of accurately identifying anomalies in scenes with strong background noise and where the anomaly is similar to the background. By designing a multi-scale feature fusion mechanism, combining multi-scale information of spectral and spatial features, the method captures detailed features of hyperspectral data at different scales and fuses the two types of features to obtain a joint feature matrix, thereby improving the model's ability to distinguish anomalies in complex scenes and thus improving the accuracy of anomaly identification. At the same time, by combining a multi-feedback mechanism and using an iterative optimization method, the method performs background suppression and anomaly separation on the image data in each detection process. After each detection, the model parameters are automatically adjusted based on the current feedback information, thereby further improving the detection accuracy of the model.
[0037] Furthermore, the alternating direction multiplier method based on multi-step acceleration, by introducing generalized weighted singular value thresholding and dynamic learning rate adjustment strategies, can significantly reduce the number of iterations and improve overall computational efficiency, thereby improving the efficiency of the anomaly detection model in processing image data and detecting anomalous targets. At the same time, by introducing an adaptive non-convex regularization strategy, the regularization parameters can be dynamically adjusted to more accurately approximate the tensor tube rank. Compared with the relaxation approximation of the traditional convex kernel norm, non-convex regularization can better characterize the low-rank characteristics of the background, thereby improving the accuracy of background modeling, especially significantly improving the anomaly detection accuracy in complex background scenes.
[0038] Furthermore, to handle dynamic backgrounds and complex scenes, noisy elements in the background dictionary are progressively removed through abnormal residuals to generate a clean background dictionary. This allows for continuous adaptive adjustment of the dictionary content during optimization, improving adaptability to dynamic backgrounds while reducing noise interference with detection results, thus enhancing the purity of background separation and the robustness of anomaly detection. Simultaneously, the dynamic dictionary design allows the model to flexibly adapt to dynamic changes in the background during optimization, improving its adaptability to complex backgrounds and enabling the model to maintain high detection performance even in noisy environments.
[0039] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.
[0040] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0041] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings:
[0042] Figure 1 This is a flowchart of an anomaly detection method for image data provided in an embodiment of the present invention.
[0043] Figure 2 A block diagram of an anomaly detection device for image data provided in another embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0045] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0046] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0047] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0048] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0049] The anomaly detection method for image data provided in this application will be described in detail below.
[0050] like Figure 1 As shown, embodiments of this application provide an anomaly detection method for image data, the method comprising at least the following steps S101 to S103:
[0051] Step S101: Spectral feature extraction and spatial feature extraction are performed on the image data respectively. The extracted spectral features and spatial features are fused to construct a joint feature matrix containing spatial and spectral information.
[0052] Image data refers to data acquired through image sensors, including but not limited to hyperspectral image data acquired by hyperspectral image sensors (such as stacked scan imaging spectrometers, Fourier transform spectrometers, liquid crystal tunable filters, etc.), remote sensing image data acquired by remote sensing image sensors (such as multispectral scanners, synthetic aperture radar, lidar, etc.), medical image data acquired by medical image sensors (such as phased array probes, multilayer spiral detector arrays), or monitoring image data acquired by monitoring equipment.
[0053] In practice, the image data can also be image data collected by other sensors (such as neuromorphic vision sensors) or image data obtained from the Internet. This embodiment does not limit the method of acquiring image data.
[0054] In some embodiments of the present invention, hyperspectral image data is used as an example for illustration. Hyperspectral image data contains information in multiple bands. During the image data acquisition stage, hyperspectral image data is acquired using a hyperspectral imaging system equipped with a hyperspectral image sensor.
[0055] Since the size of the anomalous targets to be detected in different detection scenarios is usually different (e.g., 1×1 pixel, 5×5 pixel, etc.), an excessively high spatial sampling rate will lead to redundancy in the acquired image data and increase the computational burden; while an excessively low spatial sampling rate may cause the acquired image data to lose the features of the anomalous targets. Therefore, in order to ensure that the spatial details of anomalous targets can be effectively captured, an appropriate spatial sampling rate needs to be set before acquiring image data.
[0056] In high-precision anomaly detection scenarios (such as detecting vehicles, man-made structures, etc.), a spatial sampling rate of 0.5-2 meters per pixel is set to capture the features of small targets in the scene. In medium-resolution detection scenarios (such as detecting vehicles, man-made structures, etc.), a spatial sampling rate of 2-5 meters per pixel is set to balance detection efficiency and accuracy. In large-scale, rapid screening scenarios (such as mineral exploration), a spatial sampling rate of 5-10 meters per pixel is set.
[0057] In the above scenarios, the spatial sampling rate range is primarily set for the visible-near infrared (VNIR, 400~1000nm) band, and can be appropriately relaxed in the short-wave infrared (SWIR, 1000~2500nm) band (limited by the lower signal-to-noise ratio in this band). The actual sampling rate design needs to be optimized in conjunction with sensor parameters (such as focal length and pixel size) and follows the Nyquist sampling theorem: when the sampling frequency is more than twice the target spatial frequency, spectral aliasing can be effectively avoided.
[0058] In addition, when the spatial sampling rate is too high, resulting in an excessive amount of image data (e.g., single scene data > 1GB), an adaptive resolution adjustment strategy (e.g., bilinear interpolation algorithm) can be used for controllable downsampling. This effectively reduces the data processing burden and improves system operating efficiency while ensuring that key features are not lost.
[0059] After image data is acquired by sensors, image preprocessing is required to ensure image data quality. In some embodiments of the present invention, different types of image data may use different or the same image preprocessing methods. Image preprocessing includes at least: data standardization and noise reduction.
[0060] Data standardization refers to the process of transforming data of different dimensions or magnitudes to a uniform scale. Methods include, but are not limited to, Z-score normalization or Min-Max normalization. Noise reduction refers to the process of improving data quality by smoothing or filtering out random noise in an image. Methods include, but are not limited to, Gaussian filtering or Morphological operations.
[0061] In practice, image preprocessing may also include histogram equalization, gamma correction, bilateral filtering, and morphological operations. This embodiment does not limit the implementation of image preprocessing.
[0062] After preprocessing the image data, spectral features are extracted using spectral decomposition, and spatial features are extracted using spatial filtering. The extracted spectral and spatial features are then fused to construct a joint feature matrix containing both spatial and spectral information, providing comprehensive data support for subsequent anomaly detection.
[0063] In some embodiments of the present invention, the spectral analysis techniques include principal component analysis (PCA), non-negative matrix factorization (NMF), or band difference techniques, which decompose the original image data through spectral analysis techniques. Extracting the first p principal multiplications and reducing the dimensionality to obtain the spectral features, represented as... Spatial filtering techniques involve sampling multi-scale convolutional kernels to extract spatial feature textures, resulting in spatial features, represented as... .
[0064] In some embodiments of the present invention, spectral features and spatial features are spliced along the feature dimension and fused to obtain a joint feature matrix.
[0065] Specifically, the joint characteristic matrix can be represented by the following formula:
[0066]
[0067] In the formula, Represents the joint characteristic matrix; Indicates spectral characteristics; Representing spatial characteristics; These represent the height and width, respectively, i.e., the spatial dimensions; Indicates the number of spectral bands; Represents the spatial feature dimension.
[0068] In other embodiments of the present invention, spectral features and spatial features are weighted and fused according to preset importance weights. The preset importance weights include preset spectral weight α and preset spatial weight 1-α. The value of α can be adjusted according to actual needs, such as 0.5, 0.4 or 0.3, etc. This embodiment does not limit the value of α.
[0069] In practical implementation, spectral and spatial features can be dynamically fused through a spectral-spatial cross-attention mechanism. This mechanism establishes a dynamic relationship between spectral and spatial data, allowing them to mutually guide feature fusion. This includes using spectral features as queries to retrieve relevant context from the spatial neighborhood; and using spatial features as key-value pairs to provide local structural information, ultimately outputting enhanced features with joint spectral-spatial representation capabilities.
[0070] Furthermore, existing methods typically extract spectral or spatial information at a single scale, neglecting the characteristics of image data at different scales. For example, large targets may require global scale analysis, while small targets require more refined local scale features. This single-scale feature extraction approach struggles to comprehensively capture the complex information of both the target and the background, reducing the model's ability to detect various anomalous targets.
[0071] Based on this, in order to solve the technical problems of the prior art, in some embodiments of the present invention, the spectral features are multi-scale spectral features, including global-scale spectral features and local-scale spectral features. The spatial features are multi-scale spatial features, such as small-scale spatial features and large-scale spatial features.
[0072] Global-scale spectral features refer to the top p principal components extracted through spectral analysis (e.g., the first three principal components obtained using principal component analysis), used to characterize the overall spectral trend of the image data. Local-scale spectral features include features obtained by calculating the first and second derivatives between bands, used to characterize subtle spectral variations. The first derivative between bands reflects the steepness of the spectral curve, while the second derivative reflects its curvature. Combining global-scale (PCA principal components) and local-scale (band derivatives) models allows for the simultaneous modeling of both the overall trend and local abrupt changes in hyperspectral data.
[0073] Spatial multi-scale features include those achieved through convolutional kernels of different sizes (e.g., 3D). 3, 5 7 The spatial features extracted include small-sized convolutional kernels (e.g., 3D). 3) Used to capture local details in image data (e.g., point-like anomalous targets), large-size convolutional kernels (e.g., 7) 7) Used to capture regional consistency (e.g., large-area anomalies).
[0074] Specifically, spectral feature extraction and spatial feature extraction are performed on the image data, including: extracting spectral features from the image data through principal component analysis to obtain global-scale spectral features; obtaining local-scale spectral features by calculating the first and / or second derivatives between bands; and extracting spatial features from the image data through multiple convolution kernels of different scales to obtain spatial features of different scales.
[0075] Step S102: Input the joint feature matrix into the pre-built anomaly detection model.
[0076] The anomaly detection model employs the alternating direction multiplier algorithm to solve the low-rank sparse decomposition problem, separating the background low-rank and anomaly sparsity from the joint feature matrix. The basic objective function (optimization problem) can be expressed as follows:
[0077]
[0078] In the formula, F represents the joint feature matrix; L represents the background low-rank tensor; and E represents the coefficient anomaly tensor. This represents the low-rank constraint, i.e., the nuclear norm of the background low-rank tensor; It represents sparse constraints, promotes the sparsity of anomalous sparse tensors, and is used for structural sparse modeling. This represents the sparse constraint weights.
[0079] In some embodiments of the present invention, the anomaly detection model introduces a multi-feedback mechanism. Through iterative optimization, background suppression and abnormal target separation are performed on the image data during each anomaly detection process. After each anomaly detection, the parameters of the anomaly detection model are automatically adjusted according to the current anomaly detection result to improve the detection accuracy of the model.
[0080] Specifically, the joint feature matrix is input into a pre-built anomaly detection model, and background low-rank and anomaly sparsity are separated from the joint feature matrix. The model parameters are then adjusted based on the background low-rank and anomaly sparsity.
[0081] In some embodiments of the present invention, the objective function of the low-rank sparse decomposition includes a data fidelity term, a regularization term, and a band weight term. The regularization term includes low-rank constraints and sparsity constraints, and the band weight term applies a weighted average to the low-rank constraints.
[0082] Combining the Alternating Direction Method of Multipliers (ADMM) algorithm, the objective function can be expressed as follows:
[0083]
[0084] In the formula, The background low-rank tensor is represented by an adaptive non-convex regularization method to approximate the tensor rank. Represents the coefficient anomaly tensor, used to label anomalous targets; This represents the low-rank constraint, i.e., the nuclear norm of the background low-rank tensor; This represents a sparsity constraint used to promote the sparsity of anomalous sparse tensors, i.e., the quantized anomalous residual magnitudes. Indicates the sparse constraint weights; Represents the Lagrange multipliers; This represents the penalty parameter of the alternating direction multiplier algorithm; This represents the band weighting term. The value range is 1 to ,in, Let F represent the number of spectral bands, and let F represent the joint characteristic matrix. This indicates the calculation of the Frobenius norm.
[0085] During the model solution process, an iterative approach is used for optimization, sequentially updating the background low-rank tensor. Anomalous sparse tensors and Lagrange multipliers In some embodiments of the present invention, a multi-step accelerated alternating direction multiplier algorithm is employed for solving the problem. During the solution process, a prediction-correction strategy, a penalty parameter dynamic adjustment strategy, and a parallel computing strategy are used to accelerate the solution, enabling the algorithm to approach the optimal solution more quickly and reducing the number of iterations by approximately 30% to 50%.
[0086] The prediction-correction strategy refers to predicting the direction of variable updates for the next step (e.g., background low-rank tensor) based on the current gradient information in each iteration. and anomalous sparse tensors ), and then through Lagrange multipliers Adjust the error to reduce invalid iterations. Simultaneously, introduce a momentum term into the gradient update; for example, use the Nesterov gradient acceleration method to pre-calculate the gradient at future positions, thus more accurately predicting the location of the next point. This also helps avoid oscillations and stabilize the convergence path.
[0087] Most existing low-rank tensor representation methods use convex kernel norms to approximate the tensor tube rank. This method separates the target from the background by decomposing hyperspectral data into a low-rank background component and a sparse anomaly component. The convex kernel norm, as a relaxed alternative to the tensor tube rank, can transform the problem into a convex optimization problem, thereby reducing computational complexity. However, while this relaxed approximation reduces the complexity of the optimization problem, it limits the accurate characterization of low-rank properties.
[0088] Because convex kernel norms cannot accurately approximate the true rank of a tensor, they are prone to bias in background modeling, often resulting in suboptimal separation results against complex backgrounds in hyperspectral data. This is especially true when anomalous targets are weak or the background is complex, as the low-rank background may contain some anomalous information, thus affecting detection performance.
[0089] Based on this, in order to solve the technical problems of the prior art, in some embodiments of the present invention, a non-convex low-rank approximation strategy is also introduced in the alternating direction multiplier method algorithm; after the background low-rank tensor is updated, the updated background low-rank tensor is subjected to non-convex regularization processing through generalized weighted singular value thresholding (GWSVT); the non-convex regularization processing uses a non-convex penalty function to approximate the low-rank characteristics.
[0090] Specifically, in each iteration, after the background low-rank tensor is updated, singular value decomposition (SVD) is performed on the updated background low-rank tensor to extract singular value vectors. Weights are assigned according to the magnitude of the singular values. Compared with traditional singular value thresholding (SVT), which shrinks the singular values by the same magnitude, generalized weighted singular value thresholding can dynamically assign the shrinkage threshold according to the importance of the singular values (such as the first p principal components), retain key information, avoid over-compression of effective signals, reduce compression loss of principal components, and make low-rank backtracking converge faster, saving 20% to 40% of optimization time, while suppressing noise more efficiently.
[0091] After assigning a shrinkage threshold, a non-convex regularization approximation is used, that is, a weighted non-convex penalty function (such as Log-Sum Penalty) is applied to shrink the singular values, and the background low-rank tensor is reconstructed based on the shrunken singular values. Compared with the traditional convex kernel norm, the non-convex regularization approximation can more accurately determine the low-rank property of the tensor, thereby reducing redundant iterations.
[0092] The penalty parameter dynamic adjustment strategy refers to an adaptive penalty parameter adjustment strategy achieved through exponential decay. In the early stages of iteration, a larger step size is used to accelerate convergence, while fine-tuning is performed in the later stages to improve stability.
[0093] Parallel computing strategies refer to combining hardware acceleration (such as GPUs, DPUs, etc.) to solve subproblems (including the background low-rank tensor) of the alternating direction multiplier method algorithm in parallel. Anomalous sparse tensor E and Lagrange multipliers (update), to obtain the updated background low-rank tensor Anomalous sparse tensors and Lagrange multipliers .
[0094] In each iteration, the background low-rank tensor is updated. Anomalous sparse tensors and Lagrange multipliers Subsequently, the model parameters in the anomaly detection model are optimized collaboratively through multiple feedback mechanisms. These multiple feedback mechanisms include at least the following:
[0095] The first method is a feedback adjustment mechanism for the sparse constraint weights λ. Specifically, the sparse constraint weights λ are adjusted based on the sparsity of the updated abnormally sparse tensor.
[0096] After each iteration update, the abnormal residual amplitude In cases where the value is too large, the sparsity constraint can be dynamically enhanced using an indicator function. The adjustment process of the sparsity constraint weight λ can be expressed by the following formula:
[0097]
[0098] In the formula, Represents the sparse constraint weights in the t-th iteration; The sparse constraint weights are represented in the (t+1)th iteration; exp() represents the natural exponential function; The residual magnitude represents the quantized value. First, calculate the residual magnitude for each column of the anomalous sparse tensor obtained in the t-th iteration. Norm, then calculate the result The norm is obtained; The preset residual threshold is used as a reference benchmark to determine whether the residual is too large. It is usually taken as the statistical measure of the residual of normal samples.
[0099] The second type is the band weighting term. The feedback and adjustment mechanism.
[0100] After each iteration, when there are significant differences in the spectral band responses, the band weights are adjusted using the entropy weighting method. The adjustment process can be represented by the following formula:
[0101]
[0102] In the formula, This represents the band weight corresponding to round t+1; This represents an anomalously sparse tensor; This represents calculating the sum of the values of each column of the anomalous sparse tensor for the b-th band. The result obtained from norm; This represents the summation index variable, with a value range from 1 to B; This indicates the smoothing term.
[0103] The third method is a feedback adjustment mechanism for the penalty parameter ρ. Based on the convergence of the background reconstruction error using the low-rank background tensor, the penalty parameter ρ of the alternating direction multiplier method is adjusted.
[0104] In a series of iterations (e.g., 3, 5, etc.), if the rate of change of the background reconstruction error exceeds a preset threshold, it is determined that the error has not converged. In this case, the penalty parameter needs to be dynamically adjusted to accelerate convergence. The background reconstruction error is used to evaluate the reconstruction quality of the current low-rank background tensor L. Given the true background tensor, the background reconstruction error in the t-th iteration can be expressed as:
[0105]
[0106] In the formula, Represents the real background tensor; Denotes the background low-rank tensor of the t-th iteration; This represents the background reconstruction error in the t-th iteration.
[0107] When the true background tensor is unknown, the error can be defined by the difference between two consecutive background estimates, and can be expressed as:
[0108]
[0109] In the formula, This represents the background low-rank tensor in round t-1; Denotes the background low-rank tensor of the t-th iteration; This represents the background reconstruction error in the t-th iteration.
[0110] Specifically, when the background reconstruction error has not converged, the penalty parameter ρ is dynamically adjusted, for example... The value of A can be, but is not limited to, 1.1, 1.2 or 1.05. This embodiment does not limit the value of A.
[0111] Alternatively, the aforementioned adaptive penalty parameter adjustment strategy achieved through exponential decay can be adopted. In actual implementation, the adaptive penalty parameter adjustment strategy and the feedback adjustment mechanism of the penalty parameter ρ can be selected based on the actual effect. This embodiment does not limit the adjustment method of the penalty parameter ρ.
[0112] In practice, the parameters adjusted through the multi-feedback mechanism can also include other parameters, such as the learning rate of the alternating direction multiplier algorithm. This embodiment does not limit the number or type of parameters adjusted by the multi-feedback mechanism.
[0113] With the adjusted parameters including the learning rate of the alternating direction multiplier algorithm, after each iteration, the reconstruction residual between the background low-rank tensor L, the anomalously sparse tensor E, and the joint feature matrix X is calculated. The learning rate is the Frobenius norm of the joint feature matrix X minus the estimated background low-rank tensor L and anomalous sparse tensor E obtained in the current iteration. This value reflects how well the current model fits the joint feature matrix X. The learning rate is dynamically adjusted based on the magnitude of the difference: the learning rate is increased when the difference is large to accelerate convergence, and decreased when the optimal solution is approached to refine the search.
[0114] Furthermore, in practical multi-feedback mechanisms, the model's convergence speed is negatively correlated with the feedback frequency, while the model's detection accuracy is positively correlated with the feedback frequency. Based on this, in some embodiments of the present invention, the feedback rate of the multi-feedback mechanism can be adjusted according to actual conditions and needs. For example, a feedback adjustment of the model parameters can be performed after 3-5 iterations. Compared to performing a feedback adjustment every iteration, performing a feedback adjustment every 5 iterations reduces computation time by 37% and reduces the loss of detection accuracy by <2%. This embodiment does not limit the relationship between the number of iterations and the number of feedback adjustments.
[0115] In some embodiments of the present invention, the anomaly detection model also introduces a dynamic stopping rule. During the repeated iterations described above, when a preset termination condition is met, the iteration stops and the current anomalous sparse tensor and background low-rank tensor are output.
[0116] Specifically, during the iteration process, the preset termination condition can be considered to have been reached when any one of the following conditions is met:
[0117] The first type is residual convergence.
[0118] If the relative residual change rate is lower than a preset residual threshold, the residual can be considered to have converged, i.e., the preset termination condition has been met. Here, the relative residual change rate refers to the rate at which the reconstructed residuals are obtained in two adjacent iterations. The percentage change of can be expressed by the following formula:
[0119]
[0120] In the formula, Represents the reconstruction residual in the t-th iteration; This represents the reconstruction residual in the (t-1)th iteration; This represents the preset threshold for the rate of change of residuals.
[0121] Specifically, in each iteration, the reconstruction residual is calculated based on the currently updated background low-rank tensor, abnormally sparse tensor, and joint feature matrix. When the relative rate of change of the reconstruction residual obtained in the current iteration and the reconstruction residual obtained in the previous iteration is less than the rate of change threshold, the residual convergence is determined, and the preset termination condition is met.
[0122] Furthermore, if the reconstructed residuals fail to converge after multiple iterations (e.g., 3, 4, etc.), the rate of change threshold can be relaxed to accelerate convergence. For example, the initial strict rate of change threshold could be... If convergence is not achieved after three consecutive iterations, the threshold is relaxed to... By dynamically adjusting the threshold of the residual rate of change, the convergence speed can be accelerated, which can be improved by 22% compared to a fixed threshold.
[0123] Specifically, if the reconstructed residual does not meet the convergence condition after reaching the preset number of iterations, the method further includes: adjusting the threshold used to judge the rate of change of the residual so that the adjusted rate of change threshold is higher than the original rate of change threshold.
[0124] The second type is characterized by stable, abnormally sparse tensors.
[0125] After each iteration, the coefficient of variation (CV(E)) of the anomalous sparse tensor, which is the ratio of the standard deviation to the mean, is calculated to assess whether the anomalous sparse tensor is stable. If the coefficient of variation (CV(E)) is less than a preset threshold (e.g., 0.05, 0.06, etc.), the anomalous sparse tensor can be considered stable, and the preset stopping condition is met.
[0126] In addition, if the coefficient of variation CV(E) does not increase after multiple iterations, the iteration can be terminated early.
[0127] The third method involves reaching the maximum number of iterations. The maximum number of iterations is a pre-set number, including 50, 100, or 150, etc. This embodiment does not limit the maximum number of iterations.
[0128] Step S103: When the preset termination condition is met, the L2 norm is calculated pixel by pixel based on the abnormal sparse tensor currently output by the anomaly detection model to obtain the anomaly score map corresponding to the image data. The abnormal target in the image data is determined by comparing the score threshold with the anomaly score map.
[0129] After the preset termination condition is met, the L2 norm is calculated on the abnormal sparse tensor currently output by the anomaly detection model to obtain the anomaly score map, which quickly locates potential abnormal regions and thus screens and determines abnormal targets in the image data.
[0130] However, in actual implementation, the anomalous sparse tensor represents the part that is inconsistent with the low-rank background, but these "inconsistencies" may come from: real anomalous targets (such as moving objects, fault areas, etc.), noise fluctuations, model estimation errors, or dynamic changes in the background (such as leaves blowing in the wind, water ripples, etc.).
[0131] Before calculating the L2 norm of the anomalous sparse tensor, the non-zero elements in the anomalous sparse tensor need to be filtered using a background dictionary. This background dictionary is learned from sample image data without anomalous targets and through non-negative matrix factorization.
[0132] Sparse encoding of non-zero elements in an anomalous sparse tensor using a background dictionary is used, represented as follows: That is, a pixel z is sparsely represented as a linear combination of its elements in the background dictionary, which is used to determine whether the pixel can be well represented by the background pattern.
[0133] Next, the reconstruction error between each non-zero element and its sparse coding result is calculated, and non-zero elements with small reconstruction errors are filtered out using a score threshold to distinguish between real anomalies and pseudo-anomalies, and to eliminate false detections and noise interference.
[0134] In some embodiments of the present invention, the scoring threshold is obtained by multiplying the median score of the background region by a preset coefficient (e.g., 3 or 4). For example, the scoring threshold can be expressed as... ,in, This represents the median score for the background region. This indicates the preset coefficient.
[0135] The L2 norm is calculated for the filtered anomalous sparse tensors to obtain an optimized anomaly score map, thus improving its accuracy. Specifically, the anomaly score for any pixel can be expressed as... .
[0136] Specifically, based on the abnormal sparse tensor currently output by the anomaly detection model, the L2 norm is calculated pixel by pixel to obtain the anomaly score map corresponding to the image data. Anomalies in the image data are identified by comparing the score threshold with the anomaly score map. This process includes: sparsely encoding the non-zero elements in the abnormal sparse tensor using a pre-constructed background dictionary to obtain sparse encoding results; calculating the reconstruction error between each non-zero element and its corresponding sparse encoding result; filtering the abnormal sparse tensor using a preset noise threshold to remove non-zero elements with reconstruction errors less than the preset noise threshold; calculating the L2 norm pixel by pixel based on the filtered abnormal sparse tensor to obtain the anomaly score map; the anomaly score map includes the anomaly scores of the background region and the anomaly scores of the abnormal regions; multiplying the median of the anomaly scores of the background region by a preset coefficient to obtain the score threshold; comparing each score in the anomaly score map with the score threshold, and identifying anomalies in the image data whose scores are greater than the score threshold as abnormal targets.
[0137] However, in existing methods, it is difficult to effectively remove all noise elements when constructing the background dictionary, resulting in the generated dictionary usually containing noise information, which reduces the purity of background separation and affects the accuracy of anomaly detection.
[0138] Therefore, to address dynamic backgrounds and complex scenarios, this embodiment employs a dynamic dictionary periodic update mechanism. For example, the background dictionary is updated every 10 or 5 iterations, or immediately when the background reconstruction error suddenly increases (e.g., exceeding a preset multiple of the historical average). Noisy elements in the dictionary are gradually removed through abnormal residuals, generating a clean background dictionary, thereby improving the purity of background separation and the robustness of anomaly detection. The dynamic dictionary design allows the model to flexibly adapt to dynamic changes in the background during optimization, improving its adaptability to complex backgrounds.
[0139] Specifically, after comparing each score in the anomaly score map with a score threshold and identifying anomaly regions in the image data whose scores are greater than the score threshold as anomaly targets, the process further includes: calculating the anomaly detection residual corresponding to the current background region based on the current background low-rank tensor and background dictionary to obtain a residual matrix; calculating the residual standard deviation based on each element in the residual matrix; filtering the elements in the residual matrix based on the residual standard deviation to identify background region pixels corresponding to residuals with amplitudes greater than twice the residual standard deviation, and removing these pixels from the background region; and iteratively optimizing the background dictionary using an online non-negative matrix factorization algorithm based on the remaining background region pixels, and deleting dictionary atoms whose usage frequency is lower than a preset threshold.
[0140] The background dictionary, which is iteratively optimized using an online nonnegative matrix factorization algorithm, can be represented by the following formula:
[0141]
[0142] In the formula, This represents the currently input clean image data; This represents a sparse representation of the data in the current background dictionary D; This represents the regularization parameter, used to balance the trade-off between reconstruction accuracy and dictionary sparsity. This represents the updated background dictionary.
[0143] In addition, after detecting abnormal targets in the image data, further optimization processing can be performed based on the detection results, such as labeling abnormal target information and removing false detections or missed detections, in order to improve the reliability and interpretability of the results.
[0144] In some embodiments of the present invention, the optimization process includes one or more of the following:
[0145] The first method is confidence level calibration.
[0146] In some embodiments of the invention, the confidence calibration process refers to normalizing the abnormal scores and then setting a threshold (e.g., 3σ) based on the standard deviation σ of the statistical background region. Regions exceeding this threshold are considered abnormal. For each detected abnormal region, a confidence score is calculated based on its position relative to the background distribution. This score is typically a value within the range of [0,1], with higher values indicating a greater likelihood of a genuine abnormality.
[0147] The second method is location information integration and processing.
[0148] Specifically, location information integration processing refers to performing geographic coordinate transformation on the location information of anomalous targets, converting them from image pixel coordinates to standard geographic coordinates (such as WGS84 or UTM format), and generating an anomaly distribution map with spatial reference significance. This distribution map can be directly output or integrated with a Geographic Information System (GIS) to achieve precise positioning and visual annotation of anomalous targets, thereby improving spatial analysis and decision support capabilities in practical applications.
[0149] The third type is target recognition processing. This includes, but is not limited to, target recognition processing based on convolutional neural network (CNN) classifiers, target recognition processing based on feature matching, or target recognition processing based on knowledge graphs / rule reasoning. This embodiment does not limit the implementation method of target recognition processing.
[0150] Specifically, after identifying abnormal targets in the image data by comparing the score threshold and the abnormal score map, the process also includes: performing target recognition on the abnormal targets to obtain target recognition results; and labeling abnormal target information in the image data based on the target recognition results, including the type, location information, or confidence information of the abnormal targets.
[0151] In practice, optimization processing may also include abnormal target refinement processing, multi-result fusion processing, or visualization optimization processing. This embodiment does not limit the implementation method of subsequent optimization processing.
[0152] In summary, the anomaly detection method for image data provided in this embodiment can solve the problem of accurately identifying anomalous targets in scenes with strong background noise and where the anomalous target is similar to the background. By designing a multi-scale feature fusion mechanism, combining multi-scale information of spectral and spatial features, it captures detailed features of hyperspectral data at different scales and fuses the two types of features to obtain a joint feature matrix, thereby improving the model's ability to distinguish anomalous targets in complex scenes and thus improving the accuracy of anomalous target identification. At the same time, by combining a multi-feedback mechanism and using an iterative optimization method, background suppression and anomalous target separation are performed on the image data in each detection process. After each detection, the model parameters are automatically adjusted based on the current feedback information, thereby further improving the detection accuracy of the model.
[0153] Furthermore, the alternating direction multiplier method based on multi-step acceleration, by introducing generalized weighted singular value thresholding and dynamic learning rate adjustment strategies, can significantly reduce the number of iterations and improve overall computational efficiency, thereby improving the efficiency of the anomaly detection model in processing image data and detecting anomalous targets. At the same time, by introducing an adaptive non-convex regularization strategy, the regularization parameters can be dynamically adjusted to more accurately approximate the tensor tube rank. Compared with the relaxation approximation of the traditional convex kernel norm, non-convex regularization can better characterize the low-rank characteristics of the background, thereby improving the accuracy of background modeling, especially significantly improving the anomaly detection accuracy in complex background scenes.
[0154] Furthermore, to handle dynamic backgrounds and complex scenes, noisy elements in the background dictionary are progressively removed through abnormal residuals to generate a clean background dictionary. This allows for continuous adaptive adjustment of the dictionary content during optimization, improving adaptability to dynamic backgrounds while reducing noise interference with detection results, thus enhancing the purity of background separation and the robustness of anomaly detection. Simultaneously, the dynamic dictionary design allows the model to flexibly adapt to dynamic changes in the background during optimization, improving its adaptability to complex backgrounds and enabling the model to maintain high detection performance even in noisy environments.
[0155] Figure 2This is a block diagram of an anomaly detection device for image data provided in one embodiment of this application. The device includes at least the following modules: a feature extraction module 210, a feature input module 220, and an anomaly segmentation module 230.
[0156] The feature extraction module 210 is used to extract spectral features and spatial features from image data respectively, and to fuse the extracted spectral features and spatial features to construct a joint feature matrix containing spatial information and spectral information.
[0157] The feature input module 220 is used to input the joint feature matrix into a pre-constructed anomaly detection model. The anomaly detection model uses the alternating direction multiplier algorithm to solve the low-rank sparse decomposition problem, separating the background low-rank and anomalous sparse from the joint feature matrix. The objective function of the low-rank sparse decomposition includes a data fidelity term, a regularization term, and a band weight term. The regularization term includes low-rank constraints and sparsity constraints, and the band weight term acts on the low-rank constraints in a weighted manner. During the model solution process, iterative optimization is used to sequentially update the background low-rank tensor, the anomalous sparse tensor, and the Lagrange multipliers. The sparsity constraint weights of the sparse constraints are adjusted based on the sparsity of the updated anomalous sparse tensor, and the band weight term is adjusted using the entropy weight method. The penalty parameters of the alternating direction multiplier algorithm are adjusted based on the convergence of the background reconstruction error of the background low-rank tensor. The above iterative process is repeated until the preset termination condition is reached.
[0158] The anomaly segmentation module 230 is used to calculate the L2 norm pixel by pixel based on the anomaly sparse tensor currently output by the anomaly detection model when a preset termination condition is met, to obtain the anomaly score map corresponding to the image data, and to determine the abnormal targets in the image data by comparing the score threshold with the anomaly score map.
[0159] For relevant details, please refer to the above embodiments.
[0160] It should be noted that the anomaly detection device for image data provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed to complete all or part of the functions described above. Furthermore, the anomaly detection device for image data provided in the above embodiments and the anomaly detection method for image data belong to the same concept; the specific implementation process is detailed in the method embodiments and will not be repeated here.
[0161] Corresponding to the above method, the present invention also provides an anomaly detection device for image data, the device including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor being used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device implements the steps of the anomaly detection method for image data as described above.
[0162] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned anomaly detection method for image data. The computer-readable storage medium may be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, floppy disk, hard disk, removable storage disk, CD-ROM, or any other form of storage medium known in the art.
[0163] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.
[0164] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0165] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.
[0166] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An anomaly detection method for image data, characterized in that, The method includes the following steps: Spectral and spatial features are extracted from the image data respectively. The extracted spectral and spatial features are then fused to construct a joint feature matrix containing both spatial and spectral information. The joint feature matrix is input into a pre-constructed anomaly detection model; the anomaly detection model uses the alternating direction multiplier algorithm to solve the low-rank sparse decomposition problem, separating the background low-rank and anomaly sparsity from the joint feature matrix; the objective function of the low-rank sparse decomposition includes a data fidelity term, a regularization term, and a band weight term; wherein, the regularization term includes low-rank constraints and sparsity constraints, and the band weight term acts on the low-rank constraints in a weighted manner; combined with the alternating direction multiplier algorithm, the objective function expression is: ; In the formula, The background low-rank tensor is represented by an adaptive non-convex regularization method to approximate the tensor rank. Represents the coefficient anomaly tensor, used to label anomalous targets; This represents the low-rank constraint, i.e., the nuclear norm of the background low-rank tensor; This represents a sparsity constraint used to promote the sparsity of anomalous sparse tensors, i.e., the quantized anomalous residual magnitudes. Indicates the sparse constraint weights; Represents the Lagrange multipliers; This represents the penalty parameter of the alternating direction multiplier algorithm; This represents the band weighting term. The value range is 1 to ,in, Let F represent the number of spectral bands, and let F represent the joint characteristic matrix. This involves calculating the Frobenius norm; during model solving, an iterative optimization method is used, sequentially updating the background low-rank tensor, the anomalous sparse tensor, and the Lagrange multipliers. The sparsity constraint weights of the sparse constraints are adjusted based on the sparsity of the updated anomalous sparse tensor, and the band weights are adjusted using the entropy weight method. The penalty parameters of the alternating direction multiplier method are adjusted based on the convergence of the background reconstruction error of the background low-rank tensor. In each iteration, the background low-rank tensor is updated... Anomalous sparse tensors and Lagrange multipliers Subsequently, the model parameters in the anomaly detection model are optimized collaboratively through multiple feedback mechanisms, including a feedback adjustment mechanism for the sparse constraint weights λ and a band weight term. The feedback adjustment mechanism and the feedback adjustment mechanism of the penalty parameter ρ are used; the above iterative process is repeated until the preset termination condition is reached. When the preset termination condition is met, the L2 norm is calculated pixel by pixel based on the abnormal sparse tensor currently output by the anomaly detection model to obtain the anomaly score map corresponding to the image data. The abnormal target in the image data is determined by comparing the score threshold with the anomaly score map.
2. The method according to claim 1, characterized in that, The process involves calculating the L2 norm pixel-by-pixel based on the anomalous sparse tensor currently output by the anomaly detection model to obtain an anomaly score map corresponding to the image data, and comparing the score map with a score threshold to determine anomalous targets in the image data, including: The non-zero elements in the abnormal sparse tensor are sparsely encoded using a pre-constructed background dictionary to obtain the sparse encoding result. Calculate the reconstruction error between each non-zero element and its corresponding sparse coding result; The abnormal sparse tensor is filtered by a preset noise threshold to remove non-zero elements whose reconstruction error is less than the preset noise threshold. The L2 norm is calculated pixel-by-pixel based on the filtered abnormal sparse tensor to obtain the anomaly score map; the anomaly score map includes the anomaly score of the background region and the anomaly score of the abnormal region. The score threshold is obtained by multiplying the median of the abnormal scores in the background region by a preset coefficient. Each score in the abnormal score map is compared with the score threshold, and the abnormal regions in the image data with scores greater than the score threshold are identified as the abnormal targets.
3. The method according to claim 2, characterized in that, After comparing each score in the abnormal score map with the score threshold, and identifying abnormal regions in the image data with scores greater than the score threshold as the abnormal targets, the method further includes: Based on the current background low-rank tensor and the background dictionary, calculate the anomaly detection residual corresponding to the current background region to obtain the residual matrix; The residual standard deviation is calculated based on each element in the residual matrix; Based on the residual standard deviation, the elements in the residual matrix are filtered to identify the background region pixels corresponding to residuals with amplitudes greater than twice the residual standard deviation, and these pixels are removed from the background region. Based on the remaining background region pixels, the background dictionary is iteratively optimized using an online non-negative matrix factorization algorithm, and dictionary atoms whose usage frequency is lower than a preset threshold are deleted.
4. The method according to claim 1, characterized in that, The alternating direction multiplier method algorithm introduces a non-convex low-rank approximation strategy; after updating the background low-rank tensor, the updated background low-rank tensor is subjected to non-convex regularization processing through generalized weighted singular value thresholding; the non-convex regularization processing uses a non-convex penalty function to approximate the low-rank characteristics.
5. The method according to claim 1, characterized in that, The step of extracting spectral features and spatial features from the image data includes: Principal component analysis was used to extract spectral features from the image data to obtain global-scale spectral features. The spectral characteristics at the local scale are obtained by calculating the first and / or second derivatives between the bands. Spatial features are extracted from the image data by using multiple convolutional kernels of different scales to obtain spatial features at different scales.
6. The method according to claim 1, characterized in that, The conditions for reaching the preset termination include: In each iteration, the reconstruction residual is calculated based on the currently updated background low-rank tensor, the anomalous sparse tensor, and the joint feature matrix. When the relative rate of change of the reconstructed residual obtained in the current iteration is less than the rate of change threshold, the reconstructed residual is determined to have converged, and the preset termination condition is met.
7. The method according to claim 6, characterized in that, If, after reaching a preset number of iterations, the reconstructed residual does not meet the convergence condition, the method further includes: Adjust the threshold used to determine the rate of change of the residual so that the adjusted rate of change threshold is higher than the original rate of change threshold.
8. The method according to claim 1, characterized in that, After determining the abnormal targets in the image data by comparing the score threshold with the abnormal score map, the method further includes: The abnormal target is identified to obtain the target identification result; Based on the target recognition results, abnormal target information is labeled in the image data, including the type, location information, or confidence level information of the abnormal target.
9. An anomaly detection device for image data, comprising a processor, a memory, and a computer program / instructions stored in the memory, characterized in that, The processor is configured to execute the computer program / instructions, and when the computer program / instructions are executed, the device implements the steps of the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 8.