Large kernel center block mask convolution high-resolution hyperspectral anomaly detection method and device
Through the large core center block mask convolution high score hyperspectral anomaly detection method, the combination technology of pixel shuffling and reconstruction network is used to solve the problems of inaccurate image reconstruction and missed detection in the existing technology, and the hyperspectral is improved Accuracy of image abnormality detection.
Patent Information
- Application Number
- CN202411284666.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-01-03
AI Technical Summary
The existing hyperspectral image anomaly detection algorithm is inaccurate when image reconstruction is performed through neighborhood background information, and detection methods based on blind spot networks are likely to lead to missed detection of large targets, resulting in inaccurate detection results.
The method of large core center block mask convolution high score hyperspectral anomaly detection is adopted to obtain multiple sub-images through pixel shuffling down, and the sub-image is reconstructed based on the reconstruction network, and the large-scale background information is used to reconstruct. By optimizing the objective function, the weight of the abnormal pixels is reduced, and the abnormal score is finally calculated based on the statistical data of the differential image for detection.
It improves the accuracy of abnormal detection of high-resolution hyperspectral images, can effectively detect large-scale abnormal targets, and reduce missed detection.
Smart Images

Figure CN119251466A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hyperspectral image processing, and in particular to a large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method and device. Background Art
[0002] Anomaly detection in hyperspectral images (HSI) is one of the important links in the hyperspectral image processing process. It can detect abnormal targets in the scene without using prior spectral information. It has high application value and a wide range of applications. For example, hyperspectral sensors can be installed on drones to detect ground objects at a certain height above the ground. The spatial resolution of the HSI obtained is also higher than before.
[0003] In the related technologies, the abnormal targets in the image anomaly detection task usually present the following characteristics compared with most of the background objects: small spatial size, small proportion and certain differences in spectral characteristics; and the commonly used detection algorithms generally reconstruct the image through the neighborhood background information first. Since the spectral characteristics of the abnormal targets are quite different from those of the background, the reconstruction results often only retain the background, and the anomalies are manifested as reconstruction errors, resulting in inaccurate detection results; in addition, the anomaly detection algorithm based on the blind spot network adopts a small-area reconstruction strategy, but since the target size of the high-resolution hyperspectral image HRHSI is much larger than the target size of the medium and low-resolution HSI, relying only on the information of a small area can easily cause the reconstruction of large targets, resulting in missed detections, and then leading to inaccurate image anomaly detection results. Summary of the invention
[0004] The present invention provides a large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method and device, which are used to solve the problem that the reconstruction result of the prior art for image reconstruction through neighborhood background information is inaccurate, and the use of anomaly detection algorithms based on blind spot networks easily causes the reconstruction of large targets, thereby leading to the defect of missed detection, thereby improving the accuracy of image anomaly detection results.
[0005] The present invention provides a large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method, comprising: Perform pixel shuffling and down-sampling on the high-resolution hyperspectral image to be detected to obtain multiple sub-images; Reconstructing the multiple sub-images based on a reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training a generator using a sample high-resolution hyperspectral image as a training sample and an optimization objective function as a loss function; the optimization objective function is used to reduce the weight of the position of the potential abnormal pixel in the sample high-resolution hyperspectral image; The reconstructed image is subjected to pixel shuffling and inverse sampling to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, the anomaly score of each pixel is calculated based on the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and the image anomaly detection result is determined based on the anomaly score of each pixel.
[0006] According to a large kernel center block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention, the reconstruction network is trained by the following steps: Performing pixel shuffling down-sampling on the sample high-resolution hyperspectral image to obtain a plurality of sample sub-images; The plurality of sample sub-images are input into the reconstruction network, and the network weights of the generator are updated using the Adam algorithm according to the optimization objective function, and the reconstruction network is obtained when the number of updates reaches the maximum number of iterations or the generator converges; the reconstruction network
[0007] The optimization objective function is determined by the network weights, network parameters, multiple sample sub-image sets and reconstructed sample sub-image sets of the generator.
[0008] According to a large-kernel center block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention, the generator includes a large-kernel center block mask convolution module, a channel attention mechanism ECA module and a dilated convolution reconstruction module; The large-core central block mask convolution module is used to reconstruct pixels of large-scale surrounding background information obtained from the high-resolution hyperspectral image to obtain a background feature map; The ECA module is used to perform one-dimensional convolution on the background feature map to obtain a new feature map, wherein the information of each band in the new feature map is a linear combination of the band and adjacent bands at the same position in the background feature map; The dilated convolution reconstruction module is used to obtain a reconstructed image by fitting background information of pixels at positions corresponding to the high-resolution hyperspectral image when reconstructing the image according to the new feature map.
[0009] According to a large kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention, the optimization objective function is expressed by the following formula: ; in, is the value of the optimization objective function; For the generator, are the network parameters of the generator, is the network weight of the generator, is a set of multiple sample sub-images, where N is the number of pixels in the sample sub-image, L is the number of bands, and P is the spatial size of the sample sub-image. is the set of reconstructed sample sub-images; ||||1 is the L1 norm operation.
[0010] According to a large kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention, the anomaly score of each pixel is calculated according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, including: Performing differential processing on the high-resolution hyperspectral image to be detected and the reconstructed image to obtain the differential image; Calculating the mean and covariance of all pixels in the differential image, and calculating the L2 distance and Mahalanobis distance of each pixel according to the mean and the covariance; The anomaly score is determined by calculating the L2 distance of each pixel and the average of the Mahalanobis distance.
[0011] According to a large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention, the pixel shuffling and down-sampling of the high-resolution hyperspectral image to be detected to obtain a plurality of sub-images includes: The high-resolution hyperspectral image to be detected is split according to the area of the abnormal target to obtain the multiple sub-images; different sub-images include different parts of the abnormal target.
[0012] The present invention also provides a large-kernel central block mask convolution high-resolution hyperspectral anomaly detection device, comprising: An image sampling module is used to perform pixel shuffling and down-sampling on the high-resolution hyperspectral image to be detected to obtain multiple sub-images; An image reconstruction module, used to reconstruct the multiple sub-images based on a reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training a generator using a sample high-resolution hyperspectral image as a training sample and an optimization objective function as a loss function; the optimization objective function is used to reduce the weight of the position of potential abnormal pixels in the sample high-resolution hyperspectral image; The detection module is used to perform pixel shuffling and reverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculate the anomaly score of each pixel according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determine the image anomaly detection result according to the anomaly score of each pixel.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the large kernel central block mask convolution high-resolution hyperspectral anomaly detection method as described above is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method as described in any one of the above is implemented.
[0015] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the large kernel central block mask convolution high-resolution hyperspectral anomaly detection methods described above.
[0016] The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method and device provided by the present invention obtain multiple sub-images by performing pixel shuffling down-sampling on the high-resolution hyperspectral image to be detected; reconstruct the multiple sub-images based on a reconstruction network to obtain a reconstructed image; perform pixel shuffling inverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculate the anomaly score of each pixel according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determine the image anomaly detection result according to the anomaly score of each pixel. The method of the present invention makes full use of large-scale field background information and even global information for reconstruction, and combines the pixel shuffling down-sampling operation to achieve anomaly detection of large-scale abnormal targets, thereby improving the accuracy of anomaly detection of high-resolution hyperspectral images. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is one of the flow charts of the large kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention.
[0019] Figure 2 It is a schematic diagram of pixel shuffling downsampling with a downsampling factor of 2 provided by the present invention.
[0020] Figure 3 This is the second flow chart of the large kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention.
[0021] Figure 4 It is a schematic diagram of the structure of the reconstructed network provided by the present invention.
[0022] Figure 5 It is a structural schematic diagram of the large-kernel central block mask convolution high-resolution hyperspectral anomaly detection device provided by the present invention.
[0023] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Combine the following Figure 1-Figure 5 The present invention describes a large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method and device.
[0026] Figure 1 This is one of the flow charts of the large kernel center block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention, such as Figure 1 As shown, the large kernel center block mask convolution high-resolution hyperspectral anomaly detection method includes the following steps: Step 110: Perform pixel shuffling and down-sampling on the high-resolution hyperspectral image to be detected to obtain a plurality of sub-images.
[0027] In this step, the high-resolution hyperspectral image to be detected can be preprocessed by pixel shuffling, and the spatial correlation between abnormal pixels and background pixels can be reduced by splitting the original image into several sub-images.
[0028] Specifically, the high-resolution hyperspectral image to be detected is pixel-shuffled and down-sampled to obtain a plurality of sub-images, including: the high-resolution hyperspectral image to be detected is split according to the area of the abnormal target to obtain a plurality of sub-images; different sub-images include different parts of the abnormal target.
[0029] In this embodiment, by splitting the original image and then splitting the abnormal targets in the original image, the scale of the abnormal targets in each sub-image can be reduced; it should be noted that the above pixel shuffling downsampling operation will not lose the information of the original image (the high-resolution hyperspectral image to be detected).
[0030] Figure 2 Schematic diagram of pixel shuffling downsampling with a downsampling factor of 2 provided by the present invention. Figure 2 In the embodiment shown, the high-resolution hyperspectral image to be detected is divided into 9 sub-images, wherein each sub-image may include 4 sub-areas (the sub-image corresponding to the upper right corner of the left image includes a 11 , b 11 、c 11 ,d 11 , the corresponding sub-image in the upper right corner of the right image includes a 11 、a 12 、a 21 、a 22 ); Then, in the process of downsampling PD, the first reference sub-image corresponding to the position of the first sub-image in the downsampled noise image is obtained as follows: the first sub-regions of the first sub-image to the ninth sub-image are sequentially obtained from the left image to obtain the right image; in the process of inverse sampling PD -1 In the process, the right image sequentially obtains the first sub-regions of the first sub-image to the ninth sub-image and combines them to obtain the left image (which is essentially the inverse process of downsampling PD).
[0031] Step 120, reconstructing the multiple sub-images based on the reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training the generator using the sample high-resolution hyperspectral image as a training sample and the optimized objective function as a loss function; the optimized objective function is used to reduce the weight of the position of the potential abnormal pixel in the sample high-resolution hyperspectral image.
[0032] In this step, the generator can refer to the generator G in the Generative Adversarial Networks (GAN).
[0033] In this embodiment, the generator includes a large kernel center block mask convolution module, a channel attention mechanism ECA module and a dilated convolution reconstruction module.
[0034] For example, the large-kernel central block mask convolution module is used to obtain large-scale surrounding background information from the original image for pixel reconstruction, and the ECA module uses the spectral difference between the abnormal target and the background to suppress abnormal pixels. The dilated convolution reconstruction module uses the dilated convolution of the residual structure to use the information of the pixel at the same position in the original image to fit the background during reconstruction.
[0035] In this embodiment, the optimization objective function is expressed by the following formula: ; in, To optimize the value of the objective function; For the generator, are the network parameters of the generator, is the network weight of the generator, is a set of multiple sample sub-images, where N is the number of pixels in the sample sub-image, L is the number of bands, and P is the spatial size of the sample sub-image. is the set of reconstructed sample sub-images; || ||1 is the L1 norm operation.
[0036] In this embodiment, the dataset used is first defined as a set of image blocks of the original image after preprocessing. ,in N is the number of pixels, L is the number of bands, P is the spatial size of the image block; the set of output image blocks after the reconstruction network ; Reconstruct the network G The optimization goal is to make the information of abnormal pixels close to , to ensure G We can focus on recovering background pixels and prevent the network from learning an identity mapping between input and output.
[0037] In this embodiment, when designing the objective function, first and Do the difference , and then let the maximum value of each channel of the difference between the two form a new three-dimensional matrix , and then make the difference between the two ,make ; The optimization goal of the network is to minimize the following objective function based on L1 loss, thereby optimizing the network parameters ( ).
[0038] In this embodiment, a plurality of sub-images are input into the above-mentioned trained reconstruction network to obtain a reconstructed image.
[0039] Step 130, perform pixel shuffling and reverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculate the anomaly score of each pixel based on the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determine the image anomaly detection result based on the anomaly score of each pixel.
[0040] Specifically, the abnormal score of each pixel is calculated according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, including: performing differential processing on the high-resolution hyperspectral image to be detected and the reconstructed image to obtain a differential image; calculating the mean and covariance of all pixels in the differential image, and calculating the L2 distance and Mahalanobis distance of each pixel according to the mean and covariance; calculating the mean of the L2 distance and Mahalanobis distance of each pixel to determine the abnormal score.
[0041] In this embodiment, the steps of implementing anomaly detection on the hyperspectral image include: n RCLLRC Step 2: Perform pixel shuffle downsampling operation .
[0042] Step 3: Input the trained reconstruction network In the reconstructed image ;in, .
[0043] Step 4: Perform pixel shuffling and inverse sampling on the reconstructed image to obtain the reconstruction result of the original image.
[0044] Step 5: Subtract the original image from the reconstructed image to obtain a differential image.
[0045] Step 6: Calculate the difference image All pixels The mean and the covariance matrix , , At the same time, the difference image is calculated Medium pixel L2 distance and Mahalanobis distance , and the mean of the two is taken as the abnormal score of each pixel in the image .
[0046] Step 8. Output: Final anomaly detection results for the entire image ;in, It can be expressed as: .
[0047] The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the embodiment of the present invention obtains multiple sub-images by performing pixel shuffling down-sampling on the high-resolution hyperspectral image to be detected; reconstructs the multiple sub-images based on the reconstruction network to obtain the reconstructed image; performs pixel shuffling inverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculates the anomaly score of each pixel according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determines the image anomaly detection result according to the anomaly score of each pixel. The method of the present invention makes full use of large-scale field background information and even global information for reconstruction, and combines the pixel shuffling down-sampling operation to achieve anomaly detection of large-scale abnormal targets, thereby improving the accuracy of anomaly detection of high-resolution hyperspectral images.
[0048] In some embodiments, the reconstruction network is trained by the following steps: pixel shuffling and downsampling of a sample high-resolution hyperspectral image to obtain a plurality of sample sub-images; the plurality of sample sub-images are input into a generator, the Adam algorithm is used to update the network weights of the generator according to the optimization objective function, and the reconstruction network is obtained when the number of updates reaches the maximum number of iterations or the generator converges; the reconstruction network optimization objective function is determined by the network weights of the generator, the network parameters, the plurality of sample sub-image sets and the reconstructed sample sub-image set.
[0049] Figure 3 This is the second flow chart of the large kernel center block mask convolution high-resolution hyperspectral anomaly detection method provided by the present invention. Figure 3 In the embodiment shown, from the hyperspectral image anomaly detection stage, step 1, input the hyperspectral image; step 2, perform pixel shuffling downsampling operation on the original image; step 2, obtain the reconstruction network trained in the reconstruction network training stage; step 4, input the downsampled image into the trained network to obtain a reconstructed image (the reconstruction here is the same operation as the above reconstruction); step 5, perform pixel shuffling inverse sampling operation on the reconstructed image to obtain a reconstructed image of the original image; step 6, subtract the original image from the inverse sampled reconstructed image to obtain a differential image; step 7, combine the L2 distance of each pixel of the differential image and the Mahalanobis distance of each pixel of the differential image distance, determine the anomaly score; step 8, output the detection result of the entire image; in the reconstruction network training stage, step 1, input training samples; step 2, build a reconstruction network and design an optimization objective function; step 3, the current number of iterations is equal to the initial number of iterations; step 4, use the Adam algorithm to update the network weights according to the network's objective function; step 5, update the current number of iterations (that is, the number of iterations + 1); step 6, determine whether the current number of iterations is equal to the set number of iterations; step 7, when the current number of iterations is equal to the set number of iterations, output the trained network, that is, the reconstruction network.
[0050] The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by an embodiment of the present invention inputs multiple sample sub-images obtained by pixel shuffling and downsampling the sample high-resolution hyperspectral image into a generator, adopts the Adam algorithm and updates the network weights of the generator according to the optimization objective function, and obtains a reconstructed network when the number of updates reaches the maximum number of iterations or the generator converges, thereby improving the detection accuracy and robustness of the reconstructed network.
[0051] In some embodiments, the generator includes a large kernel center block mask convolution module, a channel attention mechanism ECA module and an expanded convolution reconstruction module; the large kernel center block mask convolution module is used to reconstruct pixels of large-scale surrounding background information obtained from high-resolution hyperspectral images to obtain a background feature map; the ECA module is used to perform one-dimensional convolution on the background feature map to obtain a new feature map, and the information of each band in the new feature map is a linear combination of the bands and adjacent bands at the same position in the background feature map; the expanded convolution reconstruction module is used to fit the background information using pixels at positions corresponding to the high-resolution hyperspectral image when reconstructing the image according to the new feature map to obtain a reconstructed image.
[0052] In this embodiment, the loss function during network training can reduce the weight of the location of potential abnormal pixels during the training process, thereby suppressing the reconstruction of abnormal pixels during network training.
[0053] Next, the operations required in this embodiment are described.
[0054] 1. Two-dimensional convolution operation; using two-dimensional convolution function: using n The space size is A convolution layer consisting of a convolution kernel right M OK N List C Channel Image The convolution operation is recorded as: ; ; in, yes M OK N List C Channel output image, d represents the dilation rate of the convolution.
[0055] 2. One-dimensional convolution operation; One-dimensional convolution function: Use n The space size is A convolution layer consisting of a convolution kernel right M OK N List C Channel Image The convolution operation is recorded as: ; ; in, yes M OK N List C Channel output image.
[0056] 3. Exponential linear unit (ELU) function: (1) Logarithmic value x , the ELU function is defined as: ; (2) Vector , the ELU function is defined as: ; Among them, the vector ,and .
[0057] 4. For M rows, N columns, C channel image An image with M rows, N columns and C channels , the element-by-element summation between the two (i.e., pixel-by-pixel summation) is recorded as , the result of the operation (pixel-by-pixel sum) It is still an image with spatial size of M rows, N columns and C channels, where .
[0058] 5. Element-by-element product: for M rows, N columns, C channel image An image with M rows, N columns and C channels , the element-by-element multiplication operation (i.e., pixel-by-pixel product) between the two is recorded as , the result of the operation (pixel-by-pixel product) It is still an image with spatial size of M rows, N columns and C channels, where .
[0059] 6. Efficient Channel Attention (ECA)
[0060] ECA is a one-dimensional convolution that adaptively adjusts the convolution kernel size according to the number of channels in the input feature map. The convolution kernel size is
[0061] ; The parameters b and Set to 1 and 2 respectively, the output is
[0062] ; Where k represents the convolution kernel size is k.
[0063] Figure 4 is a schematic diagram of the structure of the reconstruction network provided by the present invention. Figure 4 In the embodiment shown, the generator The network structure is as follows Figure 4 As shown in the figure, the first 6 layers are composed of convolutional layers (Conv2D) and ELU units stacked together, where the third layer is a 23×23 convolution, and the large kernel center block mask convolution module is represented as: ; in, and are the learnable weight parameters of the module and convolutional layer, respectively, m represents the y mask with a center size of 5×5, ; ECA[1] is a one-dimensional convolution with adaptive convolution kernel size, and the output is expressed as: ; The dilated convolution reconstruction module consists of 9 dilated convolutions with residual structures, followed by ELU units and 1×1 convolutions. The module is represented as: ; in, is the learnable weight parameter of the module, and the output is: .
[0064] If we reconstruct the network G The input is a set of image patches The image blocks in , the output can be expressed as: .
[0065] In this embodiment, the whole process is recorded as: ; in Reconstructing the network G All learnable weight parameters, is the set of output image patches.
[0066] The large-kernel central block masked convolution high-resolution hyperspectral anomaly detection method provided by an embodiment of the present invention can obtain large-scale surrounding background information for pixel reconstruction and suppress the reconstruction of abnormal pixels during network training, thereby improving the accuracy of the network output results, through a large-kernel central block masked convolution module, a channel attention mechanism ECA module and a dilated convolution reconstruction module design generator.
[0067] The large kernel central block masked convolution high-resolution hyperspectral anomaly detection device provided by the present invention is described below. The large kernel central block masked convolution high-resolution hyperspectral anomaly detection device described below and the large kernel central block masked convolution high-resolution hyperspectral anomaly detection method described above can be referenced to each other.
[0068] Figure 5 It is a structural schematic diagram of a large-kernel central block mask convolution high-resolution hyperspectral anomaly detection device provided by the present invention. The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection device includes: an image sampling module 510, an image reconstruction module 520 and a detection module 530.
[0069] An image sampling module 510 is used to perform pixel shuffling down-sampling on the high-resolution hyperspectral image to be detected to obtain a plurality of sub-images; The image reconstruction module 520 is used to reconstruct the multiple sub-images based on the reconstruction network to obtain the reconstructed image; wherein the reconstruction network is obtained by iteratively training the generator using the sample high-resolution hyperspectral image as the training sample and the optimization objective function as the loss function; the optimization objective function is used to reduce the weight of the position of the potential abnormal pixel in the sample high-resolution hyperspectral image; The detection module 530 is used to perform pixel shuffling and reverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculate the anomaly score of each pixel based on the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determine the image anomaly detection result based on the anomaly score of each pixel.
[0070] The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection device provided by the embodiment of the present invention obtains multiple sub-images by performing pixel shuffling down-sampling on the high-resolution hyperspectral image to be detected; reconstructs the multiple sub-images based on the reconstruction network to obtain the reconstructed image; performs pixel shuffling inverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculates the anomaly score of each pixel according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determines the image anomaly detection result according to the anomaly score of each pixel. The method of the present invention makes full use of large-scale field background information and even global information for reconstruction, and combines the pixel shuffling down-sampling operation to achieve anomaly detection of large-scale abnormal targets, thereby improving the accuracy of anomaly detection of high-resolution hyperspectral images.
[0071] Figure 6 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6As shown, the electronic device may include: a processor (processor) 610 , a communication interface (Communications Interface) 620 , a memory (memory) 630 and a communication bus 640 , wherein the processor 610 , the communication interface 620 , and the memory 630 communicate with each other through the communication bus 640 . The processor 610 can call the logic instructions in the memory 630 to execute the large kernel central block mask convolution high-resolution hyperspectral anomaly detection method, which includes: pixel shuffling down-sampling the high-resolution hyperspectral image to be detected to obtain multiple sub-images; reconstructing the multiple sub-images based on the reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training the generator with the sample high-resolution hyperspectral image as the training sample and the optimization objective function as the loss function; the optimization objective function is used to reduce the weight of the position of the potential abnormal pixel in the sample high-resolution hyperspectral image; pixel shuffling inverse sampling is performed on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, and the abnormal score of each pixel is calculated according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and the image anomaly detection result is determined according to the abnormal score of each pixel.
[0072] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0073] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the above methods, the method including: performing pixel shuffling down-sampling on the high-resolution hyperspectral image to be detected to obtain multiple sub-images; reconstructing the multiple sub-images based on a reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training the generator with the sample high-resolution hyperspectral image as the training sample and the optimization objective function as the loss function; the optimization objective function is used to reduce the weight of the position of the potential abnormal pixel in the sample high-resolution hyperspectral image; the reconstructed image is pixel shuffled and reversely sampled to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, the abnormal score of each pixel is calculated according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and the image anomaly detection result is determined according to the abnormal score of each pixel.
[0074] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method provided by the above-mentioned methods, the method comprising: performing pixel shuffling down-sampling on the high-resolution hyperspectral image to be detected to obtain a plurality of sub-images; reconstructing the plurality of sub-images based on a reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training a generator using a sample high-resolution hyperspectral image as a training sample and an optimized objective function as a loss function; the optimized objective function is used to reduce the weight of the position of the potential abnormal pixel in the sample high-resolution hyperspectral image; performing pixel shuffling inverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculating the abnormality score of each pixel according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determining the image anomaly detection result according to the abnormality score of each pixel.
[0075] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A large kernel central block mask convolution high-resolution hyperspectral anomaly detection method, characterized in that: include: Perform pixel shuffling and down-sampling on the high-resolution hyperspectral image to be detected to obtain multiple sub-images; Reconstructing the multiple sub-images based on a reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training a generator using a sample high-resolution hyperspectral image as a training sample and an optimization objective function as a loss function; the optimization objective function is used to reduce the weight of the position of the potential abnormal pixel in the sample high-resolution hyperspectral image; The reconstructed image is subjected to pixel shuffling and inverse sampling to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, the anomaly score of each pixel is calculated based on the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and the image anomaly detection result is determined based on the anomaly score of each pixel.
2. The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method according to claim 1 is characterized in that: The reconstruction network is trained by the following steps: Performing pixel shuffling down-sampling on the sample high-resolution hyperspectral image to obtain a plurality of sample sub-images; The plurality of sample sub-images are input into the reconstruction network, and the network weights of the generator are updated using the Adam algorithm according to the optimization objective function, and the reconstruction network is obtained when the number of updates reaches the maximum number of iterations or the generator converges; the reconstruction network The optimization objective function is determined by the network weights, network parameters, multiple sample sub-image sets and reconstructed sample sub-image sets of the generator.
3. The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method according to any one of claims 1-2, characterized in that: The generator includes a large core center block mask convolution module, a channel attention mechanism ECA module and a dilated convolution reconstruction module; The large-core central block mask convolution module is used to reconstruct pixels of large-scale surrounding background information obtained from the high-resolution hyperspectral image to obtain a background feature map; The ECA module is used to perform one-dimensional convolution on the background feature map to obtain a new feature map, wherein the information of each band in the new feature map is a linear combination of the band and adjacent bands at the same position in the background feature map; The dilated convolution reconstruction module is used to obtain a reconstructed image by fitting background information of pixels at positions corresponding to the high-resolution hyperspectral image when reconstructing the image according to the new feature map.
4. The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method according to any one of claims 1-2, characterized in that: The optimization objective function is expressed by the following formula: ; in, is the value of the optimization objective function; For the generator, are the network parameters of the generator, is the network weight of the generator, is a set of multiple sample sub-images, where N is the number of pixels in the sample sub-image, L is the number of bands, and P is the spatial size of the sample sub-image. is the set of reconstructed sample sub-images; || ||1 is the L1 norm operation.
5. The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method according to any one of claim 1, characterized in that: The step of calculating the abnormality score of each pixel according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image comprises: Performing differential processing on the high-resolution hyperspectral image to be detected and the reconstructed image to obtain the differential image; Calculating the mean and covariance of all pixels in the differential image, and calculating the L2 distance and Mahalanobis distance of each pixel according to the mean and the covariance; The anomaly score is determined by calculating the L2 distance of each pixel and the average of the Mahalanobis distance.
6. The large-kernel central block mask convolution high-resolution hyperspectral anomaly detection method according to any one of claim 1, characterized in that: The pixel shuffling and downsampling of the high-resolution hyperspectral image to be detected to obtain a plurality of sub-images comprises: The high-resolution hyperspectral image to be detected is split according to the area of the abnormal target to obtain the multiple sub-images; different sub-images include different parts of the abnormal target.
7. A large-kernel central block mask convolution high-resolution hyperspectral anomaly detection device, characterized in that: include: An image sampling module is used to perform pixel shuffling and down-sampling on the high-resolution hyperspectral image to be detected to obtain multiple sub-images; An image reconstruction module, used to reconstruct the multiple sub-images based on a reconstruction network to obtain a reconstructed image; wherein the reconstruction network is obtained by iteratively training a generator using a sample high-resolution hyperspectral image as a training sample and an optimization objective function as a loss function; the optimization objective function is used to reduce the weight of the position of potential abnormal pixels in the sample high-resolution hyperspectral image; The detection module is used to perform pixel shuffling and reverse sampling on the reconstructed image to obtain a reconstructed image corresponding to the high-resolution hyperspectral image to be detected, calculate the anomaly score of each pixel according to the statistical data corresponding to all pixels in the differential image corresponding to the reconstructed image, and determine the image anomaly detection result according to the anomaly score of each pixel.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the large kernel central block mask convolution high-resolution hyperspectral anomaly detection method as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the large kernel central block mask convolution high-resolution hyperspectral anomaly detection method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the large kernel central block mask convolution high-resolution hyperspectral anomaly detection method as described in any one of claims 1 to 6 is implemented.
