Method for constructing cardiac ultrasound basic model
By constructing the basic model of cardiac ultrasound, using frequency domain random shading and dual decoder for feature extraction in the frequency domain and spatial domain, the problem of feature extraction under the conditions of high signal-to-noise ratio of cardiac ultrasound images is solved, and efficient training and accuracy of the model are achieved.
Patent Information
- Application Number
- CN202510436040.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-22
AI Technical Summary
It is difficult to effectively build a basic model suitable for cardiac ultrasound images, especially under high signal-to-noise ratio conditions, and there is a problem of category imbalance, resulting in a high misdiagnosis rate.
The method of building a basic cardiac ultrasound model includes building a multi-type cardiac ultrasound image database, performing data augmentation and frequency domain random occlusion, using encoder and dual decoder to perform feature extraction in the frequency and spatial domains, and realizing feature extraction of the model through self-supervised pre-training.
It reduces training cost and time consumption, improves the feature extraction capability of the model under high signal-to-noise ratio conditions, and enhances the generalization performance of the model and the accuracy of downstream tasks.
Smart Images

Figure CN120356684A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical image processing, and specifically relates to a method for constructing a basic model of cardiac ultrasound. Background Art
[0002] Heart diseases refer to the lesions in the structure or function of the heart, which lead to problems in the entire human circulatory system and have extremely strong concealment, making it not easy to detect in the early stage of the disease. Therefore, it is of great significance to effectively diagnose and timely treat heart diseases.
[0003] Echocardiography can display detailed information on the heart and its various chambers from different angles. This multi-perspective imaging feature provides a more comprehensive clinical basis for the diagnosis of heart diseases and is an important tool for evaluating the heart's morphology and function. It is widely used in the diagnosis of diseases such as heart valve diseases, cardiomyopathy, and myocardial infarction. With the development of artificial intelligence technology, the automatic assessment of heart function based on cardiac ultrasound images has become possible. However, most studies only focus on single tasks such as cardiac ventricle segmentation and cardiac view recognition. Such one-to-one models not only greatly increase the model training cost and time consumption but also have high requirements for image annotation. Therefore, constructing a highly transferable and versatile basic model of cardiac ultrasound, which can adapt to diverse downstream clinical tasks at a lower cost, has become an inevitable development trend in future clinical medicine.
[0004] The basic model of cardiac ultrasound is required to be able to adapt to various downstream tasks by relying on its powerful feature extraction ability. Although basic models such as MAE (Masked Autoencoders) and CLIP (Contrastive Language–Image Pretraining) have shown excellent feature extraction capabilities in the field of natural images, there are still many challenges in migrating them to the field of medical images, mainly because there are significant differences in data characteristics between the two. On the one hand, there is an essential difference between medical images and natural images in visual features; medical images are usually dominated by grayscale images with low contrast and contain a large amount of important subtle texture and structural information (such as organ morphology, lesion area, etc.), which is crucial for disease diagnosis. In contrast, natural images have rich colors, high contrast, and diverse scenes and objects. This difference makes the basic model directly applied to natural images perform poorly on medical images, and the model is difficult to effectively capture the key features in medical images. On the other hand, there is a common problem of class imbalance in medical image datasets; for example, the number of samples of certain diseases or lesions may be far less than that of normal samples, which will cause the model to be biased towards the majority class during training, thereby affecting the recognition ability of the minority class. This class imbalance problem not only makes the model over-adapt to common categories during training, but also may lead to insufficient recognition of rare categories, thereby increasing the risk of misdiagnosis. Therefore, directly transferring pre-trained models may lead to a decline in their performance in medical image analysis, especially when identifying minority diseases, which may result in a higher misdiagnosis rate or missed diagnosis rate.
[0005] Compared with other medical imaging modalities such as X-ray and CT, ultrasound images have significant differences in image features. First, ultrasound images usually have a higher noise level, which is mainly due to the scattering and attenuation of ultrasound waves in human tissue. These physical characteristics inevitably introduce a lot of noise into the image. Secondly, the resolution and contrast of ultrasound images are relatively low, which makes it particularly difficult to extract fine structural information from them. Therefore, it is difficult to achieve ideal generalization performance when directly migrating the basic model pre-trained on other modalities such as X-ray or CT to ultrasound images. Therefore, for ultrasound images, the model is required to have good feature extraction capabilities under high signal-to-noise ratio conditions. Summary of the invention
[0006] In view of the deficiencies in the prior art, the technical problem to be solved by the present invention is to propose a method for constructing a basic cardiac ultrasound model.
[0007] The present invention solves the technical problem by adopting the following technical solution:
[0008] A method for constructing a basic cardiac ultrasound model, characterized in that the method comprises the following steps:
[0009] Step 1: Construct a large database of cardiac ultrasound images, including various types of cardiac ultrasound images such as apical four-chamber view, apical two-chamber view, parasternal long-axis view, and parasternal short-axis view;
[0010] Step 2: Preprocess the cardiac ultrasound images, including data augmentation, fast Fourier transform, frequency-domain enhancement, frequency-domain random masking, and inverse Fourier transform;
[0011] Frequency-domain enhancement includes: calculating the modulus length of each element in the spectrogram according to Equation (2), performing quadrant translation operation on the spectrogram according to Equation (3), and performing logarithmic transformation on the translated spectrogram according to Equation (4) to obtain the logarithmic amplitude spectrogram;
[0012]
[0013] L(u,v) = log(M s (u,v) + 1) (4)
[0014] In the formula, M(u,v) represents the modulus length at (u,v) in the spectrogram, R(F(u,v)) and I(F(u,v)) respectively represent the real part and the imaginary part of the spectrogram F(u,v), M s (u,v) represents the translated spectrogram, mod represents the remainder operation, H and W respectively represent the height and width of the cardiac ultrasound image, and L(u,v) represents the logarithmic amplitude spectrogram;
[0015] Frequency-domain random masking: Perform random low-pass filtering operation on the logarithmic amplitude spectrogram using a randomly initialized low-pass filter to achieve random masking of the cardiac ultrasound image in the frequency domain;
[0016] Step 3: Construct an encoder and a dual decoder, where the dual decoder includes a spatial decoder and a frequency-domain decoder;
[0017] The encoder includes three stages. Both the first stage and the second stage include multiple feature extraction modules, and each feature extraction module includes a patch embedding layer and a convolutional block; in the convolutional block, the input feature passes through diffusion convolution and linear operations and then is connected with itself through a residual connection to obtain a residual feature; the residual feature passes through a fully connected layer and then is added to itself to obtain the output feature of the feature extraction module; the third stage includes a patch embedding layer and multiple visual state transfer modules VSSBlock;
[0018] The spatial decoder includes multiple visual state transfer modules VSSBlock;
[0019] The frequency-domain decoder includes multiple frequency-domain decoding modules. The output features of the last frequency-domain decoding module are subjected to layer normalization and inverse fast Fourier transform to obtain the output features of the frequency-domain decoder. The input features of the frequency-domain decoding module are multiplied by a trainable complex parameter after layer normalization and fast Fourier transform to obtain enhanced frequency-domain features. After the enhanced frequency-domain features are subjected to inverse Fourier transform, they are connected with the input features in a residual connection to obtain residual features. The residual features are subjected to layer normalization and a fully connected layer and then connected with themselves in a residual connection to obtain the output features of the frequency-domain decoding module.
[0020] Step 4: Use the large database of cardiac ultrasound images to pre-train the encoder. The pre-trained encoder is the basic cardiac ultrasound model.
[0021] In the pre-training stage, the convolutional blocks in the first and second stages of the encoder multiply the embedding vector by a masking mask to obtain a randomly masked embedding vector, which is used as the input for the diffusion convolution operation. The shallow features output by the first and second stages of the encoder are both subjected to convolution and flattening operations and then fused with the deep features output by the third stage. The fused features are linearly projected and then input into the spatial decoder and the frequency-domain decoder. The spatial decoder outputs the predicted cardiac ultrasound image, and the frequency-domain decoder outputs the predicted spectrogram.
[0022] Furthermore, in the pre-training stage, the training loss is calculated according to the following loss function.
[0023] Loss total = Loss SL + Loss STF + Loss FTS (10)
[0024] In the formula, Loss total represents the total training loss, Loss SL , Loss STF and Loss FTS represent the spatial loss, the spatial-frequency loss, and the frequency-spatial loss respectively.
[0025] The spatial loss function is:
[0026]
[0027] In the formula, Y i represents the image obtained by randomly masking the predicted image output by the spatial decoder, represents the pre-processed cardiac ultrasound image, and N represents the number of pixel points in the image that are not randomly masked.
[0028] The spatial-frequency loss function is:
[0029]
[0030] In the formula, L i represents the predicted log magnitude spectrogram after masking, represents the original log magnitude spectrogram after masking, K represents the number of pixel points in the masked area, and Masked represents the masked area;
[0031] The frequency - spatial loss function is:
[0032]
[0033] In the formula, ω(u, v) represents the weight, ⊙ represents matrix multiplication, represents the predicted spectrogram output by the frequency - domain decoder, represents the distance between the predicted spectrogram and the original spectrogram, R and I represent the real part and the imaginary part of the original spectrogram, represent the real part and the imaginary part of the predicted spectrogram.
[0034] Furthermore, the masking mask is obtained by upsampling the embedding vector obtained from the block embedding layer in the third stage of the encoder.
[0035] Furthermore, the input features of the visual state transfer module VSSBlock are successively passed through layer normalization, linear operation, diffusion convolution, SS2D block and layer normalization, then multiplied with the features after the input features pass through layer normalization and linear operation. The multiplied features are passed through a linear operation and then connected with the input features by residual connection to obtain the output features of the visual state transfer module VSSBlock.
[0036] Compared with the prior art, the beneficial effects of the present invention are:
[0037] In the pre - training stage, by randomly masking the cardiac ultrasound images in both the frequency domain and the spatial domain, it is equivalent to adding noise to the input cardiac ultrasound images, achieving the purpose of artificially blurring the image details and edge information. Without using any downstream task labels, the spatial decoder and the frequency - domain decoder are used to effectively repair the randomly masked cardiac ultrasound images from both the spatial domain and the frequency domain, thereby realizing feature extraction, obtaining a plug - and - play cardiac ultrasound basic model, reducing the training cost and time consumption. At the same time, the cardiac ultrasound basic model can accurately extract the key features of the heart from high - signal - to - noise - ratio cardiac ultrasound images, improving the performance and accuracy of the downstream task model. Adopting a self - supervised pre - training paradigm, the cardiac ultrasound basic model is pre - trained using a large database of cardiac ultrasound images, enabling it to extract general features of cardiac ultrasound images of different view types to be applicable to various downstream tasks, and having strong generalization performance.
[0038] The basic model of cardiac ultrasound takes the Mamba block as the core structure, realizes sequence modeling with linear time complexity, and aims to improve the computational efficiency and inference speed of the entire basic model in long-sequence modeling while achieving comparable modeling effects. Brief Description of the Drawings
[0039] Figure 1 is the pre-training framework diagram of the present invention;
[0040] Figure 2 is the structural diagram of the convolutional block in the pre-training stage of the present invention;
[0041] Figure 3 is the structural diagram of the visual state transfer module of the present invention;
[0042] Figure 4 is the structural diagram of the frequency-domain decoding module of the present invention;
[0043] Figure 5 is the segmentation network diagram of the downstream segmentation task. Detailed Embodiments
[0044] Specific embodiments are given below in conjunction with the accompanying drawings. The specific embodiments are only used to introduce the technical solutions of the present invention in detail and do not limit the protection scope of this application.
[0045] The present invention provides a method for constructing a basic model of cardiac ultrasound (hereinafter referred to as the method, see Figures 1 to 5 ), including the following steps:
[0046] The first step: Construct a large database of cardiac ultrasound images, which should include a public dataset and a private dataset of cardiac ultrasound images;
[0047] In this embodiment, the public dataset of cardiac ultrasound images includes the CAMUS dataset, the EchoNet-Dynamic dataset, the EchoNet-LVH dataset, the EchoNet-Pediatric dataset, the HMC-QU dataset, etc.; the private dataset of cardiac ultrasound images can be provided by local medical institutions. Finally, the large database of cardiac ultrasound images contains more than 4 million cardiac ultrasound images, including various types of images such as apical four-chamber view, apical two-chamber view, parasternal long-axis view, and parasternal short-axis view.
[0048] The second step: Preprocess the cardiac ultrasound images, including data augmentation, fast Fourier transform, frequency-domain enhancement, frequency-domain random masking, and inverse Fourier transform;
[0049] 2.1) Data augmentation: Random flipping, rotation, cropping, etc. are used to perform data augmentation on the cardiac ultrasound images.
[0050] 2.2) Fast Fourier Transform: The echocardiogram is transformed from the spatial domain to the frequency domain through the Fast Fourier Transform to obtain a spectrogram. The formula for the Fast Fourier Transform is:
[0051]
[0052] In the formula, F(u, v) represents the spectrogram, (u, v) represents the representation of the pixel point in the frequency domain, f(x, y) represents the pixel value at the pixel point (x, y) in the echocardiogram, and H and W respectively represent the height and width of the echocardiogram.
[0053] 2.3) Frequency Domain Enhancement: Calculate the modulus of each complex element in the spectrogram according to Equation (2). Due to the output characteristics of the Fourier transform, the zero-frequency component is initially distributed in the four corner regions of the spectrogram. Therefore, perform a quadrant translation operation on the spectrogram through Equation (3) to concentrate the low-frequency components of the spectrogram at the spectral center and distribute the high-frequency components representing the image detail information in the outer region of the spectral center. To further optimize the presentation effect of the frequency domain energy distribution, perform a logarithmic transformation on the translated spectrogram through Equation (4) to obtain a logarithmic amplitude spectrogram;
[0054]
[0055] L(u, v) = log(M s (u, v) + 1) (4)
[0056] In the formula, M(u, v) represents the modulus at (u, v) in the spectrogram, R(F(u, v)) and I(F(u, v)) respectively represent the real part and the imaginary part of the spectrogram, M s (u, v) represents the translated spectrogram, mod represents the modulo operation, and L(u, v) represents the logarithmic amplitude spectrogram.
[0057] 2.4) Random masking in the frequency domain: Feature extraction from cardiac ultrasound images is more challenging compared to other modality images. Due to the signal characteristics during the return of the ultrasound beam, ultrasound images often have problems such as high signal-to-noise ratio and blurred edges. Shadows generated by other tissue structures such as ribs also affect the clarity of key structures, making it difficult to identify important details in the ultrasound images. In the logarithmic amplitude spectrum, the high-frequency components represent the rapidly changing regions in the image, including information such as image details, edges, and textures. These high-frequency components are closely related to the clarity and details of the image, and they can reflect the subtle changes and sharp edge information in the image. Therefore, a randomly initialized low-pass filter is used to perform random low-pass filtering on the logarithmic amplitude spectrum, and then randomly mask the high-frequency components in the logarithmic amplitude spectrum to achieve random masking of cardiac ultrasound images in the frequency domain, so as to simulate the blurred effect of cardiac ultrasound images, achieve the purpose of artificially blurring image details and edge information, and further enhance the model's ability to extract features from low-quality cardiac ultrasound images; The logarithmic amplitude spectrum after random masking is expressed as:
[0058] L m (u,v) = L(u,v)·mask(u,v) (5)
[0059] In the formula, L m (u,v) represents the logarithmic amplitude spectrum after random masking, and mask(·) represents the randomly initialized low-pass filter;
[0060] 2.5) Inverse Fourier transform: According to Equation (6), perform an exponential transformation on the logarithmically amplitude spectrum after random masking to restore it from the logarithmic domain to the amplitude domain, obtaining the exponential amplitude spectrum; Reset the phase information of the exponential amplitude spectrum according to Equations (7) and (8), and then perform an inverse Fourier transform according to Equation (9) to convert from the frequency domain to the spatial domain, obtaining the preprocessed cardiac ultrasound image;
[0061] M m (u,v) = exp(L m (u,v)) - 1 (6)
[0062]
[0063]
[0064] In the formula, M m (u,v) represents the exponential amplitude spectrum, represents the reset exponential amplitude spectrum, and F r (x,y) represents the preprocessed cardiac ultrasound image.
[0065] Since the preprocessed cardiac ultrasound image is an image randomly masked in the frequency domain, this masking method effectively simulates the complex relationship between the changes in image features and noise interference in a high signal-to-noise ratio environment, thus prompting the encoder to pay more attention to the core information in the image; using the preprocessed cardiac ultrasound image to train the encoder enables the encoder to gradually learn the subtle features of the cardiac ultrasound image and extract the required feature information from the high signal-to-noise ratio cardiac ultrasound image.
[0066] Step 3: Construct an encoder and a dual decoder. The dual decoder includes a spatial decoder (Spatial Decoder) and a frequency decoder (Frequency Decoder);
[0067] The encoder includes three stages. The first stage and the second stage are used to extract shallow features and both include multiple (two in this embodiment) feature extraction modules. Each feature extraction module includes a patch embedding layer (PatchEmbedding) and a convolutional block. The patch embedding layer divides the input image into multiple non-overlapping image patches and then maps these image patches into an embedding vector space of a specific dimension to obtain embedding vectors. As Figure 2 shown, after the input features of the convolutional block pass through diffusion convolution and linear operations, they are connected with themselves through a residual connection to obtain residual features; the residual features pass through a fully connected layer (FC) and then are added to themselves to obtain the output features of the feature extraction module. The third stage includes a patch embedding layer and multiple (11 in this embodiment) visual state transfer modules (VSSBlock) for extracting deep features.
[0068] The visual state transfer module is the migration of the Mamba model to visual tasks. The Mamba model achieves an effect equivalent to that of the Transformer model with less computational effort; as Figure 3 shown, in the visual state transfer module, the input features sequentially pass through layer normalization, linear operation, diffusion convolution, Mamba block (SS2D) and layer normalization, and then are multiplied with the features of the input features after layer normalization and linear operation. The features obtained by multiplication pass through a linear operation and then are connected with the input features through a residual connection to obtain the output features of the visual state transfer module. The encoder combines the Mamba block and can extract ultrasound image features in multiple scales and at multiple levels, enabling the extracted ultrasound image features to be better applied to downstream tasks such as image classification, object detection and semantic segmentation.
[0069] The spatial decoder is stacked by multiple visual state transfer modules (VSSBlock) and is used to restore the spatial domain information of the randomly masked image.
[0070] The frequency domain decoder is used to recover the frequency domain information of the randomly masked image, including multiple frequency domain decoding modules (FFBlock). The output feature of the last frequency domain decoding module undergoes layer normalization and inverse fast Fourier transform to obtain the output feature of the frequency domain decoder. As Figure 4 shown, after the input feature of the frequency domain decoding module undergoes layer normalization and fast Fourier transform, it is multiplied by a trainable complex parameter to obtain an enhanced frequency domain feature; after the enhanced frequency domain feature undergoes inverse Fourier transform, it is connected with the input feature through a residual connection to obtain a residual feature; after the residual feature undergoes layer normalization and a fully connected layer, it is connected with itself through a residual connection to obtain the output feature of the frequency domain decoding module.
[0071] Step 4: Use the large database of cardiac ultrasound images to pre-train the encoder. The pre-trained encoder is the basic cardiac ultrasound model. The output features of the three stages of the basic cardiac ultrasound model are the extracted multi-scale cardiac ultrasound image features, which are used for downstream tasks such as image classification, object detection, and semantic segmentation;
[0072] In the pre-training stage, the convolutional blocks in the first and second stages of the encoder first multiply the embedding vector by the masking mask to randomly mask the embedding vector, obtaining a randomly masked embedding vector, which is used as the input for the diffusion convolution operation. Different from the random masking method of traditional MAE, the masking mask is obtained by upsampling the embedding vector obtained from the patch embedding layer in the third stage of the encoder with different sizes, and is used to randomly mask the image in the spatial domain.
[0073] Moreover, the shallow features output by the first and second stages of the encoder both undergo convolution and flattening operations, and then are fused with the deep features output by the third stage. The fused features undergo linear projection and then are input into the spatial decoder and the frequency domain decoder to recover the spatial domain and frequency domain information of the randomly masked image, enabling the encoder to extract image features by repairing the randomly masked image;
[0074] In the pre-training stage, calculate the training loss according to the following loss function;
[0075] Loss total = Loss SL + Loss STF + Loss FTS (10)
[0076] In the formula, Loss total represents the total training loss, Loss SL , Loss STF and Loss FTS represent the spatial loss, the spatial-frequency loss, and the frequency-spatial loss respectively;
[0077] The spatial loss is used to constrain the spatial decoder. A random mask is applied to the predicted image output by the spatial decoder, and then the mean squared error loss between the masked image and the preprocessed cardiac ultrasound image is calculated. The spatial loss function is obtained as follows:
[0078]
[0079] In the formula, Y i represents the image obtained by randomly masking the predicted image output by the spatial decoder, represents the preprocessed cardiac ultrasound image, and N represents the number of pixel points in the image that are not randomly masked;
[0080] The spatial-frequency loss is used to maintain the similarity between the predicted image output by the spatial decoder and the preprocessed cardiac ultrasound image in the frequency domain. The preprocessed cardiac ultrasound image and the predicted image output by the spatial decoder are processed respectively to obtain the original logarithmic magnitude spectrum image and the predicted logarithmic magnitude spectrum image. The original logarithmic magnitude spectrum image and the predicted logarithmic magnitude spectrum image are respectively masked by the same low-pass filter, and the mean squared error between the two in the masked area is calculated to enhance the encoder's ability to retain frequency features. The spatial-frequency loss function is expressed as:
[0081]
[0082] In the formula, L i represents the masked predicted logarithmic magnitude spectrum image, represents the masked original logarithmic magnitude spectrum image, K represents the number of pixel points in the masked area, and Masked represents the masked area;
[0083] The frequency-spatial loss is used to constrain the difference between the predicted spectrum image output by the frequency domain decoder and the original spectrum image. The frequency-spatial loss function is expressed as:
[0084]
[0085]
[0086] In the formula, ω(u, v) represents the weight, and ⊙ represents matrix multiplication, represents the predicted spectrum image output by the frequency domain decoder, represents the distance between the predicted spectrum image and the original spectrum image, R and I represent the real part and the imaginary part of the original spectrum image, represent the real part and the imaginary part of the predicted spectrum image.
[0087] The cardiac ultrasound basic model is migrated to the downstream segmentation task. The cardiac ultrasound basic model and the decoder of the downstream segmentation task jointly form a segmentation network (for example Figure 5) The multi-scale cardiac ultrasound image features output by the cardiac ultrasound basic model are passed to the decoder of the downstream segmentation task. The parameters of the cardiac ultrasound basic model are frozen, and the decoder of the downstream segmentation task is fine-tuned using the dataset to obtain the trained segmentation network, which is used for cardiac ultrasound image segmentation.
[0088] What is not described in this invention is applicable to the prior art.
Claims
1. A method for constructing a basic model of cardiac ultrasound, characterized in that, The method includes the following steps: Step 1: Construct a large database of cardiac ultrasound images, including various types of cardiac ultrasound images such as apical four-chamber view, apical two-chamber view, parasternal long-axis view, and parasternal short-axis view; Step 2: Preprocess the cardiac ultrasound images, including data augmentation, fast Fourier transform, frequency-domain enhancement, frequency-domain random masking, and inverse Fourier transform; The frequency-domain enhancement includes: calculating the modulus length of each element in the spectrogram according to Equation (2), performing a quadrant translation operation on the spectrogram according to Equation (3), and performing a logarithmic transformation on the translated spectrogram according to Equation (4) to obtain a logarithmic amplitude spectrogram; L(u, v) = log(M s (u, v) + 1) (4) Where, M(u, v) represents the modulus at (u, v) in the spectrogram, R(F(u, v)) and I(F(u, v)) respectively represent the real part and the imaginary part of the spectrogram F(u, v), and M s (u, v) represents the translated spectrogram, mod represents the modulo operation, H and W respectively represent the height and width of the cardiac ultrasound image, and L(u, v) represents the logarithmic amplitude spectrogram; Frequency-domain random masking: Perform a random low-pass filtering operation on the logarithmic amplitude spectrogram using a randomly initialized low-pass filter to achieve random masking of the cardiac ultrasound image in the frequency domain; Step 3: Construct an encoder and a double decoder, where the double decoder includes a spatial decoder and a frequency-domain decoder; The encoder includes three stages. Both the first stage and the second stage include multiple feature extraction modules, and each feature extraction module includes a patch embedding layer and a convolutional block; in the convolutional block, the input feature undergoes diffusion convolution and linear operations, and then is connected to itself through a residual connection to obtain a residual feature; the residual feature passes through a fully connected layer and is added to itself to obtain the output feature of the feature extraction module; the third stage includes a patch embedding layer and multiple visual state transfer modules VSSBlock; The spatial decoder includes multiple visual state transfer modules VSSBlock; The frequency-domain decoder includes multiple frequency-domain decoding modules. The output feature of the last frequency-domain decoding module undergoes layer normalization and inverse fast Fourier transform to obtain the output feature of the frequency-domain decoder; the input feature of the frequency-domain decoding module undergoes layer normalization and fast Fourier transform, and then is multiplied by a trainable complex parameter to obtain an enhanced frequency-domain feature; the enhanced frequency-domain feature undergoes inverse Fourier transform and is connected to the input feature through a residual connection to obtain a residual feature; the residual feature undergoes layer normalization and a fully connected layer and is connected to itself through a residual connection to obtain the output feature of the frequency-domain decoding module; Step 4: Pre-train the encoder using the large database of cardiac ultrasound images. The pre-trained encoder is the cardiac ultrasound basic model; In the pre-training stage, the convolutional blocks in the first and second stages of the encoder multiply the embedding vector by the masking mask to obtain a randomly masked embedding vector, which is used as the input for the diffusion convolution operation; the shallow features output by the first and second stages of the encoder both undergo convolution and flattening operations, and then are fused with the deep features output by the third stage. The fused features undergo linear projection and are input into the spatial decoder and the frequency-domain decoder. The spatial decoder outputs a predicted image, and the frequency-domain decoder outputs a predicted spectrogram.
2. The method for constructing a basic cardiac ultrasound model according to claim 1, wherein In the pre-training stage, calculate the training loss according to the following loss function; Loss total = Loss SL + Loss STF + Loss FTS (10) where Loss total represents the total training loss, and Loss SL , Loss STF and Loss FTS represent the spatial loss, the spatial-frequency loss, and the frequency-spatial loss, respectively; The spatial loss function is: where Y i represents the image obtained by randomly masking the predicted image output by the spatial decoder, represents the preprocessed cardiac ultrasound image, and N represents the number of pixel points in the image that are not randomly masked; The spatial-frequency loss function is: where L i represents the predicted log magnitude spectrogram after masking, represents the original log magnitude spectrogram after masking, K represents the number of pixel points in the masked area, and Masked represents the masked area; The frequency-space loss function is: Where, ω(u, v) represents the weight, and ⊙ represents matrix multiplication. represents the predicted spectrogram output by the frequency-domain decoder. represents the distance between the predicted spectrogram and the original spectrogram. R and I represent the real part and the imaginary part of the original spectrogram. represent the real part and the imaginary part of the predicted spectrogram.
3. The method for constructing a basic cardiac ultrasound model according to claim 1 or 2, characterized in that, The masking mask is obtained by upsampling the embedding vector obtained from the patch embedding layer in the third stage of the encoder.
4. The method for constructing a basic cardiac ultrasound model according to claim 3, wherein The input features of the visual state transfer module VSSBlock are successively passed through layer normalization, linear operation, diffusion convolution, SS2D block, and layer normalization, and then multiplied by the features obtained after the input features pass through layer normalization and linear operation. After the multiplied features pass through linear operation, they are then subjected to residual connection with the input features to obtain the output features of the visual state transfer module VSSBlock.
Citation Information
Cited By
Data enhancement system and method for small sample medical image annotation
CN121280460A
Data augmentation system and method for small sample medical image labeling
CN121280460B
Semantic segmentation model of satellite remote sensing image coupled with frequency domain decoder
CN122135364A