An adaptive high-resolution acoustic wave imaging method based on a SegViT neural network
The adaptive high-resolution acoustic imaging method using the SegViT neural network solves the problems of resolution loss and insufficient complex image processing capabilities of FCN in acoustic imaging, achieving higher recognition accuracy and more refined segmentation results.
Patent Information
- Application Number
- CN202311495029.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-11-10
AI Technical Summary
In existing technologies, fully convolutional neural networks (FCNs) suffer from resolution loss and insufficient ability to process complex images in acoustic imaging, making it difficult to achieve high-precision semantic segmentation.
By employing the SegViT neural network, an adaptive high-resolution imaging method is constructed. The SegViT network preserves global contextual information, avoids pooling operations, and combines self-attention mechanism and feature fusion to improve image segmentation accuracy.
It achieves higher recognition accuracy and more refined segmentation results, reduces the influence of near-source interference, and improves the model's generalization ability.
Smart Images

Figure CN117557450B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and relates to an adaptive high-resolution acoustic imaging method based on the SegViT neural network. Background Technology
[0002] Non-destructive testing is a current trend, and acoustic imaging is highly effective in detecting faults caused by surface wear, fractures, and other defects in fields such as aerospace, automotive, and high-voltage power plants. With the development of deep learning technology, problems commonly encountered in acoustic imaging, such as noise interference, near-source interference, and unknown frequency identification, can be effectively addressed. While fully convolutional neural networks (FCNs) can perform image-to-image prediction, they struggle with semantic segmentation of complex images at unknown frequencies. Furthermore, their use of pooling operations to reduce the spatial size of feature maps can lead to a loss of resolution. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide an adaptive high-resolution acoustic imaging method based on the SegViT neural network. Addressing the problems of FCN (Future Convolutional Neural Network) in using pooling operations to reduce the spatial size of feature maps, which leads to resolution loss and insufficient expressive power for complex image processing, the SegViT (Segmentation Vision Transformer) network is used to improve the recognition rate. Compared to FCN, the SegViT network is stronger at processing global contextual information, has greater scalability for complex images, retains more detailed information without using pooling, produces more refined segmentation results, and has better generalization ability.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] An adaptive high-resolution acoustic imaging method based on SegViT neural network, the method comprising the following steps:
[0006] S1: Dataset construction process:
[0007] S11: Under the condition of random sound source coordinates, intensity and number of sound sources at fixed intervals, beam imaging method is used to simulate and realize beam imaging cloud map under noisy conditions, and gridless adaptive high-resolution imaging target cloud map is constructed using the intensity and position coordinates of simulated sound sources.
[0008] S12: Divide the dataset into a dataset, a test set, and a validation set in a 6:2:2 ratio;
[0009] S2: Model Training and Testing Process
[0010] S21: The beam imaging cloud map is used as input, and the target imaging cloud map is used as the network training label. The input is fed into the VisionTransformer neural network model for model training, and the best weights are selected based on the performance on the test set.
[0011] S3: Model Validation
[0012] S31: Generate target imaging cloud map by inputting the verified beamforming cloud map data into the SegViT neural network model;
[0013] S32: Compare and verify the adaptive high-resolution imaging target cloud map and the generated result map in the set.
[0014] Optionally, in S12, the method for generating a noisy beamforming cloud map after constructing random sound source coordinates, intensity, and number of sound sources at a fixed interval is as follows: simulating 20 circular sensor arrays, using the Delayed Summation Algorithm (DAS) to construct the acquired signal, adding random noise, and then constructing a cloud map showing the relationship between intensity and position coordinates; the method for generating an adaptive high-resolution imaging target cloud map is as follows: first, constructing an n*n sound source grid, the number of grids corresponding to the resolution of the generated image; then using an adaptive target map function to characterize the composite relationship between the intensity, position, and distance between sound source points; using the sound source intensity and the adaptive target map function to construct the relationship between the intensity and position coordinates of the imaging signal to construct the imaging value of each target grid, finally obtaining an n*n target grid imaging vector. By finding the imaging vector The location of the sound source can be found by finding the local maximum value. The larger n is, the smaller the grid for finding the maximum value, and the more accurate the location is. Specifically:
[0015]
[0016] in Represents the sound source surface grid. Let ξ represent the sound source intensity, ξ() be the adaptive target graph function, and R be the source intensity. (l,n) This represents the two-dimensional distance between the grids of the l-th and n-th sound sources, where the size of n determines the resolution of the generated image.
[0017] Optionally, in step S21, constructing the SegViT neural network specifically includes the following steps:
[0018] S211: After processing the image size of the input beamforming cloud image, it is divided into multiple image blocks. Each image block is a square area in a grid pattern.
[0019] S212: Each image block is converted into a vector representation using a ViT encoder. Specifically, the input image blocks are fed into an embedding layer, which converts the image blocks into vector representations. Each image block is encoded into a fixed-length vector, and the position information of the image block is represented using a combination of sine and cosine functions. The position encoding is then added to the embedded image block vector. The embedded image block vector and the position encoding are fed into a Transformer encoder for processing. After processing through multiple Transformer encoder layers, a series of encoded image block vectors are generated as the output.
[0020] S213: The feature map output by the encoder is converted into a pixel-level segmentation result through the ATM (Attention-based Top-Down Modulation) decoder. Specifically, the decoder upsamples the feature map to the same resolution as the input image and uses a self-attention mechanism to learn the spatial relationships and contextual information between features. The decoder also combines low-level and high-level feature information through feature fusion to make full use of semantic information at different levels. Finally, the decoder maps the feature map to the pixel-level segmentation result through the segmentation head to generate the final segmentation prediction.
[0021] S214: Use a loss function to measure the difference between the segmentation prediction and the true segmentation label; train the SegViT model by optimizing the loss function to predict the segmentation result of the input image.
[0022] Optionally, the adaptive target map function ξ() is inversely related to the distance, simulating sound propagation. Near the sound source, it is significantly affected by ∈(l). The greater the intensity at the sound source, the smaller the value of ∈(l), and the larger the value of ξ() at the position corresponding to the sound source in the grid plane. Far from the sound source, it is significantly affected by R and has no effect. This allows for more precise adjustment of the sound source point to the target grid plane. The adaptive factor ∈(l) is adjusted for the intensity of each sound source and the minimum distance between sound sources. Since ∈(l) is positively related to d and inversely related to the intensity q, ∈(l) decreases when the sound source intensity is high and the distance is close, resulting in more accurate imaging of the target map. Adjusting for each sound source helps reduce the influence of near-source interference when multiple sources are superimposed. Its specific expression is:
[0023]
[0024] Where R represents distance, ρ = 0.0001, and d represents the distance between sound source points. It represents the intensity of the sound source.
[0025] Optionally, in S213, training the SegViT neural network specifically includes: using the cross-entropy loss function to describe the deviation between the real sample and the predicted sample; if the deviation value is greater than a certain value, backpropagation is performed through gradient descent, and then the values of the parameters are adjusted by calculating the partial derivatives layer by layer until the value of the cross-entropy approaches zero, i.e., model fitting.
[0026] Optionally, in step S213, the structure of the ATM is defined as follows: two token sequences are defined. The length N equals the number of classes. First, perform linear transformations on them respectively to form query Q, key K and value V, as shown in equation (1):
[0027]
[0028] Where G is the defined token sequence N is the number of tag classes, F i The layer outputs tags.
[0029] Optionally, the cross-entropy loss function C is:
[0030]
[0031] in Represents the labels from 1 to K, y (L) It is the output of the network model;
[0032] Optionally, the gradient descent method employs the Adam algorithm, whose adaptive process is as follows:
[0033]
[0034]
[0035] Where W is the optimization parameter, η is the learning rate, and ρ and β are hyperparameters.
[0036] The beneficial effects of this invention are as follows: Compared with traditional beam imaging methods, this invention establishes an adaptive high-resolution imaging cloud map based on intensity and position. By establishing a mapping relationship between beam imaging cloud maps of different frequencies and high-resolution imaging cloud maps through the SegViT neural network, the recognition accuracy can be effectively improved and the influence of near-source interference can be reduced.
[0037] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0038] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0039] Figure 1 A flowchart summarizing the overall network model;
[0040] Figure 2 A schematic diagram illustrating the principle of generating high-resolution imaging cloud images;
[0041] Figure 3 This is a schematic diagram comparing beamforming cloud images and high-resolution imaging cloud images.
[0042] Figure 4 This is a schematic diagram of the ViT encoder structure;
[0043] Figure 5 This is a schematic diagram of the ATM (Attention-based Top-Down Modulation) decoder structure.
[0044] Figure 6 A comparison chart of the generated graphs and the target graphs for different networks. Detailed Implementation
[0045] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0046] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0047] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0048] Please see Figures 1-6 , Figure 1 An adaptive high-resolution acoustic imaging method based on SegViT neural network includes the following steps:
[0049] S1: Dataset construction process:
[0050] S11: Under the condition of random sound source coordinates, intensity and number of sound sources at fixed intervals, beam imaging method is used to simulate and realize beam imaging cloud map under noisy conditions, and gridless adaptive high-resolution imaging target cloud map is constructed using the intensity and position coordinates of simulated sound sources.
[0051] S12: Divide the dataset into a dataset, a test set, and a validation set in a 6:2:2 ratio;
[0052] S2: Model Training and Testing Process
[0053] S21: The beam imaging cloud map is used as input, and the target imaging cloud map is used as the network training label. The input is fed into the VisionTransformer neural network model for model training, and the best weights are selected based on the performance on the test set.
[0054] S3: Model Validation
[0055] S31: Generate target imaging cloud map by inputting the verified beamforming cloud map data into the SegViT neural network model;
[0056] S32: Compare and verify the adaptive high-resolution imaging target cloud map and the generated result map in the set.
[0057] The method for generating adaptive high-resolution imaging target cloud maps in S11 is as follows: The relationship between the intensity and position coordinates of the imaging signal is constructed using the intensity and position relationship of the sound source. Specifically:
[0058] First, we establish the adaptive target graph function ξ() as follows:
[0059]
[0060] Where R represents distance, ρ = 0.0001, and d represents the distance between sound source points. It represents the intensity of the sound source.
[0061]
[0062] in Represents the sound source surface grid. Let ξ represent the sound source intensity, ξ() be the adaptive target graph function, and R be the source intensity. (l,n) This represents the two-dimensional distance between the grids of the l-th and n-th sound sources, where the size of n determines the resolution of the generated image.
[0063] By building The spectral plot between x and y yields an adaptive high-resolution imaging contour map. An adaptive high-resolution imaging contour map is an image used to represent the size and intensity of a plane, with the horizontal and vertical axes representing different parameters. The horizontal and vertical axes of the contour map represent the plane size, and the color intensity represents the intensity. The value of n determines the grid density, and the increase in resolution is positively correlated with the increase in the value of n. Figure 2 This is demonstrated in the diagram. Furthermore, there is an inverse relationship between the value of n and the minimum distance between sound sources, as well as the size of each sound source. A smaller value of n will help to more accurately assess the characteristics of individual sound sources. Therefore, the generation of contour maps can adaptively adjust the value of n based on the relationship between the sound source location and the point source intensity, thereby achieving the generation of adaptive high-resolution contour maps. This method also effectively reduces the influence of near-source interference, such as... Figure 3 The comparison chart is shown below.
[0064] In S21, the process of constructing and training the SegVit neural network is as follows: the constructed SegVit neural network contains a large number of weight parameters to be trained, and the training process is equivalent to the fitting process of each parameter. For example... Figure 1 The input acoustic imaging cloud image is segmented into a series of image patches. Each image patch is fed into the ViT encoder. The ViT encoder consists of multiple Transformer encoder layers for encoding and feature extraction of the image patches. Each Transformer encoder layer includes a self-attention mechanism and a feedforward neural network; its corresponding structure diagram is shown below. Figure 4 As shown in the diagram. The self-attention mechanism is used to capture the relationships between global image patches, while the feedforward neural network is used to perform non-linear transformations on each image patch. After processing through multiple Transformer encoder layers, the ViT encoder generates a series of encoded image patch feature vectors. The output feature vectors of the ATM encoder are fed into the SegViT decoder. The decoder is mainly responsible for converting the encoder's feature vectors into pixel-level segmentation results, and its structural diagram is shown in the diagram. Figure 5 As shown, the decoder employs a self-attention mechanism and upsampling operations to progressively restore the resolution of the feature map, and utilizes feature fusion to combine feature information from different levels. Specifically, the decoder upsamples the feature map to the same resolution as the input image and uses a self-attention mechanism to learn the spatial relationships and contextual information between features. The decoder also combines low-level and high-level feature information through feature fusion to fully utilize semantic information at different levels. Finally, the decoder maps the feature map to pixel-level segmentation results using a segmentation head, generating the final segmentation prediction. The cross-entropy loss function is used to measure the difference between the segmentation prediction and the true segmentation label. The cross-entropy loss function C is:
[0065]
[0066] in Represents the labels from 1 to K, y (L) It is the output of the network model;
[0067] In this invention, the gradient descent method employs the Adam algorithm, and its adaptive process is as follows:
[0068]
[0069]
[0070] Where W is the optimization parameter, η is the learning rate, and ρ and β are hyperparameters. Typically, ρ = 0.9 and β = 0.999 are chosen.
[0071] 2. Preparation for the experiment
[0072] 1) Dataset creation
[0073] The dataset for acoustic imaging cloud maps and adaptive high-resolution imaging cloud maps includes: using MATLAB, random values from 1kHz to 8kHz were used as sound sources, with the number of sound sources ranging from 1 to 5, and the source locations and intensities were randomized. A simulated circular sensor array of 20 was used, and the acquired signals were constructed using the DAS (delay-and-sum) method. After adding random noise, a cloud map showing the relationship between intensity and location coordinates was built. Simultaneously, the corresponding adaptive high-resolution imaging target cloud maps were generated using the method shown. The specific composition and distribution of the acoustic imaging cloud map and adaptive high-resolution imaging cloud map dataset are shown in Table 1, with 1000 images in each category, totaling 40,000 acoustic imaging cloud maps and adaptive high-resolution imaging cloud maps.
[0074] Table 1
[0075]
[0076] 2) Parameter settings
[0077] This experiment uses the PyTorch toolkit to build the proposed network structure and implement the training algorithm. The detailed training parameters used are shown in Table 2.
[0078] Table 2
[0079]
[0080] 3) Model Examples and Experiments
[0081] This invention designs to measure the difference between generated and ground truth cloud maps on the validation set, using Mean Absolute Error (MAE) as the evaluation metric for cloud map prediction. MAE describes the average level of the entire cloud map prediction, and a MAE below 0.1 is considered extremely accurate. The expression for MAE is:
[0082]
[0083] in: The grid values representing the generated image, f = {f1, f2, ..., f...} n} represents the grid values of the real image, and n is the total number of grids.
[0084] The FCN and U-Net networks were compared. The input images were all processed to a size of 256*256, and then center data augmentation was used to transform them to a size of 224*224. The comparison between the generated image and the original image is shown below. Figure 6 As shown in Table 3, the accuracy rates are as follows.
[0085] Table 3
[0086] accuracy 86.4% 90.2% 96.1%
[0087] The experimental results are shown in Table 3, which shows that the method proposed in this invention can achieve a good recognition accuracy.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An adaptive high-resolution acoustic imaging method based on a SegViT neural network, characterized in that: The method includes the following steps: S1: Dataset construction process: S11: Under the condition of random sound source coordinates, intensity and number of sound sources at fixed intervals, beam imaging method is used to simulate and realize beam imaging cloud map under noisy conditions, and gridless adaptive high-resolution imaging target cloud map is constructed using the intensity and position coordinates of simulated sound sources. S12: Divide the dataset into a dataset, a test set, and a validation set in a 6:2:2 ratio; The method for generating a noisy beamforming cloud map after constructing random sound source coordinates, intensity, and number of sound sources at a fixed interval is as follows: Simulate 20 circular sensor arrays, use the Delayed Summation Algorithm (DAS) to construct the acquired signals, add random noise, and construct a cloud map relating intensity and position coordinates; the method for generating an adaptive high-resolution imaging target cloud map is as follows: First, construct a... n*n The size of the sound source grid is determined, with the number of grids corresponding to the resolution of the generated image. An adaptive target map function is then used to characterize the composite relationship between the sound source intensity, location, and distances between sound source points. The relationship between the intensity of the imaging signal and its location coordinates is constructed using the sound source intensity and the adaptive target map function to generate the imaging value for each target grid, ultimately resulting in an image. n*n Target mesh imaging vector By finding the imaging vector The location of the corresponding sound source can be found by finding the local maximum value. n The larger the value, the smaller the grid for finding the maximum value, and the more precise the location is. Specifically: in Represents the sound source surface grid. Represents the intensity of the sound source. For adaptive target graph function, Indicates the relationship between the l-th sound source and the l-th sound source. n The two-dimensional distance between each sound source grid n The size determines the resolution of the generated image; The adaptive target graph function The propagation of sound is inversely related to distance; simulating sound propagation, at locations closer to the sound source, the sound is affected by... The impact is significant; the greater the intensity at the sound source point, the better. The smaller the value, The larger the value at the location corresponding to the sound source in the grid plane, the more sensitive the location is to sound. At locations farther from the sound source, the more sensitive the sound is to sound. R The impact is significant, but it will not have an effect, thus allowing for more precise adjustment of the sound source point to the target grid plane; an adaptive factor is used. The magnitude of the intensity at each sound source point and the minimum distance between sound source points are adjusted accordingly. and d Positively correlated with intensity q The relationship is inverse; therefore, when the sound source intensity is high and the distance is close, It will become smaller, resulting in more accurate imaging of the target image. By adjusting for each sound source point, it helps to reduce the influence of near-source interference when multiple sources are superimposed; its specific expression is: in, R Represents distance, , d Represents the distance between sound source points. Represents the intensity of the sound source; S2: Model Training and Testing Process S21: The beam imaging cloud map is used as input, and the target imaging cloud map is used as the network training label. The input is fed into the VisionTransformer neural network model for model training, and the best weights are selected based on the performance on the test set. S3: Model Validation S31: Generate target imaging cloud map by inputting the verified beamforming cloud map data into the SegViT neural network model; S32: Compare and verify the adaptive high-resolution imaging target cloud map and the generated result map in the set.
2. The adaptive high-resolution acoustic imaging method based on SegViT neural network according to claim 1, characterized in that: In step S21, constructing the SegViT neural network specifically includes the following steps: S211: After processing the image size of the input beamforming cloud image, it is divided into multiple image blocks. Each image block is a square area in a grid pattern. S212: Each image block is converted into a vector representation using a ViT encoder. Specifically, the input image blocks are fed into an embedding layer, which converts the image blocks into vector representations. Each image block is encoded into a fixed-length vector, and the position information of the image block is represented using a combination of sine and cosine functions. The position encoding is then added to the embedded image block vector. The embedded image block vector and the position encoding are fed into a Transformer encoder for processing. After processing through multiple Transformer encoder layers, a series of encoded image block vectors are generated as the output. S213: The feature map output by the encoder through the ATM decoder is converted into a pixel-level segmentation result. Specifically, the decoder increases the resolution of the feature map to the same level as the input image through upsampling and uses a self-attention mechanism to learn the spatial relationships and contextual information between features. The decoder also combines low-level and high-level feature information through feature fusion to make full use of semantic information at different levels. Finally, the decoder maps the feature map to a pixel-level segmentation result through the segmentation head to generate the final segmentation prediction. S214: Use a loss function to measure the difference between the segmentation prediction and the true segmentation label; train the SegViT model by optimizing the loss function to predict the segmentation result of the input image.
3. The adaptive high-resolution acoustic imaging method based on the SegViT neural network according to claim 2, characterized in that: In step S213, training the SegViT neural network specifically includes: using the cross-entropy loss function to describe the deviation between the real sample and the predicted sample; if the deviation value is greater than a certain value, backpropagation is performed through gradient descent, and then the values of the parameters are adjusted by calculating the partial derivatives layer by layer until the value of the cross-entropy approaches zero, i.e., model fitting.
4. The adaptive high-resolution acoustic imaging method based on SegViT neural network according to claim 2, characterized in that: In step S213, the structure of the ATM is defined as follows: two token sequences are defined. ,length N Equal to the number of classes, First, perform linear transformations on them respectively to form query Q, key K, and value V, as shown in the following formula: in, For the defined token sequence , N For the number of tag classes, The layer outputs tags. .
5. The adaptive high-resolution acoustic imaging method based on the SegViT neural network according to claim 3, characterized in that: The cross-entropy loss function C for: in Indicates 1 to K The tag, It is the output of the network model.
6. The adaptive high-resolution acoustic imaging method based on the SegViT neural network according to claim 3, characterized in that: The gradient descent method uses the Adam algorithm, and its adaptive process is as follows: in, W To optimize parameters, For learning rate, , This is a hyperparameter.
Citation Information
Patent Citations
Noise reduction method for sound wave far detection imaging picture
CN115170428A
Systems and methods for synthetic aperture ultrasound imaging of an object
US20220155440A1