Ultrasonic image processing method and device and electronic equipment

Through the feature extraction, classification and segmentation subnet of the image recognition segmentation model, combined with the Swin Transformer block and residual module, the accuracy of face recognition and measurement in fetal cranial brain ultrasound images is solved, and the automatic recognition of fetal cranial brain surface is realized Accurate segmentation of measurement areas improves the accuracy and accuracy of identification and segmentation.

CN118967545APending Publication Date: 2024-11-15QINGDAO HISENSE MEDICAL EQUIP

Patent Information

Application Number
CN202310545590.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The prior art is difficult to realize automatic identification of the incisions in fetal cranial ultrasound images and accurate segmentation of measurement areas. Especially in scenarios where morphological structure is complex, grayscale uneven and noise are high, the marginal misjudgment rate of traditional methods is high. Full convolutional neural networks have small receptive fields and cannot establish long-distance dependencies for global images.

Method used

The image recognition segmentation model is adopted, including feature extraction subnetwork, classification subnetwork and segmentation subnetwork. The feature extraction subnetwork is used to perform downsampling and feature compression processing, and the global dependency relationship is captured in combination with the Swin Transformer block. The classification subnetwork is avoided through the residual module. The gradient disappears, and the segmented subnet realizes semantic segmentation through upsampling, and shared feature extraction to improve accuracy.

Benefits of technology

It realizes automatic identification of fetal cranial brain sections and accurate segmentation of measurement areas, improves segmentation accuracy and recognition accuracy, avoids artificial judgment and other equipment assistance, and has the ability to automatically measure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967545A_ABST
    Figure CN118967545A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide an ultrasonic image processing method and apparatus, and an electronic device, relate to the technical field of ultrasonic artificial intelligence, and are used for realizing automatic identification of a fetal craniocerebral section in an ultrasonic image and accurate segmentation of a fetal craniocerebral section measurement region in the ultrasonic image. The method comprises the following steps: inputting a first ultrasonic image containing a fetal craniocerebral section into a trained image recognition segmentation model; based on the feature extraction sub-network, performing down-sampling and feature compression processing on the first ultrasonic image to obtain a target feature map; performing feature extraction processing on the target feature map based on the classification sub-network to obtain a section category of the fetal craniocerebral section; performing up-sampling processing on the target feature map based on the segmentation sub-network to obtain a to-be-measured area corresponding to the first ultrasonic image; and measuring the to-be-measured area corresponding to the first ultrasonic image, determining measurement information of the fetal craniocerebral section, and displaying the section category and the measurement information of the fetal craniocerebral section contained in the first ultrasonic image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of ultrasonic artificial intelligence technology, and in particular to an ultrasonic image processing method, device and electronic equipment. Background Art

[0002] Abnormalities of the central nervous system are one of the most common congenital malformations of the fetus, including abnormalities of the intracranial structure and spinal abnormalities. Ultrasound has become the preferred method for prenatal screening of fetal malformations due to its advantages such as being non-invasive, real-time and easy to operate. Due to the complex morphology of the fetal cranial structure and the large number of sections and measurement parameters, doctors need to frequently operate keystrokes for measurement. Therefore, how to achieve automatic recognition of fetal cranial sections and accurate segmentation of the measurement area is of great clinical significance.

[0003] The conventional image processing method in the prior art needs to set a specific threshold according to the intensity distribution law of the pixel points, and determine the part of the image that is above or below the threshold as the target area. This method is only applicable to the scene with a single foreground and background, and is not applicable to the scene with complex morphological structure, different grayscale, and more noise and artifacts in the fetal cranial image. The neural network based on full convolution has a small receptive field and can only capture local information but cannot establish long-distance dependencies of the global image. The recognition effect of fetal cranial images is poor. Therefore, how to realize the automatic recognition of fetal cranial sections in ultrasound images and accurate segmentation of measurement areas needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide an ultrasound image processing method, device and electronic device for realizing automatic recognition of fetal cranial and brain sections in ultrasound images and accurate segmentation of fetal cranial and brain section measurement areas in ultrasound images.

[0005] In a first aspect, an embodiment of the present application provides an ultrasound image processing method, comprising:

[0006] Acquire a first ultrasound image containing a fetal cranial section; input the first ultrasound image into a trained image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; based on the feature extraction subnetwork, downsample and compress the first ultrasound image to obtain a target feature map; input the target feature map into the classification subnetwork and the segmentation subnetwork respectively; perform feature extraction on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial section contained in the first ultrasound image; and upsample the target feature map based on the segmentation subnetwork to obtain a region to be measured corresponding to the first ultrasound image; measure the region to be measured corresponding to the first ultrasound image, determine the measurement information of the fetal cranial section contained in the first ultrasound image, and display the section category and measurement information of the fetal cranial section contained in the first ultrasound image.

[0007] Based on the above scheme, since the image recognition segmentation model includes a segmentation subnetwork and a classification subnetwork, the segmentation task and classification task of the ultrasound image can be realized by one model. Compared with implementing the segmentation task and the classification task as two single task models, some common underlying semantic features, such as contours, textures, and shapes, can be learned by sharing the network parameters in the feature extraction subnetwork, thereby improving the accuracy of the segmentation task and the classification task. In addition, the segmentation accuracy and recognition accuracy of the image recognition segmentation model can also be improved by feature compression processing. And the ultrasound image processing method provided in the embodiment of the present application does not require human auxiliary judgment when in use, nor does it rely on other measuring equipment for auxiliary measurement, and can automatically complete the recognition of fetal cranial sections and the measurement of measurement parameters.

[0008] In one possible implementation, the feature extraction subnetwork includes n feature extraction units; the output of the i-th feature extraction unit among the n feature extraction units is the input of the i+1-th feature extraction unit; the resolution corresponding to the output of the i-th feature extraction unit is greater than the resolution corresponding to the output of the i+1-th feature extraction unit, and the feature dimension corresponding to the output of the i-th feature extraction unit is smaller than the feature dimension corresponding to the output of the i+1-th feature extraction unit.

[0009] Based on the above scheme, features in ultrasound images can be extracted through multiple feature extraction units in the feature extraction subnetwork.

[0010] In a possible implementation, each of the feature extraction units includes a feature compression module, a PatchMerging module and at least one Swin Transformer block connected in series; then for the i-th feature extraction unit, the following operations are performed: global dependency extraction is performed on the input through the Swin Transformer block to obtain an intermediate feature map; the intermediate feature map has the same resolution and feature dimension as the input; feature compression processing is performed on the intermediate feature map through the feature compression module; the feature compression processing is used to keep the resolution of the intermediate feature map unchanged and increase the feature dimension corresponding to the intermediate feature map; the compressed intermediate feature map is downsampled through the Patch Merging module to obtain the output of the i-th feature extraction unit.

[0011] Based on the above scheme, at least one cascaded Swin Transformer block can effectively capture global long-distance dependencies and improve the segmentation performance of the area to be measured in complex fetal cranial sections. Feature compression processing implemented through the feature compression module can avoid the loss of details and structural information in some fetal cranial sections due to the continuous reduction in the resolution of ultrasound images during the downsampling process, thereby improving the recognition accuracy of the image recognition and segmentation model.

[0012] In one possible implementation, the classification subnetwork includes multiple residual modules; the feature extraction processing of the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial and brain section contained in the first ultrasound image includes: inputting each of the target feature maps into the multiple residual modules, performing feature extraction processing on the target feature map based on the convolutional layers and activation functions in the multiple residual modules, and determining the prediction parameters of the fetal cranial and brain section contained in the first ultrasound image belonging to each preset section category; based on the prediction parameters of each preset section category, determining the section category of the fetal cranial and brain section contained in the first ultrasound image.

[0013] Based on the above solution, the problem of gradient disappearance caused by the excessive depth of the model can be avoided by adopting the residual module.

[0014] In one possible implementation, the display of the section category of the fetal cranial and brain section contained in the first ultrasound image includes: generating a class activation map based on the output feature map of the last convolutional layer in the multiple residual modules; overlaying the class activation map on the corresponding first ultrasound image to display the area of ​​interest corresponding to the fetal cranial and brain section contained in the first ultrasound image; wherein the position of the area of ​​interest in the fetal cranial and brain section corresponds to the section category of the fetal cranial and brain section.

