Ultrasound heart image lightweight segmentation method and device, electronic equipment and medium

Through hierarchical knowledge distillation and multi-scale heavy parameter convolution, a lightweight echocardiac image segmentation algorithm is constructed, which solves the problem of excessive computing resource demand caused by excessive amounts of deep neural network parameters, and realizes high-precision segmentation on portable devices to meet clinical needs.

CN120298694APending Publication Date: 2025-07-11SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510366501.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

Deep neural networks have too many parameters in the echocardiac image segmentation task, resulting in too high demand for computing resources and are difficult to deploy on portable medical devices. Reducing the number of network layers will significantly reduce feature extraction capabilities and cannot meet the clinical segmentation accuracy requirements.

Method used

Using hierarchical knowledge distillation technology, a lightweight echocardiac image segmentation algorithm is constructed through multi-scale re-parameter convolution and hierarchical knowledge distillation strategies, and high-precision segmentation is achieved with fewer parameters using the knowledge of large-capacity models, including multi-branch parallel structure training and re-parameterized design in a single branch inference stage.

Benefits of technology

While reducing the amount of parameters and calculation complexity, it maintains high-precision semantic segmentation effect. It is suitable for portable medical equipment, meets the needs of clinical real-time diagnosis, and has good versatility and practical value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298694A_ABST
    Figure CN120298694A_ABST
Patent Text Reader

Abstract

The invention provides an ultrasonic heart image lightweight segmentation method and device, electronic equipment and a medium, and the method comprises the steps: obtaining an ultrasonic heart image data set containing a heart tissue semantic tag, inputting the ultrasonic heart image data set into a second artificial intelligence model, and obtaining a second intermediate feature image set and a second semantic segmentation image set; training the first artificial intelligence model according to the ultrasonic heart image data set containing the heart tissue semantic tag, the second intermediate feature image set and the second semantic segmentation image set, so that the first artificial intelligence model establishes a corresponding relation between the ultrasonic heart image and an image segmentation result; and obtaining a current cardiac medical image of the target patient, and determining a current image segmentation result corresponding to the current cardiac medical image through the corresponding relationship. And hierarchical knowledge distillation is performed on the first artificial intelligence model through the second intermediate feature image set and the second semantic segmentation image set, so that the calculation efficiency is kept while high precision is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical image segmentation, and in particular to a lightweight segmentation method, device, electronic device and medium for ultrasonic cardiac images. Background Art

[0002] Ultrasonic cardiac image segmentation is one of the key tasks in the field of medical image processing and is of great significance for cardiac health assessment and disease diagnosis. Traditional methods based on artificial feature extraction and classical image processing have problems such as being time-consuming and laborious, relying on expert experience, and having poor generalization. With the development of computer vision and deep learning technologies, automated segmentation methods based on deep neural networks have gradually become a research hotspot.

[0003] Compared with traditional methods, deep neural networks have significant advantages in the field of ultrasonic cardiac image segmentation. By automatically extracting high-level features, it can effectively solve problems such as device sensor noise, patient individual differences, and blurred boundaries between soft tissues that are difficult to overcome by traditional methods. At the same time, deep learning methods have stronger feature expression capabilities and adaptability, and can accurately identify cardiac structures in different morphologies and pathological states.

[0004] However, the large number of parameters of deep neural networks restricts their clinical application in ultrasonic cardiac image segmentation tasks. As the number of network layers increases, the number of parameters of deep neural networks increases sharply, resulting in excessive requirements for computing resources and making it difficult to deploy on portable medical devices; while reducing the number of network layers will significantly reduce the feature extraction ability and cannot meet the clinical segmentation accuracy requirements. Summary of the Invention

[0005] In view of the above problems, this application is proposed to provide a lightweight segmentation method, device, electronic device and medium for ultrasonic cardiac images that overcome or at least partially solve the above problems, including:

[0006] A lightweight segmentation method for ultrasonic cardiac images, the method involves a first artificial intelligence model to be trained and a second artificial intelligence model that has been trained, and the number of network parameters of the first artificial intelligence model is less than that of the second artificial intelligence model. The method includes:

[0007] Obtain an ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, and input the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set;

[0008] Train the first artificial intelligence model based on the ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results;

[0009] Obtain the current cardiac medical image of the target patient, and determine the corresponding current image segmentation result according to the corresponding relationship.

[0010] Further, the network structure of the first artificial intelligence model includes: a multi-branch parallel structure in the training stage and a single-branch structure in the inference stage, where the multi-branch parallel structure includes a residual branch, a 3×3 convolution branch, and a 1×1 convolution branch, and the single-branch structure is to equivalently merge the multi-branch parallel structure into a single branch.

[0011] Further, the step of training the first artificial intelligence model according to the ultrasonic cardiac image dataset containing cardiac tissue semantic labels, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a corresponding relationship between the ultrasonic cardiac image and the image segmentation result includes:

[0012] Input the ultrasonic cardiac image dataset containing cardiac tissue semantic labels into the first artificial intelligence model to obtain a first intermediate feature map set and a first semantic segmentation map set;

[0013] Generate a label supervision loss according to the cardiac tissue semantic labels and the first semantic segmentation map set;

[0014] Generate an intermediate-level distillation loss according to the first intermediate feature map set and the second intermediate feature map set;

[0015] Generate an output-level distillation loss according to the first semantic segmentation map set and the second semantic segmentation map set;

[0016] Train the first artificial intelligence model according to the label supervision loss, the intermediate-level distillation loss, and the output-level distillation loss, so that the first artificial intelligence model establishes a corresponding relationship between the ultrasonic cardiac image and the image segmentation result.

[0017] Further, the step of generating an intermediate-level distillation loss according to the first intermediate feature map set and the second intermediate feature map set includes:

