Gravity wave image anomaly detection method based on pre-training network

Through global and local particle size feature analysis combined with ResNet network intermediate layer feature extraction, the problem of low detection accuracy in gravitational wave spectroscopy image abnormality detection is solved, and accurate calibration of abnormal areas and efficient pixel-level analysis are achieved.

CN120472207APending Publication Date: 2025-08-12NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510493320.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art has the problem of low detection accuracy in the detection of gravity wave spectral image anomaly, mainly due to the inconspicuous image features and serious noise interference, making it difficult to effectively utilize the generalized features of the pre-trained network.

Method used

The gravity wave spectral image anomaly detection method based on the pre-trained network is adopted, through global and local particle size feature analysis, combined with the intermediate layer feature extraction of the ResNet network, the patch feature set is generated using adaptive average pooling and bilinear rescaling technology, and the anomaly score is calculated through the nearest neighbor algorithm for localization.

Benefits of technology

It improves the accuracy and calculation efficiency of abnormal detection of gravity wave spectral images, reduces noise interference, and realizes accurate calibration of abnormal areas and efficient pixel-level analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472207A_ABST
    Figure CN120472207A_ABST
Patent Text Reader

Abstract

The invention particularly relates to a gravity wave image anomaly detection method based on a pre-training network. The method comprises the steps of collecting gravity wave spectral image data and performing preprocessing; performing data dimension compression on the preprocessed gravity wave spectral image; extracting features of the gravity wave spectral image based on a pre-training network; aggregating the extracted multi-level features, fusing the features of different levels by adopting adaptive average pooling and bilinear scaling technologies, and generating a patch feature set; performing feature sampling on the patch feature set; and calculating an abnormal score of the test image based on a nearest neighbor algorithm, determining an abnormal region through a nearest neighbor distance between the patch features and the feature library, and positioning the abnormal region. According to the method, feature analysis is performed on the gravity wave image from global and local granularities, so that the image features can be fully utilized to perform anomaly detection on the gravity wave image and calibrate the abnormal region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image anomaly detection in meteorological detection instruments, and in particular to a method for detecting anomaly in gravity wave spectral images based on a pre-trained network. Background Art

[0002] In recent years, image anomaly detection has garnered widespread attention in both academic and industrial fields, such as industrial automation, medical image analysis, and autonomous driving. Image anomaly detection plays a vital role in numerous fields, bringing significant convenience and safety improvements to people's lives and work. With the rapid advancement of modern observation technology and data processing capabilities, the field of gravitational wave detection is facing an unprecedented increase in data volumes. This data exhibits diverse, heterogeneous, and complex organizational structures. Against this backdrop, accurately detecting and identifying anomalies in gravitational wave spectral images has become a key research topic in meteorology and astronomy. Building an anomaly detection network for gravitational wave spectral images and efficiently utilizing this information through innovative data processing and knowledge representation methods is crucial. Accurately extracting potential anomaly patterns from massive gravitational wave spectral image data is crucial, as these patterns may contain key meteorological information or new physical phenomena, crucial for understanding the structure and evolution of space gravitational waves. This process is also a key step in constructing a structured gravitational wave anomaly knowledge system. Leveraging this structured knowledge system can significantly advance the development of intelligent gravitational wave spectral image anomaly detection technology.

[0003] In previous studies, some researchers have proposed applying deep representations from ImageNet for classification without adapting to the target data distribution. This direct application has achieved significant results in anomaly detection and has also demonstrated reliable performance in spatially localizing defects. This performance is primarily attributed to the correlation matching between features of normal and test samples, as well as the utilization of deep feature representations at different scales. Fine-grained defect segmentation primarily benefits from high-resolution features, while overall image-level anomaly detection relies on more abstract feature representations. However, their limitations primarily lie in the abstractness of high-level features, as the high-level features trained on ImageNet differ significantly from those required for gravitational wave spectral imagery. Therefore, how to rationally utilize the generalized features in pre-trained networks for gravitational wave spectral imagery has become a key research direction.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0005] The present invention provides a method for detecting anomalies in gravity wave spectral images based on a pre-trained network. By performing feature analysis on gravity wave images at both global and local granularities, the method can fully utilize image features to detect anomalies in gravity wave images and calibrate abnormal areas, thus solving the problems of low detection accuracy caused by the lack of obvious image features and the severity of noise interference.