[0015] Based on the above scheme, by generating class activation maps, the focus areas of fetal cranial sections of each section category can be visualized, enhancing the interpretability of the image recognition segmentation model.

[0016] In a possible implementation manner, the activation function of each residual module in the multiple residual modules is a LeakyReLU activation function.

[0017] Based on the above scheme, the gradient vanishing problem can be avoided by using Leaky ReLU as the activation function.

[0018] In one possible implementation, the segmentation subnetwork includes n upsampling units, and the output of the i-th upsampling unit among the n upsampling units is the input of the i+1-th upsampling unit; the resolution corresponding to the output of the i-th upsampling unit is smaller than the resolution corresponding to the output of the i+1-th upsampling unit, and the feature dimension corresponding to the output of the i-th upsampling unit is larger than the feature dimension corresponding to the output of the i+1-th upsampling unit.

[0019] Based on the above scheme, semantic segmentation of ultrasound images can be achieved through a segmentation subnetwork composed of multiple upsampling units, and since the number of upsampling units and feature extraction units is the same, the output mask image can be equal in size to the first ultrasound image.

[0020] In a possible implementation, the image recognition and segmentation model is trained according to the following method: a training sample set is obtained; the training sample set includes multiple ultrasound images containing fetal cranial sections and multiple labels corresponding to each of the second ultrasound images; each label includes the real section category and the real area to be measured of the corresponding ultrasound image; the second ultrasound image in the training sample set and the label corresponding to the second ultrasound image are input into the image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; based on the feature extraction subnetwork, the second ultrasound image is downsampled and feature compressed to obtain the target feature corresponding to the second ultrasound image Figure; input the target feature map into the classification subnetwork and the segmentation subnetwork respectively; perform feature extraction processing on the target feature map based on the classification subnetwork to obtain the predicted section category corresponding to the second ultrasound image; and perform upsampling processing on the target feature map based on the segmentation subnetwork to obtain the predicted area to be measured corresponding to the second ultrasound image; determine the first loss of the segmentation subnetwork according to the predicted area to be measured and the actual area to be measured, and determine the second loss of the classification subnetwork according to the actual section category and the predicted section category; update the network parameters of the image recognition segmentation model through the first loss and the second loss to obtain a trained image recognition segmentation model.

[0021] Based on the above scheme, by sharing the feature extraction subnetwork, network parameters can be shared to learn some common underlying semantic features, such as contours, textures, and shapes, thereby improving the recognition accuracy and segmentation precision of the trained image recognition and segmentation model.

[0022] In a second aspect, an embodiment of the present application provides an ultrasonic image processing device, comprising:

[0023] An acquisition unit, configured to acquire a first ultrasound image including a fetal brain section;

[0024] A processing unit is used to perform the following processing: input the first ultrasound image into a trained image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; based on the feature extraction subnetwork, down-sample and feature compress the first ultrasound image to obtain a target feature map; input the target feature map into the classification subnetwork and the segmentation subnetwork respectively; based on the classification subnetwork, perform feature extraction on the target feature map to obtain the section category of the fetal cranial and brain section contained in the first ultrasound image; and based on the segmentation subnetwork, up-sample the target feature map to obtain the area to be measured corresponding to the first ultrasound image; measure the area to be measured corresponding to the first ultrasound image, determine the measurement information of the fetal cranial and brain section contained in the first ultrasound image, and display the section category and measurement information of the fetal cranial and brain section contained in the first ultrasound image.

[0025] In one possible implementation, the feature extraction subnetwork includes n feature extraction units; the output of the i-th feature extraction unit among the n feature extraction units is the input of the i+1-th feature extraction unit; the resolution corresponding to the output of the i-th feature extraction unit is greater than the resolution corresponding to the output of the i+1-th feature extraction unit, and the feature dimension corresponding to the output of the i-th feature extraction unit is smaller than the feature dimension corresponding to the output of the i+1-th feature extraction unit.

[0026] In a possible implementation, each of the feature extraction units includes a feature compression module, a PatchMerging module and at least one Swin Transformer block connected in series; then for the i-th feature extraction unit, the following operations are performed: global dependency extraction is performed on the input through the Swin Transformer block to obtain an intermediate feature map; the intermediate feature map has the same resolution and feature dimension as the input; feature compression processing is performed on the intermediate feature map through the feature compression module; the feature compression processing is used to keep the resolution of the intermediate feature map unchanged and increase the feature dimension corresponding to the intermediate feature map; the compressed intermediate feature map is downsampled through the Patch Merging module to obtain the output of the i-th feature extraction unit.

[0027] In one possible implementation, the classification subnetwork includes multiple residual modules; when the processing unit performs feature extraction processing on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial and brain section contained in the first ultrasound image, it is specifically used to: input each of the target feature maps into the multiple residual modules, perform feature extraction processing on the target feature map based on the convolutional layers and activation functions in the multiple residual modules, and determine the prediction parameters of the fetal cranial and brain section contained in the first ultrasound image belonging to each preset section category; based on the prediction parameters of each preset section category, determine the section category of the fetal cranial and brain section contained in the first ultrasound image.

[0028] In one possible implementation, when the display unit displays the section category of the fetal cranial section contained in the first ultrasound image, the processing unit is used to: generate a class activation map based on the output feature map of the last convolutional layer in the multiple residual modules; overlay the class activation map on the corresponding first ultrasound image so that the display unit displays the area of ​​interest corresponding to the fetal cranial section contained in the first ultrasound image; wherein the position of the area of ​​interest in the fetal cranial section corresponds to the section category of the fetal cranial section.

[0029] In a possible implementation manner, the activation function of each residual module in the multiple residual modules is a LeakyReLU activation function.

[0030] In one possible implementation, the segmentation subnetwork includes n upsampling units, and the output of the i-th upsampling unit among the n upsampling units is the input of the i+1-th upsampling unit; the resolution corresponding to the output of the i-th upsampling unit is smaller than the resolution corresponding to the output of the i+1-th upsampling unit, and the feature dimension corresponding to the output of the i-th upsampling unit is larger than the feature dimension corresponding to the output of the i+1-th upsampling unit.

[0031] In a possible implementation, the device further includes a model training unit, which is used to: train the image recognition segmentation model according to the following method: obtain a training sample set; the training sample set includes multiple ultrasound images containing fetal cranial sections and multiple labels corresponding to each of the second ultrasound images; each of the labels includes a real section category and a real area to be measured of the corresponding ultrasound image; the second ultrasound image in the training sample set and the label corresponding to the second ultrasound image are input into the image recognition segmentation model; the image recognition segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; based on the feature extraction subnetwork, the second ultrasound image is downsampled and feature compressed to obtain a second ultrasound image The method comprises the steps of: obtaining a target feature map corresponding to the second ultrasound image; inputting the target feature map into the classification subnetwork and the segmentation subnetwork respectively; performing feature extraction processing on the target feature map based on the classification subnetwork to obtain a predicted section category corresponding to the second ultrasound image; and performing upsampling processing on the target feature map based on the segmentation subnetwork to obtain a predicted area to be measured corresponding to the second ultrasound image; determining a first loss of the segmentation subnetwork according to the predicted area to be measured and the actual area to be measured, and determining a second loss of the classification subnetwork according to the actual section category and the predicted section category; updating the network parameters of the image recognition segmentation model by the first loss and the second loss to obtain a trained image recognition segmentation model.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0033] Memory, for storing computer instructions;

[0034] A processor is connected to the memory, and is used to execute computer instructions in the memory, and implement the method as described in any one of the first aspects when executing the computer instructions.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including:

[0036] The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is enabled to perform the method as described in any one of the first aspects.

[0037] For each aspect from the second to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application.

[0039] Figure 1A One of the system architecture schematic diagrams of the ultrasonic image processing method provided in the embodiment of the present application;

[0040] Figure 1B One of the system architecture schematic diagrams of the ultrasonic image processing method provided in the embodiment of the present application;

[0041] Figure 2 An exemplary flow chart of an ultrasound image processing method provided in an embodiment of the present application;