[0018] Generate a mutual information loss and a channel importance loss according to the first intermediate feature map set and the second intermediate feature map set;

[0019] Generate the intermediate-level distillation loss according to the mutual information loss and the channel importance loss.

[0020] Further, the step of generating a mutual information loss and a channel importance loss according to the first intermediate feature map set and the second intermediate feature map set includes:

[0021] Align the number of channels of the first intermediate feature map set and the second intermediate feature map set;

[0022] Based on a preset mutual information calculation function, and determine the mutual information loss and the channel importance loss according to the first intermediate feature map set and the second intermediate feature map set after aligning the number of channels.

[0023] Further, the step of generating the output-level distillation loss according to the first semantic segmentation map set and the second semantic segmentation map set includes:

[0024] Determine a first spatial attention map corresponding to the first semantic segmentation map set and a second spatial attention map corresponding to the second semantic segmentation map set according to the first semantic segmentation map set and the second semantic segmentation map set;

[0025] Generate the output-level distillation loss according to the first semantic segmentation map set, the second semantic segmentation map set, the first spatial attention map and the second spatial attention map.

[0026] Further, the step of obtaining the current cardiac medical image of the target patient and determining the corresponding current image segmentation result through the corresponding relationship includes:

[0027] Deploy the trained first artificial intelligence model to the target embedded medical device;

[0028] Input the current cardiac medical image into the first artificial intelligence model to obtain the current image segmentation result corresponding to the current cardiac medical image.

[0029] A device relates to a first artificial intelligence model to be trained and a trained second artificial intelligence model, and the number of network parameters of the first artificial intelligence model is less than that of the second artificial intelligence model. The device includes:

[0030] A feature extraction module, configured to obtain an ultrasonic cardiac image dataset containing cardiac tissue semantic labels, and input the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set;

[0031] A model training module, configured to train the first artificial intelligence model according to the ultrasonic cardiac image dataset containing cardiac tissue semantic labels, the second intermediate feature map set and the second semantic segmentation map set, so that the first artificial intelligence model establishes a corresponding relationship between the ultrasonic cardiac image and the image segmentation result;

[0032] An image segmentation module, configured to obtain the current cardiac medical image of a target patient, and determine the corresponding current image segmentation result of the current cardiac medical image according to the corresponding relationship.

[0033] An electronic device includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of an ultrasonic cardiac image lightweight segmentation method as described above are implemented.

[0034] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of an ultrasonic cardiac image lightweight segmentation method as described above are implemented.

[0035] The present application has the following advantages:

[0036] In the embodiments of the present application, in view of the technical problems in the prior art that an increase in the number of network layers leads to too high requirements for computing resources, and a decrease in the number of network layers will significantly reduce the feature extraction ability, the present application provides a solution for hierarchical knowledge distillation. Specifically: obtaining an ultrasonic cardiac image data set containing semantic labels of cardiac tissues, and inputting the ultrasonic cardiac image data set into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set; training the first artificial intelligence model according to the ultrasonic cardiac image data set containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a corresponding relationship between the ultrasonic cardiac image and the image segmentation result; obtaining the current cardiac medical image of the target patient, and determining the corresponding current image segmentation result of the current cardiac medical image according to the corresponding relationship. Through hierarchical knowledge distillation of the first artificial intelligence model using the second intermediate feature map set and the second semantic segmentation map set, the knowledge of the large-capacity model can be efficiently utilized, enabling the lightweight network to obtain better semantic segmentation results with fewer parameters, ensuring high accuracy while maintaining computational efficiency. The present invention also has good generality and practical value, and can be extended and applied to other medical image segmentation tasks. The method of the present invention is simple and easy to use, without the need for a complex model pruning process, reducing the complexity of model training. Description of the Drawings

[0037] In order to more clearly illustrate the technical solutions of the present application, the drawings required for the description of the present application will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1It is a schematic diagram of the network architecture of the first artificial intelligence model provided by an embodiment of the present application;

[0039] Figure 2 It is a schematic flowchart of the process of hierarchical knowledge distillation provided by an embodiment of the present application;

[0040] Figure 3 It is a flowchart of the steps of a lightweight segmentation method for ultrasonic cardiac images provided by an embodiment of the present application;

[0041] Figure 4 It is a flowchart of step S120 of a lightweight segmentation method for ultrasonic cardiac images provided by an embodiment of the present application;

[0042] Figure 5 It is a flowchart of step S123 of a lightweight segmentation method for ultrasonic cardiac images provided by an embodiment of the present application;

[0043] Figure 6 It is a flowchart of step S124 of a lightweight segmentation method for ultrasonic cardiac images provided by an embodiment of the present application;

[0044] Figure 7 It is a flowchart of step S130 of a lightweight segmentation method for ultrasonic cardiac images provided by an embodiment of the present application;

[0045] Figure 8 It is a block diagram of the structure of a lightweight segmentation device for ultrasonic cardiac images provided by an embodiment of the present application;

[0046] Figure 9 It is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Detailed implementation manners

[0047] To make the objectives, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners. Obviously, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0048] By analyzing the existing technologies, the inventors found that: Model compression methods reduce the size of the model by reducing the number of network parameters, thereby reducing storage and computing requirements. Common model compression techniques include weight pruning, low-rank decomposition, and quantization. Weight pruning reduces the number of network parameters by pruning the weights in the network that have less impact on the final output; low-rank decomposition uses matrix decomposition methods to represent the high-dimensional weight matrix as the product of multiple low-rank matrices, thereby reducing the number of parameters; quantization methods convert the floating-point weights and activation values in the network into data types with lower bit widths, thereby reducing storage and computing overhead. However, while these methods reduce model parameters and storage, they limit the model's expressive power to varying degrees, resulting in a decrease in its accuracy and failing to meet clinical requirements.