[0006] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.

[0007] According to a first aspect of the present invention, a method for detecting anomalies in gravity wave spectral images based on a pre-trained network is provided, the method comprising:

[0008] Step 1: Collect gravity wave spectral image data;

[0009] Step 2: Preprocess the collected gravity wave spectrum image;

[0010] Step 3: compress the data dimension of the pre-processed gravity wave spectrum image;

[0011] Step 4: Extract features of the gravitational wave spectrum image based on a pre-trained network. The pre-trained network is a ResNet network. The ResNet network consists of four layers, each of which outputs a feature map. The second and third layers in the middle of the ResNet network are selected as feature extraction layers to generate a multi-level feature map.

[0012] Step 5: Aggregate the extracted multi-level features and use adaptive average pooling and bilinear rescaling techniques to fuse features at different levels to generate a patch feature set;

[0013] Step 6: Sample the patch feature set and compress the feature library using the core set selection method to reduce storage requirements and computing resource consumption;

[0014] Step 7: Calculate the anomaly score of the test image based on the nearest neighbor algorithm, determine the abnormal area based on the anomaly score, and locate the abnormal area.

[0015] In some exemplary embodiments, in step 1, the gravity wave spectral image data is used to obtain a forward image by an interspheric airglow spectrophotometer, and the forward image includes data generated by an airglow spectral radiation module, an atmospheric radiation transmission module, an optical system module, and a CCD detector module;

[0016] Airglow spectrum radiation module, which provides the vibration-rotation spectrum line emission intensity data of the O2(0-1) band based on the HITRAN08 molecular spectrum database;

[0017] Atmospheric radiation transmission module, using ARTS software to simulate the transmission and attenuation of airglow radiation;

[0018] Optical system module, integrating optical transmittance, filter characteristics, optical distortion and flat field coefficient;

[0019] CCD detector module simulates the conversion process of photon signals to electronic signals.

[0020] In some exemplary embodiments, in step 2, the pretreatment includes:

[0021] Dark noise removal: Dark noise is subtracted from the observed image by taking dark noise images at regular intervals;

[0022] Cosmic ray rejection: High-brightness pixels are identified by threshold setting, and abnormal bright spots are removed using median filtering and adaptive smoothing.

[0023] Moonlight image rejection: Evaluate the impact of moonlight based on the changes in observed spectral line intensity and reject contaminated images.

[0024] In some exemplary embodiments, in step three, a max-min normalization technique is used to map the 16-bit image to 8 bits to perform data dimension compression.

[0025] In some exemplary embodiments, in step 5, feature aggregation includes:

[0026] Apply adaptive average pooling to each feature map to generate local-aware feature representation;

[0027] Feature maps at different levels are adjusted to the same size through bilinear rescaling and fused to generate a patch feature set.

[0028] In some exemplary embodiments, in step six, feature sampling adopts a core set selection method, and dimension reduction is performed through an iterative greedy algorithm and the Johnson-Lindenstrauss theorem to compress the size of the feature library.

[0029] In some exemplary embodiments, in step seven, abnormality detection and location includes:

[0030] Calculate the maximum distance between the test image patch feature and the nearest neighbor in the feature library to determine the anomaly score;

[0031] Adjust the anomaly score by a scaling factor to account for behavioral differences between adjacent patches;

[0032] A segmentation map is generated based on the anomaly score, and bilinear interpolation is used to match the original resolution to locate the abnormal area.

[0033] According to a second aspect of the present invention, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for detecting anomalies in gravity wave spectral images based on a pre-trained network according to the first aspect is implemented.

[0034] According to a third aspect of the present invention, a computer program product is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for detecting anomalies in gravity wave spectral images based on a pre-trained network according to the first aspect is implemented.

[0035] According to a fourth aspect of the present invention, there is provided an electronic device, comprising:

[0036] processor; and

[0037] a memory for storing executable instructions of the processor;

[0038] Wherein, the processor is configured to implement the method for detecting anomalies in gravity wave spectral images based on a pre-trained network as described in the first aspect above by executing the executable instructions.