[0042] Figure 3 One of the schematic diagrams of the image recognition and segmentation model structure provided in the embodiment of the present application;

[0043] Figure 4 A schematic diagram of a feature extraction subnetwork structure provided in an embodiment of the present application;

[0044] Figure 5 A structural diagram of the Swin Transformer block provided in an embodiment of the present application;

[0045] Figure 6 A structural diagram of a feature compression module provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of a classification subnetwork structure provided in an embodiment of the present application;

[0047] Figure 8 A structural diagram of a residual module provided in an embodiment of the present application;

[0048] Fig. 9 A schematic diagram of a segmentation sub-network structure provided in an embodiment of the present application;

[0049] Fig. 10A A schematic diagram of the display effect of fetal cranial brain section measurement information through the thalamus cross section provided in an embodiment of the present application;

[0050] Fig. 10BA schematic diagram of the display effect of fetal cranial brain section measurement information through the lateral ventricle cross section provided in an embodiment of the present application;

[0051] Fig. 10C A schematic diagram of the display effect of fetal cranial brain section measurement information through the cerebellum cross section provided in an embodiment of the present application;

[0052] Fig.11A A schematic diagram showing the display results of the class activation map corresponding to the thalamus cross section provided in the embodiment of the present application;

[0053] Fig. 11B A schematic diagram showing the display results of the class activation map corresponding to the cross-section through the lateral ventricle provided in the embodiment of the present application;

[0054] Fig. 11C A schematic diagram showing the display results of the class activation map corresponding to the cross-section of the cerebellum provided in an embodiment of the present application;

[0055] Fig.12 One of the schematic diagrams of the image recognition and segmentation model structure provided in the embodiment of the present application;

[0056] Fig.13 A flowchart of an image recognition and segmentation model training method provided in an embodiment of the present application;

[0057] Fig.14 A schematic diagram of an ultrasonic image processing device provided in an embodiment of the present application;

[0058] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, the professional terms involved in the embodiments of the present application are introduced below.

[0060] (1) Skip connection is a technology used to process depth in neural networks. It creates a cross-layer connection in the network by directly passing the input data to the upper layer of the output data. It can effectively solve the gradient vanishing problem in the deep network training process and make the model more stable and accurate.

[0061] (2) The watershed algorithm is an image segmentation method that can be used to separate objects and backgrounds in an image. Its basic idea is to threshold the image and divide the pixels in the image into foreground pixels and background pixels. Then mark the foreground pixels and background pixels separately. Then use the watershed algorithm to find the "watershed" in the image, that is, the dividing line between the foreground and the background. Divide the image into two areas, one is the foreground area and the other is the background area. Finally, output the segmented image.

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0063] The terms "first" and "second" in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.

[0064] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.

[0065] At present, there are mainly two methods to realize automatic recognition of fetal cranial sections and accurate segmentation of measurement areas:

[0066] 1) Methods based on traditional image morphology, such as Gaussian differential, threshold edge detection method, etc. This method is based on pixel contrast, but the foreground and background contrast of ultrasound images are low and there are many noise artifacts. Therefore, when this method is applied to identify fetal cranial sections included in ultrasound images, the edge misjudgment rate is high. In addition, the fetal cranial anatomical structure is complex and irregular in shape, and it is difficult to achieve accurate identification and segmentation relying solely on traditional image processing technology.

[0067] 2) Deep learning algorithms based on fully convolutional neural networks, such as U-Net and Fully Convolutional Networks (FCN). Fully convolutional neural networks represented by U-Net networks have problems such as single scale and limited receptive field in convolution feature maps, which can easily cause problems such as missed detection of small targets and blurred target edges. Moreover, the areas to be detected in the standard sections of the fetal brain, the cross-section through the lateral ventricle and the cross-section through the cerebellum, account for a relatively small proportion of the ultrasound image. On the basis of the small difference between the foreground and the background, the probability of missed detection and false detection when using this method for segmentation is very high.

[0068] Based on the above shortcomings of the prior art, how to realize automatic recognition of fetal cranial sections in ultrasound images and accurate segmentation of measurement areas is an urgent problem to be solved.

[0069] In view of this, the present application provides an ultrasonic image processing method, in which a first ultrasonic image containing a fetal cranial section can be input into a trained image recognition and segmentation model, wherein the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork, and a segmentation subnetwork. After the first ultrasonic image is downsampled and feature compressed by the feature extraction subnetwork, the category of the fetal cranial section is identified by the classification subnetwork, the area to be measured corresponding to the first ultrasonic image is determined by the segmentation subnetwork, and the area to be measured is measured to obtain measurement information. The ultrasonic image processing method provided in the present application can realize accurate recognition and semantic segmentation of fetal cranial sections through a model, and the segmentation accuracy and recognition accuracy of small-scale targets can be improved through feature compression processing.

[0070] See also Figure 1A One of the system architecture diagrams for the application of the ultrasonic image processing method provided in the embodiment of the present application. The system can be an ultrasonic device 100, including: a memory 101, a processor 102, a display 103 and an ultrasonic probe 104. Among them, the ultrasonic probe 104 can be used to collect a first ultrasonic image including a fetal cranial section, and the processor 102 is the control center of the ultrasonic device 100. Various interfaces and lines are used to connect the various parts of the entire ultrasonic device 100. By running or executing the software program or module stored in the memory 101, and calling the data stored in the memory 101, the various functions of the ultrasonic device 100 and the processing data are executed, and the ultrasonic image processing method provided by the present application is realized. Optionally, the processor 102 may include one or more processing units. The memory 101 may be a high-speed random access memory, and may also be a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0071] See also Figure 1BOne of the system architecture diagrams for the application of the ultrasonic image processing method provided in the embodiment of the present application. The system can be a server 110 connected to the ultrasonic device 100, including: a memory 111, a processor 112 and a communication interface 113. Among them, the communication interface 113 can be used to send the processing result of the ultrasonic image to the ultrasonic device 100. The first ultrasonic image including the fetal cranial section is obtained, and the communication interface 113 can also be used for the processor 120 is the control center of the server 110, and various interfaces and lines are used to connect the various parts of the entire server 110, and the ultrasonic image processing method provided in the present application is implemented by running or executing the software program or module stored in the memory 111, and calling the data stored in the memory 111. Optionally, the server 110 can be a physical server or a cloud server. When the server 110 is a cloud server, it can be connected to the ultrasonic device 100 through a wireless network.

[0072] It should be noted that the above Figure 1A and Figure 1B The structure shown is only an example and is not limited to this application.

[0073] See also Figure 2 An exemplary flow chart of an ultrasonic image processing method provided in an embodiment of the present application, which can be applied to Figure 1A The ultrasonic device shown can also be used in Figure 1B The server shown in Figure 2 The method is described by taking the application of the method to ultrasonic equipment as an example, and the specific process may include the following:

[0074] S201, acquiring a first ultrasound image including a cross-section of a fetal brain.

[0075] The ultrasound device can acquire ultrasound data including the fetal cranial brain section through an ultrasound probe, pre-process the ultrasound data, and convert the ultrasound data into a first ultrasound image.

[0076] In a possible implementation, the ultrasound data may be image data or video data. If the ultrasound data is image data, the ultrasound device may obtain a first ultrasound image including a fetal brain section by preprocessing the image data. If the ultrasound data is video data, the ultrasound device may obtain multiple first ultrasound images including a fetal brain section by preprocessing the video data frame by frame.

[0077] S202: Input the first ultrasound image into a trained image recognition and segmentation model.

[0078] The ultrasound device may input the at least one first ultrasound image acquired in S201 into a trained image recognition and segmentation model.

[0079] See also Figure 3This is one of the schematic diagrams of the image recognition segmentation model structure provided in the embodiment of the present application, such as Figure 3 As shown, the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork. Among them, the feature extraction subnetwork is connected to the classification subnetwork and the segmentation subnetwork respectively. That is, when the first ultrasound image is input into the image recognition and segmentation model, the feature extraction subnetwork is first input, and then the result obtained by the feature extraction subnetwork is input into the classification subnetwork and the segmentation subnetwork respectively. The classification result can be obtained through the classification subnetwork, and the segmentation result can be obtained through the segmentation subnetwork.