[0049] Network structure optimization aims to reduce computational complexity by designing an efficient network structure. Design network architectures specifically for resource-constrained environments. These networks achieve lightweight by reducing the computational amount of convolutional operations and the number of parameters in the network layers; decompose standard convolutional operations into depthwise convolution and pointwise convolution to reduce the computational amount. However, these methods may lead to deficiencies in the model's ability to capture details. Especially in tasks that require precise edge detection and detail restoration, this lightweight method may not work well.

[0050] Knowledge distillation is a way of transferring knowledge from a teacher model to a student model, aiming to improve the segmentation ability of lightweight models. During the distillation process, the complex and expressive teacher model transfers its segmentation prediction results to the lightweight student model, enabling the student model to learn the feature processing methods of the teacher model with fewer parameters. This method has been widely studied because it can effectively compress the model, improve computational efficiency, and maintain high accuracy at the same time.

[0051] However, the lightweight segmentation method based on knowledge distillation faces the following three problems when applied to ultrasonic cardiac images:

[0052] a. The knowledge capacity of the lightweight student model is low. The model structure determines its knowledge capacity, and the multi-scale targets and detailed features in ultrasonic cardiac images require the model to be able to capture global information and local details simultaneously. The student model with a low knowledge capacity is difficult to effectively learn the feature extraction ability of the teacher model, thereby affecting the segmentation effect;

[0053] b. The distillation dimension is single. Traditional knowledge distillation methods usually only perform distillation at the segmentation result layer, ignoring the rich feature information in the intermediate layers of the teacher model, resulting in the student model being unable to fully absorb the potential advantages of the teacher model, thus leading to insufficient feature expression ability and the segmentation accuracy being difficult to meet the requirements of clinical applications;

[0054] c. The way of knowledge transfer is inefficient. The method based on hard difference or cross-entropy loss ignores the different importance of different features and positions in the learning process. Especially in the process of ultrasonic cardiac image segmentation, the image features of different regions have different impacts on the segmentation results. For example, the boundaries of the heart, the details of blood vessels, and structures such as myocardium may have different saliencies in the image. The traditional distillation method based on hard difference or cross-entropy loss cannot effectively consider these differences between regions, resulting in the student model ignoring the different importance of different features and positions during the learning process. In this way, the student model may not be able to focus on feature extraction in key regions, thereby affecting the accuracy of the overall segmentation effect. Especially when dealing with complex ultrasonic cardiac images, it is easy to lead to low-quality segmentation results.

[0055] The present invention aims to solve the above problems. By introducing a multi-scale reparameterizable convolution and a hierarchical knowledge distillation strategy, a lightweight ultrasonic cardiac image segmentation algorithm that meets the clinical segmentation requirements is constructed.

[0056] It should be noted that in machine learning, Knowledge Distillation is also translated as Knowledge Refinement. Generally, it refers to the process of transferring knowledge from a large model to a smaller model to obtain a concise and lightweight model representation. Knowledge distillation usually has two models. The original model is relatively large and has a large number of network parameters, which is called the teacher model, that is, the second artificial intelligence model in this application. This is the model used to teach knowledge and transfer rules to another model. The second small model is the student model, which has a smaller number of network parameters, that is, the first artificial intelligence model in this application. Among them, the above-mentioned number of network parameters refers to the total amount of weight parameters that need to be trained and stored in a deep learning model, which is the total number of all learnable variables inside the model, specifically including: convolutional kernel weights (Weights), bias terms (Bias), batch normalization layer parameters (BNParameters), and other trainable parameters (such as weights in the attention mechanism, parameters of custom layers, etc.).

[0057] In this embodiment, the second artificial intelligence model is a trained model. The algorithm of the second artificial intelligence model can analyze the rules between ultrasonic cardiac images and image segmentation results, and find the mapping rules between ultrasonic cardiac images and image segmentation results through the self-learning and adaptive characteristics of the artificial intelligence model to obtain the corresponding relationship between ultrasonic cardiac images and image segmentation results.

[0058] The first artificial intelligence model is a lightweight model to be trained. Through knowledge distillation, a target function is set, and the learning process tries to minimize the difference between the outputs of the two models, so that the student model mimics the performance of the teacher model and outputs similar results.

[0059] Refer to Figure 3, showing a lightweight segmentation method for ultrasonic cardiac images provided by an embodiment of the present application;

[0060] The method includes:

[0061] S110. Obtain an ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, and input the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set;

[0062] S120. Train the first artificial intelligence model according to the ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results;

[0063] S130. Obtain the current cardiac medical image of the target patient, and determine the current image segmentation result corresponding to the current cardiac medical image through the correspondence.

[0064] In the embodiments of the present application, in view of the technical problems in the prior art that an increase in the number of network layers leads to excessive requirements for computing resources, and a decrease in the number of network layers will significantly reduce the feature extraction ability, the present application provides a solution for hierarchical knowledge distillation. Specifically: obtain an ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, and input the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set; train the first artificial intelligence model according to the ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results; obtain the current cardiac medical image of the target patient, and determine the current image segmentation result corresponding to the current cardiac medical image through the correspondence. By performing hierarchical knowledge distillation on the first artificial intelligence model through the second intermediate feature map set and the second semantic segmentation map set, the knowledge of the large-capacity model can be efficiently utilized, enabling the lightweight network to obtain better semantic segmentation effects with fewer parameters, ensuring high precision while maintaining computational efficiency.

[0065] Next, a lightweight segmentation method for ultrasonic cardiac images in this exemplary embodiment will be further described.

[0066] Before introducing the hierarchical knowledge distillation scheme of the present invention, the network architectures of the first artificial intelligence model and the second artificial intelligence model of the present invention will be introduced first.

[0067] The following is the network architecture of the first artificial intelligence model:

[0068] To design a student model with high capacity, a multi-scale reparameterized convolutional feature fusion network is introduced, adopting a dual-state structure design for training and inference. As Figure 1 shown, this convolution adopts a multi-branch parallel structure during the training phase, including a residual branch for capturing large-scale spatial context information, a 3×3 convolution branch for extracting medium-scale features, and a 1×1 convolution branch for fusing information between channels, to enhance the model's perception ability of multi-scale features. During the inference phase, based on the reparameterization technique and the linear property of convolution operations, the parallel branches are equivalently merged into a single efficient branch, significantly reducing the network's parameter quantity and computational overhead while maintaining the feature extraction ability.

[0069] It should be noted that during the training phase, the model parameters are optimized through data-driven methods to learn the feature expression and segmentation ability of ultrasonic heart images. Through multi-branch and distillation strategies, the three branches work simultaneously, each capturing features at different scales and receiving the distillation knowledge at the intermediate and output levels of the teacher model, breaking through the knowledge capacity limitation of lightweight models and improving the segmentation accuracy.

[0070] During the inference phase, after training is completed, the model is merged into a single-branch structure through reparameterization and directly processes new ultrasonic images. The parameters are fixed and do not need to be updated, belonging to the deployment and application phase. Through reparameterization, the clinical real-time requirements are met while ensuring accuracy. Among them, reparameterization is a technique in deep learning model design, aiming to achieve the differentiation of network structures between the training phase and the inference phase by adjusting the network structure or parameter representation form, thereby significantly reducing the computational complexity while ensuring the model performance.

[0071] The advantages of reparameterization are: a lightweight: only a single convolutional kernel is required during inference, and the parameter quantity and computational amount are significantly reduced (for example, the parameter quantity is reduced by about 3 times after merging). b performance lossless: through the multi-branch structure, multi-scale features are fully learned during the training phase, and the feature expression ability is retained after equivalent merging during inference. c deployment-friendly: suitable for embedded devices (such as portable ultrasound devices), meeting the requirements of real-time computing and low resources.

[0072] As an example, during the reparameterization process, by padding the boundaries of the convolutional kernels, the residual branch and the 1×1 convolution branch are converted into 3×3 convolution forms, obtaining three convolutional kernels K1, K2, K3.

[0073] According to the linear additivity of the convolutional kernels, the equivalent convolutional kernel is obtained:

[0074]

[0075] where K i is the convolutional kernel of each branch, and β i is the scaling coefficient of each branch (the scaling coefficient of the BN layer).

[0076] The overall network adopts a U-shaped structure, and the convolutional layers therein are replaced with the above-mentioned multi-scale reparameterized convolution. Among them, the U-shaped structure refers to a symmetric encoder-decoder structure network. Each layer of features in the encoder during the feature extraction process is transmitted to the corresponding layer of the decoder through skip connections to help the decoder recover more detailed information, thereby improving the accuracy of image segmentation and the ability to recover details.

[0077] By adopting a lightweight network structure, the present invention significantly reduces the number of model parameters and computational complexity, can efficiently operate on portable medical devices to achieve real-time analysis, and thus effectively improves the clinical diagnosis efficiency.

[0078] The following is the network architecture of the second artificial intelligence model:

[0079] Select a variety of typical medical image segmentation network architectures as candidate teacher models. Evaluate the performance of each model in the ultrasonic cardiac image segmentation task through five-fold cross-validation, mainly examining the segmentation accuracy (including Dice coefficient, IoU, boundary F1 score), model stability (performance fluctuations between different folds), and generalization ability (performance on the validation set). Finally, select the teacher network with the richest feature performance for distilling the lightweight student model.

[0080] As an example, medical image segmentation network architectures such as UNet, IFT-Net, or DAEFF-Net can be selected as teacher models.

[0081] As described in step S110, obtain an ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, and input the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set.

[0082] As an example, obtain an ultrasonic cardiac image dataset from public databases, cooperation with scientific research institutions, hospitals, medical device companies, etc., and then construct a high-quality cardiac ultrasound dataset, implement accurate image annotation and diverse data augmentation.

[0083] To construct a high-quality cardiac ultrasound dataset and extract representative image frames from echocardiogram sequences, due to the high similarity of cardiac morphology between adjacent frames, a fixed-interval sampling strategy is adopted to ensure the diversity of samples. The acquired images are subjected to quality assessment, and samples with poor imaging quality, low contrast, or blurred boundaries are excluded. The screened images are preprocessed by standardization and converted into grayscale images of a unified size to construct an initial dataset. To provide a benchmark signal for supervised learning and ensure the medical accuracy of model segmentation, the dataset is annotated. In the annotation stage, a professional physician team with more than 5 years of ultrasound diagnosis experience accurately annotates the images to obtain pixel-level semantic labels of cardiac tissues. The annotation content includes two categories: background and left ventricle. To ensure the annotation quality, a double-person cross-validation mechanism is adopted, and expert discussions are carried out on samples with disagreements to determine the final annotation results. To enhance the scale and diversity of the dataset, a systematic data augmentation strategy is implemented, including geometric transformations (random rotation ±15°, horizontal flipping, scale scaling by 0.8 - 1.2 times), optical transformations (brightness adjustment ±20%, contrast enhancement, gamma correction 0.8 - 1.2), and noise injection (Gaussian noise σ = 0.01 - 0.03, salt-and-pepper noise density 0.01 - 0.02). Finally, the processed dataset is divided into a training set, a validation set, and a test set in a ratio of 7:2:1.

[0084] The following is the overall architecture of the hierarchical knowledge distillation scheme of the present invention.