[0039] The present invention provides a pre-trained network-based gravitational wave spectral image anomaly detection method. This method develops an image preprocessing method that, through a series of filtering, enhancement, and feature extraction steps, significantly improves the visualization and recognition capabilities of key data in the image. This preprocessing not only provides more accurate and reliable input for subsequent processing steps but also significantly reduces noise interference with anomaly detection results. Based on this, the present invention constructs a novel and effective gravitational wave spectral image anomaly detection model based on a pre-trained network. This model can perform feature analysis on images at both the image and pixel levels, fully utilizing image features for anomaly detection and accurately locating anomalous regions. For feature extraction, the present invention utilizes a convolutional neural network pre-trained on ImageNet. Because the ImageNet dataset contains a large number of natural images, its pre-trained model performs well in image feature extraction. The present invention selects the output of the network's intermediate layers as image features. This approach preserves local image information while avoiding feature loss due to over-abstraction. Through this approach, the present invention successfully combines the features of gravitational wave spectral images with the general features of the ImageNet dataset, providing a richer and more accurate information foundation for anomaly detection. Furthermore, this paper proposes an efficient inference method for image anomaly detection. By compressing the image feature repository and optimizing the inference process, this method achieves efficient pixel-level analysis and localization of gravity wave spectral images. This inference method not only improves computational efficiency but also ensures the accuracy and reliability of anomaly detection results.

[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present invention, and together with the description, serve to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and it is clear that those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0042] Figure 1 Schematic diagram of the anomaly detection structure of gravity wave spectral images based on pre-trained networks;

[0043] Figure 2 This is a flow chart of the anomaly detection method for gravity wave spectral images based on pre-trained networks;

[0044] Figure 3 The structure diagram and simulation example of the forward model of the mesosphere airglow spectrophotometer;

[0045] Figure 4 This is an image display of the gravitational wave spectral image dataset;

[0046] Figure 5 This is the flow chart of the gravity wave spectral image preprocessing algorithm;

[0047] Figure 6 Comparison diagram of the residual block structure of ResNet and WideResNet;

[0048] Figure 7 This is a flow chart for feature sampling of gravity wave spectral image data;

[0049] Figure 8 This is a flowchart of image anomaly detection and localization based on the nearest neighbor algorithm. DETAILED DESCRIPTION

[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0051] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0052] In view of the shortcomings and deficiencies of the existing technology, this example embodiment provides a method for detecting anomalies in gravity wave spectral images based on a pre-trained network. Figure 1 As shown in the paper, gravity wave spectral image data is first fed into a pre-trained network. By aggregating features from multiple intermediate layers and fusing features from different levels using bilinear scaling, the proposed method maintains spatial resolution and feature universality, effectively detecting subtle anomalies in the image. This method leverages deep high-level abstraction and shallow detail recognition, providing a robust feature information foundation for anomaly detection. A gravity wave image feature sampling method is then employed to create a core set by selecting representative samples from the original dataset. This reduces storage requirements, accelerates inference speed, and maintains anomaly detection accuracy. To address the technical challenges of low inference efficiency using traditional methods due to the large size and rich feature information of gravity wave spectral image data, an efficient inference method for gravity wave image anomaly detection is constructed. This method uses a core set subsampling method to reduce the dimensionality of features and employs nearest neighbor analysis to calculate anomaly scores. By compressing the image feature memory and optimizing the inference process, efficient pixel-level anomaly analysis and localization in gravity wave spectral images is achieved.

[0053] refer to Figure 2 As shown, the following steps may be specifically included:

[0054] Step 1: Collect gravity wave spectral image data;

[0055] Step 2: Preprocess the collected gravity wave spectrum image;

[0056] Step 3: compress the data dimension of the pre-processed gravity wave spectrum image;

[0057] Step 4: Extract features of the gravitational wave spectrum image based on a pre-trained network. The pre-trained network is a ResNet network. The ResNet network consists of four layers, each of which outputs a feature map. The second and third layers in the middle of the ResNet network are selected as feature extraction layers to generate a multi-level feature map.

[0058] Step 5: Aggregate the extracted multi-level features and use adaptive average pooling and bilinear rescaling techniques to fuse features at different levels to generate a patch feature set;

[0059] Step 6: Sample the patch feature set and compress the feature library using the core set selection method;

[0060] Step 7: Calculate the anomaly score of the test image based on the nearest neighbor algorithm, determine the abnormal area based on the anomaly score, and locate the abnormal area.

[0061] Below, each step in this exemplary implementation will be described in more detail with reference to the accompanying drawings and embodiments.