[0080] S203: Based on the feature extraction subnetwork, downsample and compress the first ultrasound image to obtain a target feature map.

[0081] In one possible implementation, the feature extraction subnetwork may include a feature extraction layer consisting of n feature extraction units; the output of the i-th feature extraction unit among the n feature extraction units is the input of the i+1-th feature extraction unit; the resolution corresponding to the output of the i-th feature extraction unit is greater than the resolution corresponding to the output of the i+1-th feature extraction unit, and the feature dimension corresponding to the output of the i-th feature extraction unit is smaller than the feature dimension corresponding to the output of the i+1-th feature extraction unit.

[0082] In a possible implementation, each feature extraction unit includes a feature compression module, a Patch Merging module, and at least one Swin Transformer block connected in series. For the i-th feature extraction unit, the following operations are performed: the global dependency extraction of the input is performed through the Swin Transformer block to obtain an intermediate feature map. The intermediate feature map is then subjected to feature compression processing through the feature compression module. The compressed intermediate feature map can then be downsampled through the Patch Merging module to obtain the output of the i-th feature extraction unit. The intermediate feature map has the same resolution and feature dimension as the input, and the feature compression processing is used to keep the resolution of the intermediate feature map unchanged and increase the feature dimension corresponding to the intermediate feature map.

[0083] In one possible implementation, the feature extraction subnetwork may also include a block processing layer (PatchPartition layer), a linear embedding layer (Linear Embedding layer) and a bottleneck layer (Bottleneck layer). The PatchPartition layer can divide the first ultrasound image of the input image recognition segmentation model into multiple non-overlapping regions, each region being a patch. The Linear Embedding layer can perform a linear transformation on the channel data of each pixel in the first ultrasound image. The Bottleneck layer may include at least one Swin Transformer block to prevent the model from being too deep to converge, reduce the complexity and computational complexity of the model, and enhance the representation capability of the feature map, thereby improving the performance and effect of the model.

[0084] In one example, see Figure 4 This is a schematic diagram of the feature extraction subnetwork structure provided in the embodiment of the present application. Figure 4As shown, the feature extraction subnetwork includes a block processing layer, a linear embedding layer, a feature extraction layer and a bottleneck layer. Among them, the feature extraction layer includes 3 feature extraction units, each of which includes 2 series-connected Swin Transformer blocks, 1 feature compression module and 1 Patch Merging module, and the bottleneck layer unit includes 2 Swin Transformer blocks. Assuming that the size of the first ultrasound image input to the feature extraction subnetwork is W*H and the feature dimension is 48, the first ultrasound image can be divided into multiple patches after passing through the block processing layer. If the size of each patch is 4*4, a feature map of size W / 4*H / 4*48 can be obtained. Then, the channel data of each pixel in the first ultrasound image after block processing is linearly transformed through the linear embedding layer to obtain a feature map of size W / 4*H / 4*C, where C can be the number of model heads. Then, the feature map of W / 4*H / 4*C is input into the feature extraction layer for downsampling and feature compression processing. Since the processing process of each feature extraction unit is the same, the following only takes the first feature extraction unit as an example for explanation. After the W / 4*H / 4*C feature map is input into the two serially connected Swin Transformer blocks in the first feature extraction unit, an intermediate feature map of size W / 4*H / 4*C can be obtained. The intermediate feature map is then compressed by the feature compression module to obtain a feature map of W / 4*H / 4*2C. Then, it can be downsampled by the Patch Merging module to obtain a feature map of W / 8*H / 8*4C as the output of the first feature extraction unit. Then, after obtaining the output of the third feature extraction unit with a size of H / 32*W / 32*64C, it can be input into the bottleneck layer to obtain a target feature map of size H / 32*W / 32*64C.

[0085] It should be noted that Figure 4 The feature extraction subnetwork shown is only exemplary. The number of feature extraction units, the number of Swin Transformer blocks in the feature extraction unit, and the number of Swin Transformer blocks in the bottleneck layer can be preset based on experience or actual conditions, and this application does not impose any limitations on this.

[0086] In some embodiments, see Figure 5 This is a structural diagram of the Swin Transformer block provided in the embodiment of the present application. Figure 5As shown in the figure, the Swin Transformer block consists of two normalization layers (Layer Normalization, LN), a window-based multi-head self-attention module (Window based Multi-head Self Attention, W-MSA), a shift window-based multi-head self-attention module (Shift Window Multi-head Self Attention, SW-MSA) and a multilayer perceptron (Multilayer Perceptron, MLP). W-MSA can use windows to limit the calculation range to reduce the amount of calculation of the model, and SW-MSA can strengthen the information interaction between adjacent windows. By alternating between W-MSA and SW-MSA in the Swin Transformer block, the global long-distance dependency can be effectively captured, improving the segmentation performance of the area to be measured in the complex fetal cranial structure included in the ultrasound image.

[0087] In some embodiments, since the proportion of the fetal cranial section in the ultrasound image is relatively small, the proportion of the area to be measured corresponding to the ultrasound image in the ultrasound image is even smaller, so the resolution of the ultrasound image is continuously reduced during the downsampling process, which can easily lead to the loss of some details and structural information of the area to be measured. To avoid the above problems, the embodiment of the present application adds a feature compression module during the downsampling process to improve the segmentation accuracy of the area to be measured.

[0088] See also Figure 6 This is a structural diagram of the feature compression module provided in the embodiment of the present application. Figure 6 As shown in the figure, the feature compression module includes two branches. Branch 1 uses the first 1×1 convolution layer to increase the dimension, the middle 3×3 convolution layer to obtain a wide range of structural information, and then uses the hollow convolution to expand the receptive field. The last 1×1 convolution layer reduces the feature scale, thereby obtaining the features and structural information of the fetal cranial section in the first ultrasound image; Branch 2 uses the Soft-pool operation to perform cumulative activation in an exponentially weighted manner, and then uses the 1×1 convolution layer to increase the dimension to retain more detailed feature information of the fetal cranial section.

[0089] S204, inputting the target feature map into the classification subnetwork and the segmentation subnetwork respectively, performing feature extraction processing on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial section contained in the first ultrasound image, and performing upsampling processing on the target feature map based on the segmentation subnetwork to obtain the area to be measured corresponding to the first ultrasound image.

[0090] Among them, the section type of the fetal cranial section contained in the first ultrasound image is Figure 3According to the classification results shown in , the preset sections of the fetal cranial brain section may include a transthalamic cross section, a translateral ventricle cross section, and a transcerebellum cross section. The area to be measured corresponding to the first ultrasound image is Figure 3 The segmentation results shown in .

[0091] In one possible implementation, the classification subnetwork can be implemented by a residual network, that is, the classification subnetwork can include multiple residual modules. When the ultrasound device performs feature extraction processing on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial section contained in the first ultrasound image, the target feature map can be input into multiple residual modules, and the target feature map can be subjected to feature extraction processing based on the convolutional layers and activation functions in the multiple residual modules to determine the prediction parameters of the fetal cranial section contained in the first ultrasound image belonging to each preset section category. Based on the prediction parameters of each preset section category, the section category of the fetal cranial section contained in the first ultrasound image is determined.

[0092] In one example, the prediction parameter of the fetal cranial section contained in the first ultrasound image belonging to each preset section category can be the probability that the fetal cranial section belongs to each preset section category. Then the ultrasound device can use the preset section category with the highest probability as the section category of the fetal cranial section. For example, if the image recognition and segmentation network determines that the probability that the first ultrasound image A belongs to the transthalamic cross section is 0.75, the probability that it belongs to the translateral ventricle cross section is 0.15, and the probability that it belongs to the transcerebellar cross section is 0.1, then since 0.75 is the maximum value of the three probabilities, it can be determined that the first ultrasound image A belongs to the transthalamic cross section.