[0085] As Figure 2 shown, hierarchical knowledge distillation is divided into two parts: intermediate-level knowledge distillation and output-level knowledge distillation. Intermediate-level knowledge distillation aims to guide the student model to learn the feature extraction ability of the teacher model, while output-level knowledge distillation guides the student model to learn the semantic segmentation map of the teacher model. The combination of the two enables the lightweight student model to learn rich feature processing and ultrasonic cardiac image segmentation capabilities with fewer parameters.

[0086] Among them, the above-mentioned feature extraction ability refers to the ability of the model to extract high-level semantic features related to the task from the input image, such as key information such as cardiac boundaries, ventricular structures, and soft tissue textures in ultrasonic cardiac images.

[0087] The above-mentioned semantic segmentation map refers to the class prediction probability distribution of each pixel point in the input image, and the predicted probability value is for a certain pixel point. For example, the probability value distribution maps of the two categories of "left ventricle" and "background" in an ultrasonic image, with the probability of the left ventricle being 0.95 and the background being 0.05.

[0088] As an example, an ultrasonic cardiac image dataset is input into the teacher model. The teacher model is trained on the ultrasonic cardiac image dataset with actual labels to learn the data distribution and features, and outputs the extracted features and semantic probability maps. The data output by the teacher model serves as the basis for training the student model.

[0089] In a specific implementation, in the ultrasonic cardiac image segmentation task, the teacher model learns rich multi-scale features from the ultrasonic cardiac image dataset, including: large-scale context information (such as the overall shape of the heart), medium-scale local features (such as the edges of the ventricular walls), and fine-grained details (such as the boundary between the myocardium and blood); the segmentation output (semantic segmentation map) of the teacher model contains more accurate class confidence information, which is particularly significant in the following scenarios: blurred boundary regions (such as the junction between the myocardium and blood), noise interference regions (such as sensor noise in ultrasonic images), and small target regions (such as heart valves).

[0090] As described in step S120, the first artificial intelligence model is trained based on the ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results.

[0091] In this example, a lightweight student network is trained based on hierarchical knowledge distillation. Specifically, through intermediate-level knowledge distillation, the feature extraction ability of the teacher network is transferred to the student network, and the intermediate-level features of the teacher and student networks are aligned; through output-level knowledge distillation, the segmentation result knowledge of the teacher network is transferred to the student network, and the segmentation results are supervised. In addition, a label-supervised lightweight model is also used during the training process to enable it to learn the image semantic distribution from actual labels.

[0092] The above-mentioned image semantic distribution refers to the global or local statistical feature distribution of different semantic regions (such as the heart, blood vessels, etc.) in the image, including spatial distribution and feature distribution. The spatial distribution includes the position, shape, and scale relationship of semantic targets; the feature distribution includes texture, edges, context relevance, etc. Its data form is the feature map of the intermediate layer, which contains multi-scale semantic information. For example: the intermediate-level features of the teacher model contain strong responses at the heart boundary, detailed encoding of myocardial texture, etc.

[0093] Refer to Figure 4 , in an embodiment of the present invention, the specific process of "training the first artificial intelligence model based on the ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results" described in step S120 can be further described in combination with the following description.

[0094] S121. Input the ultrasonic cardiac image dataset containing the semantic labels of cardiac tissues into the first artificial intelligence model to obtain a first intermediate feature map set and a first semantic segmentation map set.

[0095] As an example, input the same ultrasonic cardiac image dataset input to the teacher model into the student model. The student model and the teacher model share the same batch of labeled data and output the extracted features and semantic probability maps. At this time, the first intermediate feature map set and the first semantic segmentation map set obtained by the student model may be inaccurate and need to be corrected, while the data output by the teacher model serves as the basis for training the student model.

[0096] S122. Generate a label supervision loss based on the semantic labels of cardiac tissues and the first semantic segmentation map set.

[0097] In addition to intermediate-level knowledge distillation and output-level knowledge distillation, a label supervision lightweight model is also used during the training process to enable the first artificial intelligence network to learn the image semantic distribution from the actual labels. Supervised learning is carried out by calculating the cross-entropy loss between the prediction results of the student model and the actual labels. The actual labels provide a clear optimization target for the student model and drive the optimization of model parameters.

[0098] As an example, the label supervision function L l can be expressed as:

[0099] L l = L CE (y l , y s )

[0100] where L CE represents the cross-entropy loss function; y l represents the semantic labels of cardiac tissues; y s represents the first semantic segmentation map output by the student model.

[0101] S123. Generate an intermediate-level distillation loss based on the first intermediate feature map set and the second intermediate feature map set.

[0102] Referring to Figure 5 , in an embodiment of the present invention, the specific process of step S123 "generating an intermediate-level distillation loss based on the first intermediate feature map set and the second intermediate feature map set" can be further described in combination with the following description.

[0103] S1231. Generate a mutual information loss and a channel importance loss based on the first intermediate feature map set and the second intermediate feature map set.

[0104] It should be noted that the goal of intermediate-level knowledge distillation is to enable the student model to imitate the intermediate-layer feature expressions of the teacher model, which is mainly achieved through feature alignment based on maximizing mutual information and selective knowledge transfer considering channel importance.

[0105] The above-mentioned mutual information loss refers to maximizing the mutual information between the intermediate features of the teacher model and the student model, so that the features of the student model can fully capture the key information hidden in the teacher model, especially the multi-scale structural features in ultrasonic heart images.

[0106] The above-mentioned channel importance loss refers to aligning the channel importance distributions of the intermediate features of the teacher model and the student model, so that the student model pays attention to the same key channels as the teacher model.

[0107] In an embodiment of the present invention, the specific process of step S1231, "generating mutual information loss and channel importance loss according to the first intermediate feature map set and the second intermediate feature map set", can be further described in combination with the following description.

[0108] As described in the following steps, align the number of channels of the first intermediate feature map set and the second intermediate feature map set; based on a preset mutual information calculation function, and determine the mutual information loss and the channel importance loss according to the first intermediate feature map set and the second intermediate feature map set after aligning the number of channels.