[0062] Step 1: Gravitational wave spectral image data acquisition

[0063] The top region of the mesosphere, as an important energy coupling zone in the Earth's atmosphere, hosts a variety of active dynamic processes, including the phenomenon of gravity waves. Temperature, as an effective tracer of these dynamic activities, plays a key role in revealing the complex physical processes occurring in this region. In view of this, in order to further explore this important scientific field, a new type of efficient gravity wave spectrometer has been designed and implemented for tasks such as gravity wave image capture and temperature monitoring. The gravity wave spectral image dataset used in the present invention is derived from the forward image generated by the mesosphere airglow spectrophotometer, an important optical device in the instrument. The forward model structure of the mesosphere airglow spectrophotometer and the gravity wave spectral image example are as follows: Figure 3-5 shown.

[0064] like Figure 3 As shown in Figure (a), the forward model of the airglow spectrophotometer consists of four key submodules: the airglow spectral radiation module, the atmospheric radiation transmission module, the optical system module, and the CCD (charge-coupled device) detector module. This forward model simulates how the CCD detector converts atmospheric optical radiation signals into electronic signals, providing theoretical support and practical guidance for instrument design, field observations, and the development of inversion algorithms.

[0065] Airglow Spectral Radiation Module: This module, based on the HITRAN08 molecular spectral database, provides detailed emission intensity data for the vibrational-rotational spectrum of the O2(0-1) band, emitted from multiple energy levels during electronic transitions of oxygen molecules (O2). The data covers the temperature range of 110 to 280 K, with temperature intervals as fine as 0.1 K, ensuring simulation accuracy.

[0066] Atmospheric Radiative Transfer Module: During the radiative transfer simulation process, this paper focuses on the atmospheric transmission of airglow radiation and its intensity attenuation. To this end, the Atmospheric Radiative Transfer Simulator (ARTS) software, jointly developed by the University of Hamburg and Chalmers University, was introduced. The ARTS software is designed to accurately simulate the airglow extinction process along the MASP observation path under clear sky conditions.

[0067] Optical System Module: This module comprehensively considers key factors such as the optical system's overall transmittance, filter characteristics, optical distortion, the flat field coefficient caused by varying light flux, and the modulation transfer function (MTF) within the field of view. These parameters are precisely measured through an in-lab calibration process, ensuring the reliability of the Optical System Module simulation.

[0068] CCD Detector Module: This module focuses on simulating the conversion process from photon signals to electron signals. In the forward model, key performance parameters of the CCD detector, such as responsivity, dark noise, readout noise, and shot noise, are carefully integrated to ensure that the model accurately reflects the actual detection process.

[0069] Based on the above-mentioned structure of the intermediate layer airglow spectrophotometer, the forward simulation diagram is as follows: Figure 3 (b) shows that, except Figure 3 (b), the images taken with different filters are quite different, so two of them are used as the baseline dataset for the three algorithms mentioned in this invention, and the training, testing, and reasoning of the model are all based on this dataset. Figure 4 As shown, the upper part is the large aperture image of gravitational waves, and the lower part is the small aperture image of gravitational waves.

[0070] Step 2: Gravitational wave spectral image preprocessing

[0071] The dataset used in this paper is data collected by the gravity wave instrument during its operation. The dataset was captured continuously for one month starting in September 2018 at the Nanjing University of Information Science and Technology Meteorological Comprehensive Base Platform. In October 2018, the mesosphere airglow spectrophotometer successfully obtained 13 sets of high-quality observation data, with observation time ranging from 7 to 10 hours. These data include 16 dark noise images and 3209 high-quality hyperspectral observation images, each of which is 256×256 in size.

[0072] like Figure 5 As shown, referring to the existing literature on the processing method of gravity wave spectrum images, the gravity wave spectrum image preprocessing process proposed in the present invention has the following steps:

[0073] Step 1: Dark Noise Removal: Dark noise, a form of noise inherent in image sensors under no-light conditions, is an essential component of image preprocessing. During the experiment, the shutter was closed periodically (e.g., every 30 minutes) and dark images were taken under the same exposure conditions to obtain dark noise images. These dark noise images actually contain the sensor's own dark noise and bias. The combined effect of the two causes pixel values to fall within the range of 1000 to 3000. These dark noise images are recorded and accurately subtracted from the observed image in subsequent image processing, effectively removing dark noise and improving image purity and signal-to-noise ratio.