[0093] See also Figure 7 Schematic diagram of the classification subnetwork structure provided for the embodiment of the present application. Through each module composed of multiple residual modules in the classification subnetwork, further feature extraction is performed to realize the recognition of the section category of the fetal cranial section, and to avoid the gradient disappearance caused by the excessive depth of the model. Among them, residual module × 3 represents a module composed of 3 residual modules in series, residual module × 6 represents a module composed of 6 residual modules in series, and residual module × 4 represents a module composed of 4 residual modules in series. It should be noted that the depth of the residual network can be set according to the actual situation. For example, ResNet 34 can also be used, and this application does not limit this.

[0094] In one example, see Figure 8The residual module structure diagram provided for the embodiment of the present application. Batch normalization is used to prevent overfitting and accelerate the convergence speed of the image recognition segmentation model. By using the Leaky ReLU activation function as the activation function of the residual module, the gradient can be guaranteed to be non-zero for the part where the input is less than 0 during the back propagation process, thus avoiding the problem of gradient vanishing.

[0095] In one possible implementation, the segmentation subnetwork includes n upsampling units, and the output of the i-th upsampling unit among the n upsampling units is the input of the i+1-th upsampling unit; the resolution corresponding to the output of the i-th upsampling unit is smaller than the resolution corresponding to the output of the i+1-th upsampling unit, and the feature dimension corresponding to the output of the i-th upsampling unit is larger than the feature dimension corresponding to the output of the i+1-th upsampling unit.

[0096] Each upsampling unit includes a Patch Expanding module and at least one Swin Transformer block connected in series, and the Patch Expanding module is used to perform upsampling processing. At least one Swin Transformer block connected in series in the i-th feature extraction unit is jump-connected with at least one Swin Transformer block connected in series in the n-i+1-th upsampling unit. The downsampled multi-scale features can be fused with the upsampled features through the jump connection, that is, the shallow features and the deep features are connected together to reduce the spatial information loss caused by downsampling.

[0097] In one possible implementation, the segmentation subnetwork may further include a linear projection layer, which performs a linear transformation on the feature map obtained by at least one upsampling unit to obtain a mask image having the same size as the first ultrasound image of the input image recognition segmentation model.

[0098] See also Fig. 9 This is a schematic diagram of the segmentation sub-network structure provided in the embodiment of the present application. Fig. 9 As shown in Figure 2, the segmentation subnetwork includes a linear mapping layer and three upsampling units, where Figure 4 The feature extraction subnetwork shown includes 3 feature extraction units, so Fig. 9The example in which the segmentation subnetwork includes three upsampling units is also used for explanation. Each upsampling unit includes a Patch Expanding module and two Swin Transformer blocks connected in series, where Swin Transformer block × 2 represents two Swin Transformer blocks connected in series. When determining the area to be measured corresponding to the first ultrasound image, the ultrasound device can input the target feature map of size H / 32*W / 32*64C obtained by the feature extraction subnetwork into the first upsampling unit, upsample it through the Patch Expanding module, obtain a feature map of size H / 16*W / 16*16C, and then extract the local and global dependencies through two Swin Transformer blocks connected in series. Similarly, a feature map of size H / 4*W / 4*C can be obtained through three upsampling units. The feature map of H / 4*W / 4*C can then be converted into a mask image of size H*W*48 through a linear mapping layer.

[0099] It should be understood that since the execution process in each up-sampling unit is the same, the execution process of the second up-sampling unit and the third up-sampling unit will not be described in detail here.

[0100] S205, measuring the area to be measured corresponding to the first ultrasonic image, determining the measurement information of the fetal cranial and cerebral section contained in the first ultrasonic image, and displaying the section type and measurement information of the fetal cranial and cerebral section contained in the first ultrasonic image.

[0101] The ultrasound device can extract and calculate the quantitative information in the mask image obtained by the segmentation subnetwork through a series of image morphological feature algorithms, thereby measuring the area to be measured corresponding to the first ultrasound image. For example, the boundary of the closed area in the mask image can be determined by the watershed algorithm, and then the measurement information in the closed area can be obtained by jointly restricting the outline circumscribed rectangle and the outline edge.

[0102] See also Figure 10A-10C A schematic diagram of the display effect of fetal cranial brain section measurement information of different section categories provided in an embodiment of the present application. Figure 10A-10C The middle rectangle represents the outline of the area to be measured, and the length of the dotted line represents the measurement information.

[0103] Fig. 10A The figure is a schematic diagram showing the display effect of the measurement information of the fetal cranial brain section through the thalamic cross section. The measurement information corresponding to the thalamic cross section includes the biparietal diameter and head circumference of the fetal cranial brain. Fig. 10AIn the figure, the area surrounded by the outline A represents the area to be measured through the thalamic cross-section. Since the measurement information corresponding to the thalamic cross-section includes the biparietal diameter and head circumference of the fetal skull, and the boundary length of the area surrounded by the outline A can be used to represent the head circumference, the lengths of the two dotted lines are used to represent the biparietal diameter.

[0104] Fig. 10B This is a schematic diagram of the measurement information display effect of the fetal cranial brain section through the lateral ventricle cross section. If the section type is. Fig. 10B The middle rectangular box represents the circumscribed rectangle of the area to be measured, and the area enclosed by outline B represents the area to be measured through the cross-section of the lateral ventricle. Since the measurement information corresponding to the cross-section through the lateral ventricle includes the width of the lateral ventricle of the fetal brain, the length of the dotted line is used to represent the width of the lateral ventricle.

[0105] Fig. 10C This is a schematic diagram showing the measurement information display effect of the fetal cranial brain section through the cerebellum cross section. Fig. 10C The middle rectangular box represents the circumscribed rectangle of the area to be measured, and the area enclosed by the contour C represents the area to be measured through the cross-section of the cerebellum. Since the corresponding measurement information through the cross-section of the cerebellum includes the transverse diameter of the cerebellum of the fetal skull, the length of the dotted line is used to represent the transverse diameter of the cerebellum.

[0106] In a possible implementation, the ultrasound device may also generate a class activation map and overlay the class activation map onto the corresponding first ultrasound image to visualize the region of interest corresponding to the fetal cranial section contained in the first ultrasound image, so as to enhance the interpretability of the classification subnetwork. The position of the region of interest in the fetal cranial section corresponds to the section category of the fetal cranial section.

[0107] Specifically, the ultrasound device can obtain the output feature map of the last convolutional layer in multiple residual modules, perform weighted superposition on the channels of the output feature map, and obtain a class activation map after ReLU activation and normalization to satisfy formula (1).

[0108]

[0109] Where, L c The saliency map of the cth class, A k is the kth feature map, is the weight of the k-th feature map of the c-th category, satisfying formula (2).

[0110]

[0111] In the formula, z represents the size of the output feature map, y c Indicates the score of category C.

[0112] Since each section category has a different region of interest, the class activation map for each section category is also different. Overlaying the class activation map onto the first ultrasound image of the same category will yield the class activation map display result for that category. Fig.11A A schematic diagram of the display result of the class activation map corresponding to the transverse section of the thalamus provided in the embodiment of the present application. Among them, area A represents the area of ​​interest corresponding to the transverse section of the thalamus, that is, the area of ​​the skull strong echo ring. The area of ​​interest is composed of multiple color layers of different colors, which are displayed in the form of a heat map, such as Fig.11A The region A shown is composed of color layer 1, color layer 2, and color layer 3. It should be understood that each color layer of the class activation map does not have a clear outline. Fig.11A The outlines of color layer 1, color layer 2 and color layer 3 shown in the figure are only for distinguishing different color layers, and the number of color layers is not limited to 3. The lower half of area A is similar to the upper half, so it is not repeated in the figure.

[0113] See also Fig. 11B A schematic diagram of the display result of the class activation map corresponding to the cross-section of the lateral ventricle provided in the embodiment of the present application. Among them, region B represents the region of interest corresponding to the cross-section of the lateral ventricle, that is, the lateral ventricle region. Region B can also be composed of color layer 1, color layer 2 and color layer 3. The meanings of color layer 1, color layer 2 and color layer 3 are the same as those of Fig.11A Same, see Fig.11A The relevant description in the illustrated embodiment will not be repeated here.

