Medical image processing method, system, storage medium and electronic device
By performing erosion processing and boundary loss calculation on the first mask of the medical image, the problem of slow and non-microderivable blood vessel boundary segmentation in the existing technology is solved, and fast and accurate blood vessel boundary mask acquisition and model training effect are achieved.
Patent Information
- Application Number
- CN202311197776.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-09-15
AI Technical Summary
In existing technologies, blood vessel segmentation methods focus on the overall segmentation of blood vessels while neglecting the segmentation of blood vessel boundaries. This results in slow and non-differentiable boundary segmentation speeds, making it impossible to effectively calculate losses to measure segmentation quality.
A second mask for blood vessels is generated by acquiring a first mask of a medical image and performing erosion processing. The boundary loss is calculated by combining the gold standard blood vessel boundary mask, and the sliding region block is extracted using a convolution kernel to generate the blood vessel boundary mask.
It enables rapid and accurate acquisition of blood vessel boundary masks, improves the sensitivity of blood vessel segmentation models to boundaries, and can calculate boundary loss during training to improve segmentation quality.
Smart Images

Figure CN117197099B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing, and relates to a medical image processing method, in particular to a medical image processing method, system, storage medium and electronic device. BACKGROUND
[0002] Vessel segmentation is an important task in the field of medical image processing, and its goal is to accurately extract the structural information of blood vessels from medical images. Taking coronary artery segmentation as an example, coronary artery segmentation needs to accurately segment the blood vessel mask, and the segmentation result can be used for subsequent tasks such as stenosis detection and blood flow dynamics calculation. However, existing technologies usually pay more attention to the overall segmentation of blood vessels, and pay little attention to the segmentation of blood vessel boundaries. SUMMARY
[0003] The embodiments of the present application provide a medical image processing method, system, storage medium and electronic device, which can quickly and accurately obtain a blood vessel boundary mask.
[0004] In a first aspect, the embodiments of the present application provide a medical image processing method, which comprises: acquiring a medical image, the medical image containing blood vessels; processing the medical image to obtain a first mask of the blood vessels; performing corrosion processing on the first mask to obtain a second mask of the blood vessels; and obtaining a blood vessel boundary mask according to the first mask and the second mask.
[0005] In an implementation form of the first aspect, the medical image processing method further comprises: acquiring a gold standard blood vessel boundary mask, the gold standard blood vessel boundary mask being obtained according to a gold standard blood vessel mask; and obtaining a boundary loss according to the gold standard blood vessel boundary mask and the blood vessel boundary mask.
[0006] In an implementation form of the first aspect, obtaining the boundary loss according to the gold standard blood vessel boundary mask and the blood vessel boundary mask comprises: obtaining an intersection and a union of the gold standard blood vessel boundary mask and the blood vessel boundary mask; and obtaining the boundary loss according to the intersection and the union of the gold standard blood vessel boundary mask and the blood vessel boundary mask.
[0007] In an implementation form of the first aspect, the calculation formula of the boundary loss is as follows: Wherein, GT is the gold standard blood vessel boundary mask, and Pred is the blood vessel boundary mask.
[0008] In an implementation form of the first aspect, processing the medical image to obtain the first mask of the blood vessels comprises: processing the medical image by using a blood vessel segmentation model to obtain the first mask, wherein the loss of the blood vessel segmentation model in training includes the boundary loss.
[0009] In one implementation of the first aspect, the first mask is three-dimensional data, and eroding the first mask to obtain a second mask for the blood vessel includes: extracting sliding local region blocks from the first mask using a convolution kernel to obtain a first region block; extracting sliding local region blocks from the first region block using the convolution kernel to obtain a second region block; extracting sliding local region blocks from the second region block using the convolution kernel to obtain a third region block; obtaining the minimum value among the third region blocks, and generating the second mask based on the minimum value, wherein the size of the second mask is the same as that of the first mask.
[0010] In one implementation of the first aspect, obtaining a blood vessel boundary mask based on the first mask and the second mask includes: subtracting the second mask from the first mask to obtain the blood vessel boundary mask.
[0011] Secondly, embodiments of this application provide a medical image processing system, the medical image processing system comprising: a medical image acquisition module for acquiring a medical image, the medical image including blood vessels; a first mask acquisition module for processing the medical image to obtain a first mask of the blood vessels; a second mask acquisition module for eroding the first mask to obtain a second mask of the blood vessels; and a boundary mask acquisition module for acquiring a boundary mask of the blood vessels based on the first mask and the second mask.
[0012] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any one of the first aspects of this application.
[0013] Fourthly, embodiments of this application provide an electronic device, the electronic device comprising: a memory storing a computer program; and a processor communicatively connected to the memory, which executes the method described in any one of the first aspects of this application when the computer program is invoked.
[0014] The medical image processing provided in this application embodiment can obtain a blood vessel boundary mask based on a first mask and a second mask. The second mask is obtained by etching the first mask. The blood vessel boundary mask obtained in this application embodiment has high accuracy.
[0015] Furthermore, the vessel boundary mask obtained in this embodiment can be used to obtain a boundary loss, which can be used to train the vessel segmentation model. By introducing a boundary loss during the training process of the vessel segmentation model, the model can be made more sensitive to vessel boundaries. Attached Figure Description
[0016] Figure 1 The diagram shown is an application scenario diagram related to the embodiments of this application.
[0017] Figure 2 The flowchart shown is a medical image processing method provided in an embodiment of this application.
[0018] Figure 3 The flowchart shown is a process for generating the second mask in an embodiment of this application.
[0019] Figure 4A The flowchart shown is a process for obtaining boundary loss in an embodiment of this application.
[0020] Figure 4B The following is a detailed flowchart of obtaining boundary loss in an embodiment of this application.
[0021] Figure 5 The diagram shown is a structural schematic of the medical image processing system provided in an embodiment of this application.
[0022] Figure 6 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application.
[0023] Component designation explanation
[0024] 5. Medical Image Processing System
[0025] 51 Medical Image Acquisition Module
[0026] 52 First Mask Acquisition Module
[0027] 53 Second Mask Acquisition Module
[0028] 54 Boundary Mask Acquisition Module
[0029] 6 electronic devices
[0030] 61 memory
[0031] 62 processor
[0032] 63 monitor
[0033] Steps S21 to S24
[0034] Steps S31 to S34
[0035] Steps S41 to S42
[0036] Steps S421~S422 Detailed Implementation
[0037] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0038] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the illustrations only show the components related to this application and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0039] In vessel segmentation tasks, different evaluation metrics and loss functions exhibit varying sensitivities to different error types. Conventional losses (such as Dice loss and Cross Entropy loss) primarily focus on the overall segmentation performance, but the boundary quality of the vessel mask is also a crucial aspect of image segmentation. However, currently, there is no fast and accurate method for obtaining vessel boundary masks. Existing methods for calculating vessel boundary masks are extremely slow and non-differentiable, thus making it impossible to calculate losses to measure the segmentation quality of vessel boundaries.
[0040] To address at least the aforementioned problems, embodiments of this application provide a medical image processing method. This medical image processing method can obtain a blood vessel boundary mask based on a first mask and a second mask. The second mask is obtained by erosion processing of the first mask. The blood vessel boundary mask obtained according to this application embodiment has high accuracy and is very fast. Furthermore, the blood vessel boundary mask obtained according to this application embodiment is differentiable and can calculate a boundary loss, which can be used for training a blood vessel segmentation model. By introducing a boundary loss during the training process of the blood vessel segmentation model, the blood vessel segmentation model can be made more sensitive to blood vessel boundaries.
[0041] Figure 1 This diagram illustrates an application scenario according to an embodiment of this application. The medical imaging device refers to a device capable of acquiring information about the internal structure and function of the human body and generating medical images. For example, a medical imaging device can be a CT scanner. During use, the CT scanner acquires multiple X-ray images from different angles by rotating the X-ray source and detector around the patient's body. These images are processed by a computer and then reconstructed into detailed cross-sectional images, which can be viewed on different planes. It should be noted that the medical imaging device described in this embodiment is not limited to a CT scanner.
[0042] In this embodiment of the application, medical imaging equipment and electronic equipment can be connected via a data transmission interface.
[0043] In some possible implementations, medical imaging equipment is equipped with data transmission interfaces, such as Ethernet, Universal Serial Bus (USB), or Serial Interface. These interfaces allow the medical imaging equipment to transmit image data and device control information to electronic devices for processing and storage.
[0044] Electronic devices include one or more data storage units and a processor connected thereto. The data storage unit may include a storage medium and a memory unit. The storage medium may be read-only, such as read-only memory (ROM), or read-write, such as a hard disk or flash memory. The memory unit may be random access memory (RAM). The memory unit may be integrated with the processor or may be a separate component.
[0045] The processor is the control center of an electronic device, used to execute program code to implement the functions corresponding to the program instructions.
[0046] In some possible implementations, the processor may include one or more central processing units (CPUs).
[0047] In some possible implementations, the electronic device may include more than one processor, which may be a single-core processor or a multi-core processor. As used herein, the term "processor" refers to one or more devices, circuits, and / or processing cores used to process data such as computer program instructions.
[0048] The CPU of a processor stores the program code it executes in memory or a storage medium. In some possible implementations, the program code stored in the storage medium can be copied to memory for the processor to execute. The processor can control the operation of electronic devices by controlling the execution of other programs, controlling communication with peripheral devices, and controlling the use of electronic device resources.
[0049] Electronic devices may also include a communication interface through which they can communicate directly with another device or system or via an external network.
[0050] In some possible implementations, the electronic device may also include output devices and input devices. Output devices are connected to the processor and are capable of displaying output information in one or more ways. An example of an output device is a visual display device, such as a liquid crystal display (LCD), a light-emitting diode (LED) display, a cathode ray tube (CRT), or a projector. Input devices are connected to the processor and are capable of receiving user input in one or more ways. Examples of input devices include a mouse, keyboard, touchscreen device, sensing device, and so on.
[0051] The aforementioned components of the electronic device can be interconnected through any one or more combinations of buses such as data bus, address bus, control bus, expansion bus, and local bus.
[0052] Figure 2 The flowchart shown is a medical image processing method according to an embodiment of this application. This medical image processing method can... Figure 1 The electronic device shown is an example of this. Figure 2 As shown, the medical image processing method includes the following steps S21 to S24.
[0053] S21, Acquire a medical image containing blood vessels. Exemplarily, the medical image may be a coronary CTA image, but this embodiment is not limited thereto.
[0054] S22, The medical image is processed to obtain a first mask for the blood vessels. Exemplarily, the first mask may be a binary image with the same size as the medical image, in which different values (e.g., 0 and 1) can be used to identify blood vessels and background areas.
[0055] S23, the first mask is etched to obtain a second mask for the blood vessel. The etching process can change the boundary shape of the first mask, causing the boundary of the first mask to shrink.
[0056] S24, Obtain the blood vessel boundary mask based on the first mask and the second mask.
[0057] In some possible implementations, eroding the first mask to obtain the second mask for blood vessels includes: performing pixel-by-pixel traversal of the first mask using a convolutional kernel; upon reaching any pixel, performing a bitwise logical AND operation between the convolutional kernel and the corresponding region of that pixel; if all elements in the convolutional kernel match the elements in the corresponding region of that pixel, then setting that pixel to 1; otherwise, setting it to 0. After the traversal is complete, the erosion of the first mask is achieved, yielding the second mask.
[0058] In some possible implementations, the first mask can be divided into patches with a fixed step size and kernel size, each patch containing voxels covered by the kernel. For example, this splitting operation can be performed on a GPU.
[0059] Please see Figure 3 The first mask is three-dimensional data. Etching the first mask to obtain the second mask for the blood vessels includes the following steps S31 to S34.
[0060] S31, use a convolution kernel to extract the sliding local region block from the first mask to obtain the first region block.
[0061] S32, using a convolution kernel to extract a sliding local region block from the first region block to obtain a second region block.
[0062] S33, using a convolution kernel to extract sliding local blocks from the second region block to obtain the third region block.
[0063] S34, obtain the minimum value in each third region block, and generate a second mask based on the minimum value, wherein the size of the second mask is the same as that of the first mask.
[0064] The above process will be explained in detail with an example. In this example, the size of the convolution kernel is 3. The first mask is a 3×3×3 three-dimensional tensor, as shown in the following example: tensor([[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],
[0065] [[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],
[0066] [[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]]])
[0067] According to step S31 above, the original tensor is first padded with zeros to prevent the image size from shrinking after the operation. The padded tensor becomes 5×5×5, as shown in the example below:
[0068] tensor([[[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.]],
[0069] [[0.,0.,0.,0.,0.],[0.,1.,1.,1.,0.],[0.,1.,1.,1.,0.],[0.,1.,1.,1.,0.],[0.,0.,0.,0.,0.]],
[0070] [[0.,0.,0.,0.,0.],[0.,1.,1.,1.,0.],[0.,1.,1.,1.,0.],[0.,1.,1.,1.,0.],[0.,0.,0.,0.,0.]],
[0071] [[0.,0.,0.,0.,0.],[0.,1.,1.,1.,0.],[0.,1.,1.,1.,0.],[0.,1.,1.,1.,0.],[0.,0.,0.,0.,0.]],
[0072] [[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.],[0.,0.,0.,0.,0.]]])
[0073] Using a convolution kernel, a sliding local region block is extracted from the first mask to obtain a 3×5×5×3 first region block, as shown in the following example:
[0074] tensor([[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],
[0075] [[0.,0.,0.],[0.,1.,1.],[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],
[0076] [[0.,0.,0.],[0.,1.,1.],[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],
[0077] [[0.,0.,0.],[0.,1.,1.],[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],
[0078] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0079] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],
[0080] [[0.,0.,0.],[1.,1.,1.],[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],
[0081] [[0.,0.,0.],[1.,1.,1.],[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],
[0082] [[0.,0.,0.],[1.,1.,1.],[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],
[0083] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0084] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],
[0085] [[0.,0.,0.],[1.,1.,0.],[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],
[0086] [[0.,0.,0.],[1.,1.,0.],[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],
[0087] [[0.,0.,0.],[1.,1.,0.],[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],
[0088] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]]])
[0089] According to step S32 above, a sliding local region block is extracted from the first region block using a convolution kernel to obtain a second region block of 3×3×5×3×3. An example of this second region block is as follows:
[0090] tensor([[[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],
[0091] [[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],
[0092] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],
[0093] [[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],
[0094] [[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0095] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],
[0096] [[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],
[0097] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]]],
[0098] [[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],
[0099] [[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],
[0100] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],
[0101] [[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],
[0102] [[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0103] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],
[0104] [[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],
[0105] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]]],
[0106] [[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],
[0107] [[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],
[0108] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0109] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],
[0110] [[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],
[0111] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0112] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],
[0113] [[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],
[0114] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]]]])
[0115] According to step S33 above, a sliding local region block is extracted from the second region block using a convolution kernel to obtain a 3×3×3×3×3×3 third region block. An example of this third region block is as follows:
[0116] tensor([[[[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]]],
[0117] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]]],
[0118] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]]]],
[0119] [[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]]],
[0120] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]]],
[0121] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]]]],
[0122] [[[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]]],
[0123] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]]],
[0124] [[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]]]]],
[0125] [[[[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]]],
[0126] [[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]]],
[0127] [[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]]]],
[0128] [[[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]]],
[0129] [[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]]],
[0130] [[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]]]],
[0131] [[[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]]],
[0132] [[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]]],
[0133] [[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]]]]],
[0134] [[[[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],[[0.,0.,0.],[0.,1.,1.],[0.,1.,1.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0135] [[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0136] [[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],[[0.,0.,0.],[1.,1.,0.],[1.,1.,0.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]]],
[0137] [[[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],[[0.,1.,1.],[0.,1.,1.],[0.,1.,1.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0138] [[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],[[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0139] [[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],[[1.,1.,0.],[1.,1.,0.],[1.,1.,0.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]]],
[0140] [[[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],[[0.,1.,1.],[0.,1.,1.],[0.,0.,0.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0141] [[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],[[1.,1.,1.],[1.,1.,1.],[0.,0.,0.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]],
[0142] [[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],[[1.,1.,0.],[1.,1.,0.],[0.,0.,0.]],[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]]]]])
[0143] According to step S34, the minimum value is taken from each 3×3×3 third region block to obtain 3×3×3 data, as shown in the example below:
[0144] tensor([[[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]],
[0145] [[0.,0.,0.],[0.,1.,0.],[0.,0.,0.]],
[0146] [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]])
[0147] This resulted in the second mask.
[0148] In one embodiment of this application, obtaining a blood vessel boundary mask based on a first mask and a second mask includes: subtracting the second mask from the first mask to obtain the blood vessel boundary mask.
[0149] Please see Figure 4A In one embodiment of this application, the medical image processing method may further include the following steps S41 and S42.
[0150] S41, Obtain the Gold Standard Vessel Mask. The Gold Standard Vessel Mask is derived from the Gold Standard Vessel Mask. The Gold Standard Vessel Mask is a binary mask that accurately marks or segments vascular structures in a medical image, used to determine which pixels in the image belong to vascular regions and which do not.
[0151] In some possible implementations, the method for obtaining the gold standard vascular boundary mask may include: obtaining the gold standard vascular mask; etching the gold standard vascular mask to obtain a third mask; and obtaining the gold standard vascular boundary mask based on the third mask and the gold standard vascular mask. The above process is similar to the method for obtaining the second mask described in step S23, and will not be repeated here.
[0152] S42, obtain the boundary loss based on the gold standard vascular boundary mask and vascular boundary mask.
[0153] Please see Figure 4B In some possible implementations, obtaining the boundary loss based on the gold standard vascular boundary mask and the vascular boundary mask includes the following steps S421 to S422.
[0154] S421, obtain the intersection and union of the gold standard vascular boundary mask and the vascular boundary mask.
[0155] S422, obtain the boundary loss based on the intersection and union of the gold standard vascular boundary mask and the vascular boundary mask.
[0156] For example, the formula for calculating boundary loss is as follows:
[0157]
[0158] Among them, GT is the gold standard vascular boundary mask, and Pred is the vascular boundary mask.
[0159] In one embodiment of this application, processing a medical image to obtain a first mask for blood vessels includes: processing the medical image using a blood vessel segmentation model to obtain the first mask. The blood vessel segmentation model is a trained deep learning model, and its training loss includes boundary loss.
[0160] In some possible implementations, boundary loss and other losses (such as Dice loss and Cross Entropy loss) can be combined when training the blood vessel segmentation model to improve the accuracy of the blood vessel segmentation model.
[0161] As described above, this application provides a medical image processing method that can quickly and accurately acquire blood vessel boundary masks. In some implementations, for a 512×512×275 medical image, the medical image processing method provided in this application only takes 3 seconds to acquire the blood vessel boundary mask, while some other technical solutions require 12 seconds. Furthermore, the blood vessel boundary mask acquired by this medical image processing method can be applied to the training of blood vessel segmentation models, thereby improving the sensitivity of the blood vessel segmentation model to blood vessel boundaries.
[0162] The scope of protection of the medical image processing method described in this application is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the scope of protection of this application.
[0163] This application also provides a medical image processing system that can implement the medical image processing method described in this application. However, the implementation apparatus of the medical image processing method described in this application includes, but is not limited to, the structure of the medical image processing system listed in this embodiment. All structural modifications and substitutions of the prior art made in accordance with the principles of this application are included within the protection scope of this application.
[0164] Figure 5 The diagram shown is a structural schematic of the medical image processing system 5 in an embodiment of this application. Figure 5 As shown, the medical image processing system 5 provided in this embodiment includes a medical image acquisition module 51, a first mask acquisition module 52, a second mask acquisition module 53, and a boundary mask acquisition module 54. The medical image acquisition module 51 acquires a medical image containing blood vessels. The first mask acquisition module 52 processes the medical image to obtain a first mask for the blood vessels. The second mask acquisition module 53 erodes the first mask to obtain a second mask for the blood vessels. The boundary mask acquisition module 54 acquires a boundary mask for the blood vessels based on the first and second masks.
[0165] It should be noted that the modules included in the medical image processing system 5 are... Figure 2 Steps S21 to S24 in the medical image processing system shown correspond one-to-one and will not be elaborated here.
[0166] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.
[0167] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0168] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0169] This application also provides a computer-readable storage medium storing a computer program thereon, which is executed by a processor to implement the medical image processing method provided in this application.
[0170] In some possible implementations, any combination of one or more storage media may be used. The storage media may be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), optical fiber, portable compact disk read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0171] This application also provides an electronic device. Figure 6The diagram shown is a structural schematic of electronic device 6 in one embodiment of this application. Figure 6 As shown, in this embodiment, the electronic device 6 includes a memory 61 and a processor 62.
[0172] The memory 61 is used to store computer programs. In some possible implementations, the memory 61 may include various media capable of storing program code, such as ROM, RAM, magnetic disk, USB flash drive, memory card, or optical disk.
[0173] In this embodiment, memory 61 may include a computer system readable medium in the form of volatile memory, such as RAM and / or cache memory. Electronic device 6 may further include other removable / non-removable, volatile / non-volatile computer system storage media. Memory 61 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0174] The processor 62 is connected to the memory 61 and is used to execute the computer program stored in the memory 61 so that the electronic device 6 performs the medical image processing method provided in the embodiments of this application.
[0175] In some embodiments, processor 62 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. In other embodiments, processor 62 may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0176] In some possible implementations, the electronic device 6 provided in this application embodiment may further include a display 63. The display 63 is communicatively connected to the memory 61 and the processor 62, and is used to display a graphical user interface (GUI) related to the medical image processing method.
[0177] In this embodiment, the display 63 may include a display screen (display panel). In some implementations, a liquid crystal display (LCD), an organic light-emitting diode (OLED), or similar form of display panel may be used. Alternatively, the display 63 may also be a touch panel (touchscreen, touch screen), which may include a display screen and a touch-sensitive surface. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to the processor 62 to determine the type of touch event. Subsequently, the processor 62 provides corresponding visual output on the display device based on the type of touch event.
[0178] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A medical image processing method, characterized in that, The medical image processing method includes: Acquire medical images, the medical images containing blood vessels; The medical image is processed to obtain a first mask of the blood vessel; The first mask is etched to obtain a second mask for the blood vessel. Obtain the blood vessel boundary mask based on the first mask and the second mask; A gold standard vascular boundary mask is obtained, wherein the gold standard vascular boundary mask is derived from the gold standard vascular mask; The boundary loss is obtained based on the gold standard vascular boundary mask and the vascular boundary mask; Wherein, the first mask is three-dimensional data, and the etching process of the first mask to obtain the second mask of the blood vessel includes: extracting sliding local region blocks from the first mask using a convolution kernel to obtain a first region block; extracting sliding local region blocks from the first region block using the convolution kernel to obtain a second region block; extracting sliding local region blocks from the second region block using the convolution kernel to obtain a third region block; obtaining the minimum value among the third region blocks, and generating the second mask according to the minimum value, wherein the size of the second mask is the same as that of the first mask.
2. The medical image processing method according to claim 1, characterized in that, The boundary loss obtained based on the gold standard vascular boundary mask and the vascular boundary mask includes: Obtain the intersection and union of the gold standard blood vessel boundary mask and the blood vessel boundary mask; The boundary loss is obtained based on the intersection and union of the gold standard vascular boundary mask and the vascular boundary mask.
3. The medical image processing method according to claim 2, characterized in that, The formula for calculating the boundary loss is as follows: ; in, The gold standard vascular boundary mask, This is the boundary mask for the blood vessel.
4. The medical image processing method according to claim 1, characterized in that, Processing the medical image to obtain a first mask of the blood vessels includes: processing the medical image using a blood vessel segmentation model to obtain the first mask, wherein the loss of the blood vessel segmentation model during training includes the boundary loss.
5. The medical image processing method according to claim 1, characterized in that, Obtaining the vascular boundary mask based on the first mask and the second mask includes: subtracting the second mask from the first mask to obtain the vascular boundary mask.
6. A medical image processing system, characterized in that, For implementing the medical image processing method according to any one of claims 1 to 5, the medical image processing system comprises: A medical image acquisition module is used to acquire medical images, wherein the medical images include blood vessels; The first mask acquisition module is used to process the medical image to obtain the first mask of the blood vessel; The second mask acquisition module is used to perform an etching process on the first mask to obtain the second mask of the blood vessel. A boundary mask acquisition module is used to acquire a blood vessel boundary mask based on the first mask and the second mask.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.
8. An electronic device, characterized in that, The electronic device includes: A memory that stores a computer program; The processor, which is communicatively connected to the memory, executes the method of any one of claims 1 to 5 when the computer program is invoked.
Citation Information
Patent Citations
Aorta vascular stent windowing device based on mixed reality technology
CN112057204A
Vascular system variation detection method and device and storage medium
CN114913174A
Fishing behavior detection method and system
CN116721459A