[0074] Step 2: Cosmic ray removal: The impact of cosmic rays and high-energy particles on the observed image is mainly manifested as localized overexposed bright spots, which can seriously interfere with data accuracy and subsequent analysis. To remove these abnormal bright spots, it is first necessary to subtract the previously obtained dark noise image from the observed image. After that, the threshold is set to identify and remove these high-brightness pixels. To ensure a smooth transition in the image after removal, these removed points are median filtered using the pixel values of the surrounding 3x3 pixel matrix. The entire image is then subjected to an adaptive median filter to remove salt and pepper noise from the image. This process is called adaptive smoothing and effectively reduces the visual interference and data errors caused by cosmic rays.

[0075] Step 3: Eliminating Moonlight Images: In astronomical observations, moonlight not only illuminates the target but can also introduce significant background contamination, affecting the purity of the observed data. The degree of moonlight contamination depends on the lunar phase (full moon, new moon, etc.) and the moon's zenith angle relative to the observation point. Therefore, for acquired observation images, the degree of moonlight's influence needs to be assessed based on the intensity changes of the observed spectral lines. If the moonlight's influence is significant, resulting in a significant decrease in the quality of the observed data, these affected images should be screened and eliminated to ensure that the data used in subsequent analysis has a high signal-to-noise ratio and accuracy.

[0076] Step 3: Dimensional compression of gravitational wave spectral image data

[0077] Meteorological imagery is typically stored at a 16-bit bit depth. This high bit depth captures and records richer grayscale information, providing greater accuracy and detail in meteorological observations and analysis. However, when these high-resolution 16-bit images are used to train machine learning models, they inevitably impose significant computational burdens and memory requirements. To mitigate this burden without sacrificing excessive image information, a common approach is to employ max-min normalization techniques to efficiently map 16-bit images to 8 bits.

[0078]

[0079] In formula (1), X is the pixel value of each pixel in the image, X max and X min are the maximum and minimum values of the image pixels, respectively, norm The pixel values are normalized. This step not only reduces the image's bit depth, thereby reducing computational resources, but also maintains the relative integrity and recognizability of key information within the image. Max-min normalization is a linear transformation method that first converts pixel values in an image to between 0 and 1, then further maps this range to the desired bit representation as needed.

[0080] Step 4: Feature extraction of gravitational wave spectral image data based on pre-trained network

[0081] While the choice of feature representation is intuitive, relying on the last layer in the network architecture presents two major issues. First, relying on the output of the last layer can lead to the loss of rich local nominal information. This is particularly disadvantageous in anomaly detection tasks, as anomaly types are often unpredictable; relying on the feature representation of the last layer often fails to capture sufficient anomaly details, thus affecting detection performance. Second, the deep features generated by ImageNet pre-trained networks tend to be biased towards natural image classification tasks, which is not fully consistent with the requirements of anomaly detection tasks.

[0082] Given these limitations, the algorithm of this paper uses the intermediate-layer outputs of a pretrained convolutional neural network as image features. This not only preserves more detail and enriches the extraction of local information, but also ensures that the abstract information obtained is not overly biased towards the ImageNet data distribution. By extracting these intermediate-layer features, the algorithm can more precisely capture anomalies, thereby improving the performance and reliability of the entire anomaly detection model.

[0083] The pre-trained ResNet network is chosen as the feature extractor because its hierarchical structure can provide powerful feature representation for a variety of visual tasks. The ResNet network consists of four layers, each of which can produce a height of H i , width is W i , depth C i The feature map of i represents the level number, ranging from 1 to 4. The feature maps of different levels together constitute the feature hierarchy of the input image, providing the necessary information basis for subsequent analysis.

[0084] Regarding the selection of feature levels, while feature maps from any single layer can be selected, combining the outputs of multiple layers simultaneously provides a more comprehensive feature set. In the CNN feature hierarchy, shallower layers primarily capture low-level image features, such as textures, edges, and other specific details, while deeper layers capture more high-level, abstract features. ResNet has been shown to scale to thousands of layers and still achieve improved performance. However, to improve accuracy by one percentage point, the number of network layers must be nearly doubled. Therefore, training very deep ResNet networks suffers from reduced feature reuse, resulting in slow network training. Using a wide-ResNet network, on the other hand, improves training speed by reducing depth and increasing width. Furthermore, this combination of intermediate layer fusion preserves sufficient image detail while also including the necessary high-level features to support complex anomaly detection tasks. Therefore, to more accurately depict image features, balancing the expression of low-level visual information with the extraction of high-level, abstract features, this paper selects the second and third layers of the wide-ResNet-50 as the feature extraction combination. Comparison of ResNet and WideResNet residual block structures Figure 6 shown.