[0114] See also Fig. 11C Schematic diagram of the display result of the class activation map corresponding to the cross-section of the cerebellum provided in the embodiment of the present application. Among them, region C represents the region of interest corresponding to the cross-section of the cerebellum, that is, the cerebellar hemisphere region. Region C can also be composed of color layer 1, color layer 2 and color layer 3. The meanings of color layer 1, color layer 2 and color layer 3 are the same as those of Fig.11A Same, see Fig.11A The relevant description in the illustrated embodiment will not be repeated here.

[0115] In a possible implementation, the section type of the fetal cranial brain section included in the first ultrasound image can be displayed by displaying the region of interest corresponding to the fetal cranial brain section included in the first ultrasound image on the display of the ultrasound device, thereby showing the section type of the fetal cranial brain section included in the first ultrasound image. Fig.11A When the class activation map shown shows the result, it can be determined that the section category of the fetal cranial brain section included in the first ultrasound image is a transthalamic cross-section.

[0116] In one example, the ultrasound device may also display the section category of the fetal cranial section included in the first ultrasound image on the display of the ultrasound device in the form of text description.

[0117] See also Fig.12 This is one of the schematic diagrams of the image recognition segmentation model structure provided in the embodiment of the present application. Fig.12 As shown, the image recognition segmentation model consists of Figure 4 The feature extraction subnetwork shown, Figure 7 The classification subnetwork shown and Fig. 9 The segmentation subnetwork shown in FIG. Among them, the feature extraction subnetwork and the segmentation subnetwork form a U-shaped network, the two series-connected Swin Transformer blocks of the first feature extraction unit are jump-connected with the two series-connected Swin Transformer blocks of the third upsampling unit, the two series-connected Swin Transformer blocks of the second feature extraction unit are jump-connected with the two series-connected Swin Transformer blocks of the second upsampling unit, and the two series-connected Swin Transformer blocks of the third feature extraction unit are jump-connected with the two series-connected Swin Transformer blocks of the first upsampling unit. After the first ultrasound image is input into the image recognition model, a mask image can be obtained through the feature extraction subnetwork and the segmentation subnetwork, and then the quantitative information of the mask image is extracted by the image morphological feature algorithm to obtain the measurement information. After the first ultrasound image is input into the image recognition model, the classification result and the class activation map can be obtained through the feature extraction subnetwork and the classification subnetwork.

[0118] In some embodiments, see Fig.13 A flow chart of the image recognition segmentation model training method provided in the embodiment of the present application, wherein the image recognition segmentation model can be Fig.13 The method can be applied to Figure 1B The servers shown include:

[0119] S1301, obtaining a training sample set.

[0120] The training sample set includes a plurality of second ultrasound images containing fetal brain sections and labels corresponding to the plurality of second ultrasound images; each label includes a real section category and a real area to be measured of the corresponding second ultrasound image.

[0121] In one possible implementation, the server may collect multiple second ultrasound images including fetal cranial sections through ultrasound equipment, and mark the section category and the area to be measured of the fetal cranial section included in each second ultrasound image as a label. For example, a second ultrasound image with a section category of a transverse section through the thalamus may mark the fetal skull strong echo ring as the area to be measured, a second ultrasound image with a section category of a transverse section through the lateral ventricle may mark the lateral ventricle dark area as the area to be measured, and a second ultrasound image with a section category of a transverse section through the cerebellum may mark the cerebellum butterfly area as the area to be measured.

[0122] In one example, the label corresponding to each second ultrasound image can be annotated by at least two professional ultrasound physicians with many years of clinical work experience. And screen out the second ultrasound images with the overlap of the area to be measured marked by at least two professional ultrasound physicians greater than the preset overlap threshold from multiple second ultrasound images including fetal cranial sections, and randomly divide these screened second ultrasound images into a training sample set and a verification sample set in a ratio of 8:2. Among them, the overlap of the area to be measured can be determined by the size of the overlapping part of the area to be measured marked by at least two professional ultrasound physicians on the same second ultrasound image. After the training sample set is trained for a preset number of rounds, the image recognition segmentation model can be verified by the verification sample set, thereby improving the accuracy of the image recognition segmentation model.

[0123] It should be noted that the overlap threshold can be preset based on actual conditions or experience, and this application does not limit this.

[0124] In another example, after selecting second ultrasound images with a degree of overlap of the areas to be measured marked by at least two professional ultrasound physicians greater than a preset overlap threshold from multiple second ultrasound images including fetal cranial sections, these selected second ultrasound images can also be randomly divided into a training sample set, a verification sample set, and a test sample set in a ratio of 7:2:1. The test sample set is used to perform inference testing on the image recognition segmentation model after the training of the model is completed.

[0125] In one possible implementation method, since it is difficult to obtain a large amount of labeled data from professional ultrasound physicians, in an embodiment of the present application, a random horizontal flip or vertical flip with a probability of P1 can be set for each of the multiple second ultrasound images containing fetal cranial sections in the training sample set; a random rotation with a probability of P2 and an angle of (-α, α); a random brightness adjustment with a probability of P3 and a factor of (β1, β2) and a random contrast adjustment with a probability of P4 and a factor of (θ1, θ2); and the actual area to be measured annotated in the second ultrasound image is transformed the same as the corresponding second ultrasound image. In other words, each second ultrasound image in the training sample set has a P1 probability of being flipped, and one of the horizontal flipping and the vertical flipping is randomly selected; each second ultrasound image has a P2 probability of being rotated, and an angle in the interval (-α, α) is randomly selected as the rotation angle; each second ultrasound image has a P3 probability of adjusting the brightness, and a value in the interval (β1, β2) is randomly selected as the adjusted brightness; each second ultrasound image has a P4 probability of adjusting the contrast, and a value in the interval (θ1, θ2) is randomly selected as the adjusted contrast.

[0126] In one example, for each of the multiple second ultrasound images containing fetal cranial sections in the training sample set, a random horizontal flip or vertical flip with a probability of 0.5 can be set; a random rotation with a probability of 0.7 and an angle of (-30°, 30°); a random brightness adjustment with a probability of 0.8 and a factor of (-0.5, 1.2) and a random contrast adjustment with a probability of 0.8 and a factor of (-0.3, 0.2) can be set; and the real area to be measured marked in the second ultrasound image can be transformed the same as the corresponding second ultrasound image.

[0127] Based on the above scheme, the generalization ability of the image recognition and segmentation model can be enhanced by setting different parameters of ultrasound images when the training sample set is limited.

[0128] S1302: Input the second ultrasound image in the training sample set and the label corresponding to the second ultrasound image into an image recognition and segmentation model.

[0129] Among them, the structure of the image recognition segmentation model is as follows Fig.12 As shown, no further description is given here.

[0130] S1303: Based on the feature extraction subnetwork, downsample and compress the second ultrasonic image to obtain a target feature map corresponding to the second ultrasonic image.

[0131] When training the image recognition and segmentation model, the specific processing process in the feature extraction subnetwork is the same as the processing process of applying the image recognition and segmentation model to ultrasound image processing, which can be seen in Figure 2 The relevant description in the embodiment of the ultrasonic image processing method shown is not repeated here.

[0132] S1304, input the target feature map into the classification subnetwork and the segmentation subnetwork respectively, perform feature extraction processing on the target feature map based on the classification subnetwork to obtain the predicted section category corresponding to the second ultrasound image, and perform upsampling processing on the target feature map based on the segmentation subnetwork to obtain the predicted area to be measured corresponding to the second ultrasound image.

[0133] When training the image recognition and segmentation model, the specific processing in the classification subnetwork and the segmentation subnetwork is the same as the processing of applying the image recognition and segmentation model to ultrasound image processing, which can be seen in Figure 2 The relevant description in the embodiment of the ultrasonic image processing method shown is not repeated here.

[0134] S1305, determining a first loss of a segmentation subnetwork according to the predicted area to be measured and the actual area to be measured, and determining a second loss of a classification subnetwork according to the actual section category and the predicted section category.

[0135] In a possible implementation, the segmentation subnetwork and the classification subnetwork may use the same loss function or different loss functions. For example, the classification subnetwork may use a multi-classification cross entropy loss function, and the segmentation subnetwork may use a Dice coefficient as a loss function. It should be understood that the above loss function can be described in detail in the prior art, and will not be repeated here.