[0109] As an example, the mutual information loss L m can be expressed as:

[0110] L m =-M(F(f t ),F(f s ))

[0111] where f t and f s represent the features extracted by the teacher model and the student model respectively, M(·,·) represents the mutual information calculation function, and F(·) represents the channel number conversion function, which aligns the number of channels of f t and f s .

[0112] The calculation method of M(·,·) is:

[0113] M(x,y)=H(x)-H(x|y)

[0114] where H(·) is the entropy calculation function.

[0115] As an example, the channel importance loss L h can be expressed as:

[0116]

[0117] Among them, represents the Kullback-Leibler (KL) divergence function. The calculation method of

[0118]

[0119] S1232. Generate the intermediate-level distillation loss based on the mutual information loss and the channel importance loss.

[0120] As an example, the loss function of the intermediate-level knowledge distillation L f is defined as:

[0121] L f = αL m + βL h

[0122] Among them, L m is the mutual information loss, L h is the channel importance loss, and α and β are the weight coefficients of each loss term.

[0123] S124. Generate the output-level distillation loss based on the first semantic segmentation atlas and the second semantic segmentation atlas.

[0124] Referring to Figure 6 , in an embodiment of the present invention, the specific process of step S124 "generating the output-level distillation loss based on the first semantic segmentation atlas and the second semantic segmentation atlas" can be further described in combination with the following description.

[0125] It should be noted that at the output segmentation features, the present invention applies a combination of a cross-entropy-based distillation method and an attention transfer mechanism, enabling the student network to imitate the attention map of a powerful teacher network to significantly improve the performance of the student network.

[0126] The above-mentioned cross-entropy loss refers to directly aligning the final output probabilities of the student and teacher models.

[0127] The above-mentioned attention transfer mechanism is to imitate the spatial attention weights of the teacher model for key regions, enabling the student model to pay more attention to the regions that significantly affect the segmentation result.

[0128] S1241. Determine the first spatial attention atlas corresponding to the first semantic segmentation atlas and the second spatial attention atlas corresponding to the second semantic segmentation atlas based on the first semantic segmentation atlas and the second semantic segmentation atlas.

[0129] As an example, the semantic probability map applies a spatial attention function to generate a spatial attention map to reflect the importance weights of different spatial positions. The form of obtaining the spatial attention map Q is:

[0130] Q = Conv(l)

[0131] where Conv(·) represents the spatial attention function, and l is the output semantic probability map of the model.

[0132] S1242. Generate an output-level distillation loss based on the first semantic segmentation map set, the second semantic segmentation map set, the first spatial attention map set, and the second spatial attention map set.

[0133] As an example, the output-level distillation loss function is defined as:

[0134]

[0135] where l t , l s respectively represent the output semantic probability maps of the student model and the teacher model, and respectively represent the vector forms of the j-th layer spatial attention maps corresponding to the student model and the teacher model. δ is the weight parameter of the attention loss.

[0136] S125. Train the first artificial intelligence model based on the label supervision loss, the intermediate-level distillation loss, and the output-level distillation loss, so that the first artificial intelligence model establishes a correspondence between the ultrasonic heart image and the image segmentation result.

[0137] As an example, the parameters of the student model are updated simultaneously by the label supervision loss, the intermediate-level distillation loss, and the output-level distillation loss to minimize the total loss L, and the trained student model is obtained. The overall loss function of the hierarchical knowledge distillation scheme is:

[0138] L = L l + L f + γL t

[0139] where L l is the label supervision function, L f is the intermediate-level distillation loss, L t is the output-level distillation loss, and γ is the weight coefficient of the output-level distillation loss.

[0140] It should be noted that the first artificial intelligence model after training is capable of analyzing the pattern between the ultrasonic heart image and the image segmentation result, and can find the mapping rule between the ultrasonic heart image and the image segmentation result through the self-learning and self-adaptive characteristics of the artificial intelligence model, so as to obtain the corresponding relationship between the ultrasonic heart image and the image segmentation result.

[0141] As described in step S130, obtain the current cardiac medical image of the target patient, and determine the current image segmentation result corresponding to the current cardiac medical image through the corresponding relationship.

[0142] Refer to Figure 7 , in an embodiment of the present invention, the specific process of "obtaining the current cardiac medical image of the target patient and determining the current image segmentation result corresponding to the current cardiac medical image" described in step S130 can be further described in combination with the following description.

[0143] S131. Deploy the trained first artificial intelligence model to the target embedded medical device.

[0144] In a specific implementation, in order to deploy the trained lightweight neural network to the embedded medical device, the present invention uses the OpenVINO toolchain to optimize the model deployment process. First, export the PyTorch model to the ONNX format, and then convert it to the IR format of OpenVINO, and perform computational graph optimization strategies such as fusing operators, eliminating redundant nodes, and optimizing the memory layout to obtain a better model structure.

[0145] S132. Input the current cardiac medical image into the first artificial intelligence model, and output the current image segmentation result corresponding to the current cardiac medical image.

[0146] The trained lightweight neural network is successfully deployed to the embedded medical device and applied to the ultrasonic heart image segmentation task. The present invention can operate efficiently on portable medical devices and meet the real-time image segmentation requirements in resource-constrained environments.

[0147] The present invention adopts multi-scale reparameterized convolutions with different structures in the training and inference stages, designs a lightweight ultrasonic image segmentation network with multi-scale feature expression ability, and constructs a hierarchical knowledge distillation framework to improve the semantic segmentation performance of the lightweight network without changing the structure.

[0148] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment.