[0085] Step 5: Feature aggregation of gravitational wave spectral image data based on pre-trained network

[0086] In order to describe the patch representation more accurately, this paper further expands the notation introduced previously. Consider a specific feature map This is a three-dimensional tensor with depth c*, height h*, and width w*. For positions at height h∈{1,…,h*} and width w∈{1,…,w*}, the present invention uses to represent the c*-dimensional feature slice in height and width at that location.

[0087]

[0088] At the position (h,w), for a neighborhood N(h,w) p , applying an aggregate function f agg To merge the neighborhood N(h,w) p The feature vector within . This results in a local-aware feature representation for that location. This approach effectively integrates information from its surrounding neighborhood, providing richer context while remaining sensitive to subtle local differences. This balance of local and global information in the feature representation improves the model's overall performance in anomaly detection tasks.

[0089] In the gravity wave spectral image anomaly detection model based on a pre-trained network, the present invention uses adaptive average pooling technology to process each feature map. Adaptive average pooling can be regarded as a local smoothing process for each feature map. It creates a unified representative feature representation based on predefined dimensions at each position (h, w). This operation is performed on all positions h∈{1,…,h*} and w∈{1,…,w*}. The result can maintain its spatial resolution without losing the resolution of the original feature map. Specifically, the feature map tensor φ i,j , which is based on the patch feature set P based on local perception s,p (φ i,j ) can be expressed as follows

[0090]

[0091] In formula (3), this method obtains a patch feature set that incorporates local neighborhood information and can be used in the subsequent anomaly detection stage to accurately locate and identify abnormal features in the image. The introduction of adaptive pooling ensures the flexibility of feature representation, making it easier for the model to adapt to input images of different sizes while retaining sufficient information for accurate anomaly detection.

[0092] Based on experimental findings, the present invention finds that aggregating multiple feature hierarchies can bring specific advantages. In order to maintain the spatial resolution while ensuring the versatility of the features, the present invention model selects two intermediate layers, namely layers j and j+1. Under this setting, P s,p (φ i,j+1 ) needs to be calculated and the patch-level features obtained from this calculation are aggregated with the elements of the base hierarchy level (that is, the level with the highest resolution). To accomplish this step, P s,p (φ i,j+1 ) is bilinearly rescaled to ensure that its size is the same as P s,p (φ i,j ) consistent. This process ensures that features from different layers are effectively fused while maintaining their sensitivity to spatial detail, which is critical for accurately detecting and localizing potential subtle anomalies in images. Through this dual-layer feature selection and fusion strategy, the gravity wave spectral image anomaly detection model based on the pre-trained network can leverage both the high-level abstraction capabilities of deep-layer features and the detailed recognition capabilities of shallow-layer features. This combination provides a more powerful and refined feature foundation for anomaly detection tasks.

[0093] Step 7: Anomaly detection and location of gravity wave spectral images based on nearest neighbor algorithm

[0094] The core of image anomaly detection and localization lies in obtaining anomaly scores for each pixel in the test sample and for the entire image. Anomaly scores indicate the likelihood of anomaly at the detected pixel and typically range from [0, 1], with larger values indicating a greater probability of anomaly. Once pixel- and image-level anomaly scores are obtained, thresholding can be used to determine image anomalies and locate abnormal regions.

[0095] Using the standard patch feature repository M, the gravity wave spectral image anomaly detection model based on the pre-trained network can estimate the test image x test Image-level anomaly scores This score is calculated by calculating the feature set P(x test )=P s,p (φ j (x test )) and each nearest neighbor m in the repository M * The maximum distance obtained. Anomaly score s * It is determined based on the following criteria:

[0096]

[0097] s * =‖m test,* -m * ||2. (5)