[0136] S1306, updating the network parameters of the image recognition segmentation model through the first loss and the second loss to obtain a trained image recognition segmentation model.

[0137] In one example, the total loss function of the image recognition segmentation model can be set as the weighted sum of the loss function of the classification subnetwork and the loss function of the segmentation subnetwork, satisfying formula (3).

[0138] Loss=∑ N ω i *Loss i Formula (3)

[0139] Wherein, ω is the weight parameter of the classification sub-network loss function and the segmentation sub-network loss function, N represents the number of sub-networks whose loss functions need to be weighted, and in this embodiment, the value is 2, that is, the value of i is 1 and 2.

[0140] Optionally, ω can be fixed based on manual experience.

[0141] In some embodiments, a weight adaptive method may also be used to dynamically adjust the value of ω, and the value of ω satisfies formula (4).

[0142]

[0143] In the formula, ω i (t) represents the weight of the i-th sub-network in the t-th round of training, r i (t-1) represents the training speed of the i-th sub-network when the training round is the t-1th round, and T is a preset constant.

[0144]

[0145] Where, L i (t-1) represents the loss value of the i-th sub-network when the training round is the t-1th round.

[0146] At this time, the total loss function of the image recognition and segmentation model satisfies formula (6).

[0147] Loss=∑ N ω i (t)*Loss i Formula (6)

[0148] Based on the above scheme, during the training process of the image recognition and segmentation model, the learning speed of the two sub-networks is measured by the change in the loss values ​​of the segmentation sub-network and the classification sub-network. When the loss value of a sub-network decreases too fast, the corresponding weight coefficient will be increased, and vice versa. Based on this scheme, the convergence speed of the two sub-networks can be balanced, making the image recognition and segmentation model perform better.

[0149] In one possible implementation, Fig.13 After the image recognition and segmentation model is trained by the training method shown, the image recognition and segmentation model can be subjected to inference testing through a test sample set. Specifically, the feature extraction subnetwork and the classification subnetwork can be used as image recognition models for inference testing, and the feature extraction subnetwork and the segmentation subnetwork can be used as image segmentation models for inference testing. It should be understood that the inference testing method can refer to the inference testing method in the related art, and this application will not repeat it.

[0150] Based on the same concept of the above method, see Fig.14 , is an ultrasonic image processing device 1400 provided in an embodiment of the present application. The device 1400 can perform each step in the above method. To avoid repetition, it is not described in detail here. The device 1400 includes an acquisition unit 1401, a processing unit 1402, a display unit 1403 and a model training unit 1404. In one scenario:

[0151] An acquisition unit 1401 is used to acquire a first ultrasound image including a fetal brain section;

[0152] The processing unit 1402 is configured to perform the following processing:

[0153] Input the first ultrasound image into a trained image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; based on the feature extraction subnetwork, downsample and compress the first ultrasound image to obtain a target feature map; input the target feature map into the classification subnetwork and the segmentation subnetwork respectively; perform feature extraction on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial and cerebral section contained in the first ultrasound image; and upsample the target feature map based on the segmentation subnetwork to obtain the area to be measured corresponding to the first ultrasound image; measure the area to be measured corresponding to the first ultrasound image to determine the measurement information of the fetal cranial and cerebral section contained in the first ultrasound image;

[0154] The display unit 1403 is used to display the section type and measurement information of the fetal cranial brain section contained in the first ultrasound image.

[0155] In one possible implementation, the feature extraction subnetwork includes n feature extraction units; the output of the i-th feature extraction unit among the n feature extraction units is the input of the i+1-th feature extraction unit; the resolution corresponding to the output of the i-th feature extraction unit is greater than the resolution corresponding to the output of the i+1-th feature extraction unit, and the feature dimension corresponding to the output of the i-th feature extraction unit is smaller than the feature dimension corresponding to the output of the i+1-th feature extraction unit.

[0156] In a possible implementation, each of the feature extraction units includes a feature compression module, a PatchMerging module and at least one Swin Transformer block connected in series; then the processing unit 1402 is used to perform the following operations for the i-th feature extraction unit: extract global dependencies on the input through the Swin Transformer block to obtain an intermediate feature map; the intermediate feature map has the same resolution and feature dimension as the input; perform feature compression processing on the intermediate feature map through the feature compression module; the feature compression processing is used to keep the resolution of the intermediate feature map unchanged and increase the feature dimension corresponding to the intermediate feature map; downsample the compressed intermediate feature map through the Patch Merging module to obtain the output of the i-th feature extraction unit.

[0157] In one possible implementation, the classification subnetwork includes multiple residual modules; when the processing unit 1402 performs feature extraction processing on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial and brain section contained in the first ultrasound image, it is specifically used to: input each of the target feature maps into the multiple residual modules, perform feature extraction processing on the target feature map based on the convolutional layers and activation functions in the multiple residual modules, and determine the prediction parameters of the fetal cranial and brain section contained in the first ultrasound image belonging to each preset section category; based on the prediction parameters of each preset section category, determine the section category of the fetal cranial and brain section contained in the first ultrasound image.

[0158] In one possible implementation, when the display unit 1403 displays the section category of the fetal cranial section contained in the first ultrasound image, the processing unit 1402 is used to: generate a class activation map based on the output feature map of the last convolutional layer in the multiple residual modules; overlay the class activation map on the corresponding first ultrasound image so that the display unit displays the area of ​​interest corresponding to the fetal cranial section contained in the first ultrasound image; wherein the position of the area of ​​interest in the fetal cranial section corresponds to the section category of the fetal cranial section.

[0159] In a possible implementation manner, the activation function of each residual module in the multiple residual modules is a LeakyReLU activation function.

[0160] In one possible implementation, the segmentation subnetwork includes n upsampling units, and the output of the i-th upsampling unit among the n upsampling units is the input of the i+1-th upsampling unit; the resolution corresponding to the output of the i-th upsampling unit is smaller than the resolution corresponding to the output of the i+1-th upsampling unit, and the feature dimension corresponding to the output of the i-th upsampling unit is larger than the feature dimension corresponding to the output of the i+1-th upsampling unit.

[0161] In a possible implementation, the device further includes a model training unit 1404, which is used to: train the image recognition and segmentation model according to the following method: obtain a training sample set; the training sample set includes multiple ultrasound images containing fetal cranial sections and multiple labels corresponding to each of the second ultrasound images; each of the labels includes a real section category and a real area to be measured of the corresponding ultrasound image; the second ultrasound image in the training sample set and the label corresponding to the second ultrasound image are input into the image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; based on the feature extraction subnetwork, the second ultrasound image is downsampled and feature compressed to obtain a second ultrasound image. A target feature map corresponding to the ultrasonic image; inputting the target feature map into the classification subnetwork and the segmentation subnetwork respectively; performing feature extraction processing on the target feature map based on the classification subnetwork to obtain the predicted section category corresponding to the second ultrasonic image; and performing upsampling processing on the target feature map based on the segmentation subnetwork to obtain the predicted area to be measured corresponding to the second ultrasonic image; determining a first loss of the segmentation subnetwork according to the predicted area to be measured and the actual area to be measured, and determining a second loss of the classification subnetwork according to the actual section category and the predicted section category; updating the network parameters of the image recognition segmentation model by the first loss and the second loss to obtain a trained image recognition segmentation model.

[0162] Based on the same concept of the above method, see Fig.15 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device includes at least one processor 1502, and a memory 1501 connected or coupled to the at least one processor 1502, and the electronic device may also include a communication interface 1503. The electronic device may exchange information with other devices through the communication interface 1503.

[0163] Exemplarily, the communication interface 1503 may be a transceiver, circuit, bus, module, pin or other type of communication interface. When the electronic device is a chip-type device or circuit, the communication interface 1503 in the electronic device may also be an input-output circuit that can input information (or receive information) and output information (or send information), and the processor is an integrated processor or microprocessor or integrated circuit or logic circuit, and the processor may determine output information based on input information.

[0164] The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 1502 may cooperate with the memory 1501 and the communication interface 1503. The specific connection medium between the above-mentioned processor 1502, the memory 1501 and the communication interface 1503 is not limited in the present application.