[0149] Refer to Figure 8, which shows an ultrasonic cardiac image lightweight segmentation device provided by an embodiment of the present application. The device involves a first artificial intelligence model to be trained and a second artificial intelligence model that has been trained. The number of network parameters of the first artificial intelligence model is less than that of the second artificial intelligence model;

[0150] Specifically, it includes:

[0151] A feature extraction module 810, configured to obtain an ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, and input the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set;

[0152] A model training module 820, configured to train the first artificial intelligence model according to the ultrasonic cardiac image dataset containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results;

[0153] An image segmentation module 830, configured to obtain the current cardiac medical image of a target patient, and determine the current image segmentation result corresponding to the current cardiac medical image through the correspondence.

[0154] In an embodiment of the present invention, the network structure of the first artificial intelligence model includes: a multi-branch parallel structure in the training stage and a single-branch structure in the inference stage. Among them, the multi-branch parallel structure includes a residual branch, a 3×3 convolution branch, and a 1×1 convolution branch, and the single-branch structure is to equivalently merge the multi-branch parallel structure into a single branch.

[0155] In an embodiment of the present invention, the model training module 820 includes:

[0156] A first model data input sub-module, configured to input the ultrasonic cardiac image dataset containing semantic labels of cardiac tissues into the first artificial intelligence model to obtain a first intermediate feature map set and a first semantic segmentation map set;

[0157] A label supervision sub-module, configured to generate a label supervision loss according to the semantic labels of cardiac tissues and the first semantic segmentation map set;

[0158] An intermediate-level distillation sub-module, configured to generate an intermediate-level distillation loss according to the first intermediate feature map set and the second intermediate feature map set;

[0159] An output-level distillation sub-module, configured to generate an output-level distillation loss according to the first semantic segmentation map set and the second semantic segmentation map set;

[0160] The first model training sub-module is used to train the first artificial intelligence model according to the label supervision loss, the intermediate-level distillation loss, and the output-level distillation loss, so that the first artificial intelligence model establishes the correspondence between the ultrasonic cardiac image and the image segmentation result.

[0161] In an embodiment of the present invention, the intermediate-level distillation sub-module includes:

[0162] The mutual information and channel importance loss calculation unit is used to generate the mutual information loss and the channel importance loss according to the first intermediate feature map set and the second intermediate feature map set;

[0163] The intermediate-level distillation loss calculation unit is used to generate the intermediate-level distillation loss according to the mutual information loss and the channel importance loss.

[0164] In an embodiment of the present invention, the mutual information and channel importance loss calculation unit includes:

[0165] The channel number alignment sub-unit is used to align the channel numbers of the first intermediate feature map set and the second intermediate feature map set;

[0166] The mutual information calculation sub-unit is used to determine the mutual information loss and the channel importance loss based on a preset mutual information calculation function and according to the first intermediate feature map set and the second intermediate feature map set after aligning the channel numbers.

[0167] In an embodiment of the present invention, the output-level distillation sub-module includes:

[0168] The attention map calculation unit is used to determine the first spatial attention map set corresponding to the first semantic segmentation map set and the second spatial attention map set corresponding to the second semantic segmentation map set according to the first semantic segmentation map set and the second semantic segmentation map set;

[0169] The output-level distillation loss calculation unit is used to generate the output-level distillation loss according to the first semantic segmentation map set, the second semantic segmentation map set, the first spatial attention map set, and the second spatial attention map set.

[0170] In an embodiment of the present invention, the image segmentation module 830 includes:

[0171] The model deployment sub-module is used to deploy the trained first artificial intelligence model to the target embedded medical device;

[0172] The image segmentation output sub-module is used to input the current cardiac medical image into the first artificial intelligence model to obtain the current image segmentation result corresponding to the current cardiac medical image.

[0173] Reference Figure 9 , a computer device for an ultrasonic cardiac image lightweight segmentation method according to the present invention is shown, which may specifically include the following:

[0174] The computer device 12 is presented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0175] The bus 18 represents one or more of several bus 18 structures, including a memory bus 18 or a memory controller, a peripheral bus 18, a graphics acceleration port, a processor, or a local bus 18 using any bus 18 structure in a variety of bus 18 structures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus 18, Micro Channel Architecture (MAC) bus 18, Enhanced ISA bus 18, Video Electronics Standards Association (VESA) local bus 18, and Peripheral Component Interconnect (PCI) bus 18.

[0176] The computer device 12 typically includes a variety of computer system-readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0177] The system memory 28 may include computer system-readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Although Figure 9 not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 through one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42 configured to perform the functions of the embodiments of the present invention.

[0178] A program / utilities 40 having a set (at least one) of program modules 42 can be stored, for example, in a memory. Such program modules 42 include - but are not limited to - an operating system, one or more application programs, other program modules 42, and program data. Each or some combination of these examples may include the implementation of a network environment. The program modules 42 generally execute the functions and / or methods in the embodiments described in the present invention.

[0179] The computer device 12 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, a camera, etc.), and can also communicate with one or more devices that enable a user to interact with the computer device 12, and / or communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 22. Also, the computer device 12 can communicate with one or more networks (such as a local area network (LAN)), a wide area network (WAN), and / or a public network (such as the Internet) through a network adapter 20. As Figure 9 shown, the network adapter 20 communicates with other modules of the computer device 12 through a bus 18. It should be understood that although Figure 9 not shown in the figure, other hardware and / or software modules can be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.

[0180] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a lightweight segmentation method for ultrasonic cardiac images provided by the embodiments of the present invention.

[0181] That is, when the above processing unit 16 executes the above program, it realizes: obtaining an ultrasonic cardiac image data set containing semantic labels of cardiac tissues, and inputting the ultrasonic cardiac image data set into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set; training the first artificial intelligence model according to the ultrasonic cardiac image data set containing semantic labels of cardiac tissues, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results; obtaining the current cardiac medical image of a target patient, and determining the current image segmentation result corresponding to the current cardiac medical image through the correspondence.