[0098] In order to obtain the abnormal score s, the present invention uses s * A scaling factor w is applied to account for behavioral differences between adjacent patches in the test image: if a candidate anomaly m is closest to the test image patch test,* In the repository m * The corresponding feature in itself is already far away from its surrounding neighboring samples, which indicates that the feature does not appear frequently in the repository, thus increasing its anomaly score

[0099]

[0100] In formula (6), is the closest patch feature of b in M, used to test patch feature m * . Experiments have found that this reweighting is more powerful than the maximum patch distance. Given s, segmentation follows directly. The image-level anomaly score in formula (5) requires computing the anomaly score for each patch via an arg max-operation. The segmentation map can be computed in the same step by rescaling the computed patch anomaly scores according to their respective spatial positions. In order to match the original input resolution, the present invention chooses to upscale the result via bilinear interpolation.

[0101] Furthermore, the above-described figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention and are not intended to be limiting. It is readily understood that the processes illustrated in the above-described figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0102] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the claims.

[0103] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings and that various modifications and variations can be made without departing from the scope thereof, which is limited only by the appended claims.

Claims

1. A gravity wave image anomaly detection method based on a pre-trained network, characterized in that: The following steps are involved: Step 1: Collect gravity wave spectral image data; Step 2: Preprocess the collected gravity wave spectrum image; Step 3: compress the data dimension of the pre-processed gravity wave spectrum image; Step 4: Extract features of the gravitational wave spectrum image based on a pre-trained network. The pre-trained network is a ResNet network. The ResNet network consists of four layers, each of which outputs a feature map. The second and third layers in the middle of the ResNet network are selected as feature extraction layers to generate a multi-level feature map. Step 5: Aggregate the extracted multi-level features and use adaptive average pooling and bilinear rescaling techniques to fuse features at different levels to generate a patch feature set; Step 6: Sample the patch feature set and compress the feature library using the core set selection method; Step 7: Calculate the anomaly score of the test image based on the nearest neighbor algorithm, determine the abnormal area based on the anomaly score, and locate the abnormal area.

2. The method according to claim 1, characterized in that In the step 1, the gravity wave spectral image data is used to obtain a forward image through the intermediate layer airglow spectrophotometer, and the forward image includes data generated by the airglow spectrum radiation module, the atmospheric radiation transmission module, the optical system module and the CCD detector module; Airglow spectrum radiation module, which provides the vibration-rotation spectrum line emission intensity data of the O2(0-1) band based on the HITRAN08 molecular spectrum database; Atmospheric radiation transmission module, using ARTS software to simulate the transmission and attenuation of airglow radiation; Optical system module, integrating optical transmittance, filter characteristics, optical distortion and flat field coefficient; CCD detector module simulates the conversion process of photon signals to electronic signals.

3. The method according to claim 1, characterized in that In the step 2, the pre-processing includes: Dark noise removal: Dark noise is subtracted from the observed image by taking dark noise images at regular intervals; Cosmic ray rejection: High-brightness pixels are identified by threshold setting, and abnormal bright spots are removed using median filtering and adaptive smoothing. Moonlight image rejection: Evaluate the impact of moonlight based on the changes in observed spectral line intensity and reject contaminated images.

4. The method according to claim 1, wherein In the step three, the max-min normalization technique is used to map the 16-bit image to 8 bits to perform data dimension compression.

5. The method according to claim 1, wherein In step 5, feature aggregation includes: Apply adaptive average pooling to each feature map to generate local-aware feature representation; Feature maps at different levels are adjusted to the same size through bilinear rescaling and fused to generate a patch feature set.

6. The method according to claim 1, characterized in that In step six, feature sampling adopts a core set selection method, and dimension reduction is performed through an iterative greedy algorithm and the Johnson-Lindenstrauss theorem to compress the size of the feature library.

7. The method according to claim 1, characterized in that In step seven, anomaly detection and location include: Calculate the maximum distance between the test image patch feature and the nearest neighbor in the feature library to determine the anomaly score; Adjust the anomaly score by a scaling factor to account for behavioral differences between adjacent patches; A segmentation map is generated based on the anomaly score, and bilinear interpolation is used to match the original resolution to locate the abnormal area.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting anomalies in gravity wave images based on a pre-trained network according to any one of claims 1 to 7 is implemented.

9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for detecting anomalies in gravity wave images based on a pre-trained network according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the gravity wave image anomaly detection method based on a pre-trained network according to any one of claims 1 to 7 by executing the executable instructions.