[0165] Optional, see Fig.15 The processor 1502, the memory 1501 and the communication interface 1503 are connected to each other via a bus. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.15 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0166] In the embodiment of the present application, the memory 1501 is a non-volatile computer-readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1501 may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (ReadOnly Memory, ROM), electrically erasable programmable read-only memory (Electrically ErasableProgrammable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. The memory 1501 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1501 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing instructions, computer programs and / or data.

[0167] In the embodiment of the present application, the processor 1502 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the ultrasonic image processing method disclosed in the embodiment of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0168] By designing and programming the processor 1502, the code corresponding to the ultrasonic image processing method introduced in the aforementioned embodiment can be solidified into the chip, so that the chip can execute the steps of the aforementioned ultrasonic image processing method during operation. How to design and program the processor 1502 is a technology well known to those skilled in the art and will not be repeated here.

[0169] In one or more embodiments, the memory 1501 stores instructions that can be executed by at least one processor 1502 , and the at least one processor 1502 can implement the steps of any of the above methods by calling the instructions or computer programs stored in the memory 1501 .

[0170] The embodiment of the present application further provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the steps of any of the above methods.

[0171] Based on the same inventive concept, the embodiment of the present application further provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the ultrasound image processing methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the ultrasound image processing method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0172] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0173] Although the specific embodiments of the present application are described above, it should be understood by those skilled in the art that these are merely examples, and the scope of protection of the present application is limited by the attached claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present application, but these changes and modifications all fall within the scope of protection of the present application. Although the preferred embodiments of the present application have been described, once those skilled in the art are aware of the basic creative concepts, additional changes and modifications may be made to these embodiments. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0174] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for processing ultrasonic images, It is characterized in that include: Acquiring a first ultrasound image including a fetal brain section; Inputting the first ultrasound image into a trained image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; Based on the feature extraction subnetwork, downsampling and feature compression processing are performed on the first ultrasound image to obtain a target feature map; Inputting the target feature map into the classification subnetwork and the segmentation subnetwork respectively; performing feature extraction processing on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial brain section contained in the first ultrasound image; and performing upsampling processing on the target feature map based on the segmentation subnetwork to obtain the area to be measured corresponding to the first ultrasound image; The area to be measured corresponding to the first ultrasound image is measured, the measurement information of the fetal cranial and brain sections contained in the first ultrasound image is determined, and the section category and measurement information of the fetal cranial and brain sections contained in the first ultrasound image are displayed.

2. The method according to claim 1, It is characterized in that The feature extraction subnetwork includes n feature extraction units; the output of the i-th feature extraction unit among the n feature extraction units is the input of the i+1-th feature extraction unit; the resolution corresponding to the output of the i-th feature extraction unit is greater than the resolution corresponding to the output of the i+1-th feature extraction unit, and the feature dimension corresponding to the output of the i-th feature extraction unit is smaller than the feature dimension corresponding to the output of the i+1-th feature extraction unit.

3. The method according to claim 2, It is characterized in that Each of the feature extraction units includes a feature compression module, a Patch Merging module and at least one Swin Transformer block connected in series; Then for the i-th feature extraction unit, the following operations are performed: Extracting global dependencies on the input through the Swin Transformer block to obtain an intermediate feature map; the intermediate feature map has the same resolution and feature dimension as the input; Performing feature compression processing on the intermediate feature map by the feature compression module; The feature compression process is used to keep the resolution of the intermediate feature map unchanged and increase the feature dimension corresponding to the intermediate feature map; The compressed intermediate feature map is downsampled by the Patch Merging module to obtain the output of the i-th feature extraction unit.

4. The method according to claim 1, It is characterized in that The classification subnetwork includes a plurality of residual modules; the feature extraction process is performed on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial section contained in the first ultrasound image, including: Input each of the target feature maps into the multiple residual modules, perform feature extraction processing on the target feature maps based on the convolutional layers and activation functions in the multiple residual modules, and determine prediction parameters of the fetal cranial and cerebral sections contained in the first ultrasound image belonging to each preset section category; Based on the prediction parameters of the respective preset section categories, the section category of the fetal cranial brain section included in the first ultrasound image is determined.

5. The method according to claim 4, It is characterized in that The section type of the fetal cranial brain section included in the first ultrasound image is displayed, including: Generate a class activation map according to the output feature map of the last convolutional layer in the plurality of residual modules; The class activation map is overlaid onto the corresponding first ultrasound image to display a region of interest corresponding to a fetal cranial section contained in the first ultrasound image; wherein a position of the region of interest in the fetal cranial section corresponds to a section category of the fetal cranial section.

6. The method according to claim 5, It is characterized in that The activation function of each residual module in the multiple residual modules is a Leaky ReLU activation function.

7. The method according to claim 2, It is characterized in that The segmentation subnetwork includes n upsampling units, the output of the i-th upsampling unit among the n upsampling units is the input of the i+1-th upsampling unit; the resolution corresponding to the output of the i-th upsampling unit is smaller than the resolution corresponding to the output of the i+1-th upsampling unit, and the feature dimension corresponding to the output of the i-th upsampling unit is larger than the feature dimension corresponding to the output of the i+1-th upsampling unit.

8. The method according to any one of claims 1 to 7, It is characterized in that The image recognition segmentation model is trained according to the following method: Acquire a training sample set; the training sample set includes a plurality of ultrasound images containing fetal cranial sections and a plurality of labels corresponding to the second ultrasound images; each label includes a real section category and a real area to be measured of the corresponding ultrasound image; Inputting the second ultrasound image in the training sample set and the label corresponding to the second ultrasound image into the image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; Based on the feature extraction subnetwork, downsampling and feature compression processing are performed on the second ultrasonic image to obtain a target feature map corresponding to the second ultrasonic image; Inputting the target feature map into the classification subnetwork and the segmentation subnetwork respectively; performing feature extraction processing on the target feature map based on the classification subnetwork to obtain a predicted section category corresponding to the second ultrasound image; and performing upsampling processing on the target feature map based on the segmentation subnetwork to obtain a predicted area to be measured corresponding to the second ultrasound image; Determine a first loss of the segmentation subnetwork according to the predicted area to be measured and the actual area to be measured, and determine a second loss of the classification subnetwork according to the actual section category and the predicted section category; The network parameters of the image recognition segmentation model are updated by the first loss and the second loss to obtain a trained image recognition segmentation model.

9. An ultrasonic image processing device, It is characterized in that include: An acquisition unit, configured to acquire a first ultrasound image including a fetal brain section; A processing unit is used to perform the following processing: Inputting the first ultrasound image into a trained image recognition and segmentation model; the image recognition and segmentation model includes a feature extraction subnetwork, a classification subnetwork and a segmentation subnetwork; Based on the feature extraction subnetwork, downsampling and feature compression processing are performed on the first ultrasound image to obtain a target feature map; Inputting the target feature map into the classification subnetwork and the segmentation subnetwork respectively; performing feature extraction processing on the target feature map based on the classification subnetwork to obtain the section category of the fetal cranial brain section contained in the first ultrasound image; and performing upsampling processing on the target feature map based on the segmentation subnetwork to obtain the area to be measured corresponding to the first ultrasound image; Measuring the area to be measured corresponding to the first ultrasound image to determine measurement information of the fetal cranial brain section contained in the first ultrasound image; The display unit is used to display the section type and measurement information of the fetal cranial brain section contained in the first ultrasound image.

10. An electronic device, It is characterized in that include: Memory, for storing computer instructions; A processor is connected to the memory, and is used to execute computer instructions in the memory, and implement the method according to any one of claims 1 to 8 when executing the computer instructions.

Citation Information

Patent Citations

  • Object detection method and device, computer readable storage medium and computer equipment

    CN109886282A

  • Fetal ultrasound image recognition method and system based on deep learning

    CN110634125A

  • Muscle-bone ultrasonic image processing method, system and device and readable storage medium

    CN111383207A

  • Craniocerebral ultrasonic image parallel segmentation method and device

    CN111951268A

  • Image processing method and device, electronic equipment and storage medium

    CN112381777A

Cited By

  • Ultrasonic imaging system and ultrasonic image measuring method

    CN119791711A