[0182] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements an ultrasonic cardiac image lightweight segmentation method provided by all embodiments of the present application:

[0183] That is, when the program is executed by a processor, it implements: obtaining an ultrasonic cardiac image data set containing semantic labels of cardiac tissues, and inputting the ultrasonic cardiac image data set into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set; training the first artificial intelligence model based on the ultrasonic cardiac image data set containing semantic labels of cardiac tissues, the second intermediate feature map set and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results; obtaining a current cardiac medical image of a target patient, and determining a current image segmentation result corresponding to the current cardiac medical image through the correspondence.

[0184] One or more arbitrary combinations of computer-readable media can be adopted. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.

[0185] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including - but not limited to - electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.

[0186] Computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., connected through the Internet using an Internet service provider). Each embodiment in this specification is described in a progressive manner, and the key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other.

[0187] Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0188] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.

[0189] The above has introduced in detail a lightweight segmentation method, device, electronic device and medium for ultrasonic heart images provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, based on the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A lightweight segmentation method for ultrasonic cardiac images, the method involves a first artificial intelligence model to be trained and a second artificial intelligence model that has been trained, and the number of network parameters of the first artificial intelligence model is less than that of the second artificial intelligence model, and is characterized in that, The method includes: Obtaining an ultrasonic cardiac image dataset containing semantic labels of cardiac tissue, and inputting the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature map set and a second semantic segmentation map set; Training the first artificial intelligence model based on the ultrasonic cardiac image dataset containing semantic labels of cardiac tissue, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results; Obtaining the current cardiac medical image of a target patient, and determining the current image segmentation result corresponding to the current cardiac medical image through the correspondence.

2. The method according to claim 1, wherein The network structure of the first artificial intelligence model includes: a multi-branch parallel structure in the training stage and a single-branch structure in the inference stage. Among them, the multi-branch parallel structure includes a residual branch, a 3×3 convolution branch, and a 1×1 convolution branch, and the single-branch structure is to equivalently merge the multi-branch parallel structure into a single branch.

3. The method according to claim 1, characterized in that The step of training the first artificial intelligence model based on the ultrasonic cardiac image dataset containing semantic labels of cardiac tissue, the second intermediate feature map set, and the second semantic segmentation map set, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results includes: Inputting the ultrasonic cardiac image dataset containing semantic labels of cardiac tissue into the first artificial intelligence model to obtain a first intermediate feature map set and a first semantic segmentation map set; Generating a label supervision loss based on the semantic labels of cardiac tissue and the first semantic segmentation map set; Generating an intermediate-level distillation loss based on the first intermediate feature map set and the second intermediate feature map set; Generating an output-level distillation loss based on the first semantic segmentation map set and the second semantic segmentation map set; Training the first artificial intelligence model based on the label supervision loss, the intermediate-level distillation loss, and the output-level distillation loss, so that the first artificial intelligence model establishes a correspondence between ultrasonic cardiac images and image segmentation results.

4. The method according to claim 3, wherein The step of generating an intermediate-level distillation loss based on the first intermediate feature map set and the second intermediate feature map set includes: Generating a mutual information loss and a channel importance loss based on the first intermediate feature map set and the second intermediate feature map set; Generating the intermediate-level distillation loss based on the mutual information loss and the channel importance loss.

5. The method according to claim 4, wherein The step of generating a mutual information loss and a channel importance loss based on the first intermediate feature map set and the second intermediate feature map set includes: Aligning the number of channels of the first intermediate feature map set and the second intermediate feature map set; Based on a preset mutual information calculation function, and determining the mutual information loss and the channel importance loss according to the first intermediate feature map set and the second intermediate feature map set after aligning the number of channels.

6. The method according to claim 3, characterized in that The step of generating an output-level distillation loss based on the first semantic segmentation map set and the second semantic segmentation map set includes: Determine a first spatial attention atlas corresponding to the first semantic segmentation atlas and a second spatial attention atlas corresponding to the second semantic segmentation atlas based on the first semantic segmentation atlas and the second semantic segmentation atlas; Generate an output-level distillation loss based on the first semantic segmentation atlas, the second semantic segmentation atlas, the first spatial attention atlas, and the second spatial attention atlas.

7. The method according to claim 1, characterized in that The step of obtaining the current cardiac medical image of the target patient and determining the current image segmentation result corresponding to the current cardiac medical image through the corresponding relationship includes: Deploy the trained first artificial intelligence model to the target embedded medical device; Input the current cardiac medical image into the first artificial intelligence model to obtain the current image segmentation result corresponding to the current cardiac medical image.

8. An ultrasound cardiac image lightweight segmentation device, characterized in that, The device relates to a first artificial intelligence model to be trained and a trained second artificial intelligence model, and the number of network parameters of the first artificial intelligence model is less than that of the second artificial intelligence model. The device is characterized in that it includes: A feature extraction module, configured to obtain an ultrasonic cardiac image dataset containing cardiac tissue semantic labels, and input the ultrasonic cardiac image dataset into the second artificial intelligence model to obtain a second intermediate feature atlas and a second semantic segmentation atlas; A model training module, configured to train the first artificial intelligence model based on the ultrasonic cardiac image dataset containing cardiac tissue semantic labels, the second intermediate feature atlas, and the second semantic segmentation atlas, so that the first artificial intelligence model establishes a corresponding relationship between the ultrasonic cardiac image and the image segmentation result; An image segmentation module, configured to obtain the current cardiac medical image of the target patient and determine the current image segmentation result corresponding to the current cardiac medical image through the corresponding relationship.

9. An electronic device, characterized in that, Comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program, when executed by the processor, implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and the computer program, when executed by the processor, implements the method according to any one of claims 1 to 7.