Medical image processing method and device, electronic equipment and storage medium

By finding and using the largest connected component to filter misclassified regions in medical image segmentation results, the problem of inaccurate segmentation results in traditional methods is solved, and the accuracy of segmentation results is improved.

CN115423837BActive Publication Date: 2026-02-17OUR UNITED CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110514772.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-12
Publication Date
2026-02-17
Estimated Expiration
2041-05-12

AI Technical Summary

Technical Problem

Traditional deep learning-based medical image segmentation methods lack post-processing operations on the model output, resulting in some misclassified regions in the segmentation results and low accuracy.

Method used

By finding the connected regions corresponding to each category label in the image segmentation results and using the largest connected region corresponding to that category label as the target segmentation region for filtering, misclassification can be avoided.

Benefits of technology

It improves the accuracy of medical image segmentation results, avoids missegmentation of image segmentation regions, and enhances the usability of segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115423837B_ABST
    Figure CN115423837B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of medical image processing method, device, electronic equipment and storage medium, it is related to image processing technical field.The medical image processing method, device, electronic equipment and storage medium provided in the embodiment of the application are obtained after the image segmentation result output by the segmentation model pre-trained after medical image input, by finding the connected region corresponding to each class label in image segmentation result, for each class label, the maximum connected region corresponding to this class label is regarded as the target segmentation region of this class label, so, image segmentation region can be effectively filtered, the accuracy of segmentation result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to a medical image processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of deep learning technology, deep learning has been widely applied in the field of medical image segmentation, and its application has effectively improved work efficiency.

[0003] Currently, traditional deep learning-based medical image segmentation methods focus more on data preprocessing and lack postprocessing of model output, resulting in some misclassified regions in the segmentation results. Summary of the Invention

[0004] Based on the above research, the present invention provides a medical image processing method, apparatus, electronic device, and storage medium to improve the above-mentioned problems.

[0005] Embodiments of the present invention can be implemented through the following:

[0006] In a first aspect, embodiments of the present invention provide a medical imaging method, the method comprising:

[0007] The image segmentation result is obtained after a medical image is input into a pre-trained segmentation model; wherein the image segmentation result includes at least one image segmentation region and a category label for each image segmentation region;

[0008] Find the connected regions corresponding to each of the aforementioned category labels;

[0009] For each category label, the largest connected region corresponding to that category label is taken as the target segmentation region for that category label.

[0010] In an optional implementation, the method further includes:

[0011] Acquire sample image data and corresponding label image data;

[0012] Based on the labeled image data, determine whether the sample image data is an organ image with mutually symmetrical regions;

[0013] If not, perform a first enhancement operation on the sample image data and the label image data;

[0014] If so, a second enhancement operation is performed on the sample image data and the label image data; wherein the first enhancement operation includes a mirroring operation, and the second enhancement operation includes operations other than the mirroring operation;

[0015] The enhanced sample image data and the labeled image data are input into the neural network for training to obtain the segmentation model.

[0016] In an optional implementation, the step of determining whether the sample image data is an organ image with mutually symmetrical regions based on the labeled image data includes:

[0017] Read the tag information from the tag image data;

[0018] Determine whether the label information is preset label information;

[0019] If so, the sample image data corresponding to the labeled image data is determined to be an organ image with mutually symmetrical regions.

[0020] In an optional implementation, before obtaining the image segmentation result output by the pre-trained segmentation model after inputting the medical image, the method further includes:

[0021] Obtain the pixel data of the medical image;

[0022] Interpolation is performed on each pixel of the medical image to obtain the interpolated medical image;

[0023] The steps for obtaining the image segmentation result output by the pre-trained segmentation model after inputting a medical image include:

[0024] The interpolated medical image is input into a pre-trained segmentation model;

[0025] Obtain the image segmentation result output by the segmentation model after processing the interpolated medical image.

[0026] In an optional implementation, the step of interpolating each pixel of the medical image includes:

[0027] Each pixel is taken as a target pixel, and pixels within a preset range of the target pixel are obtained;

[0028] The pixel values ​​of the pixels within the preset range are counted to obtain the number of each pixel value;

[0029] The value of the most numerous pixel is used as the value of the target pixel to perform interpolation processing on the medical image.

[0030] In an optional implementation, before obtaining the image segmentation result output by the pre-trained segmentation model after inputting the medical image, the method further includes:

[0031] Obtain the available memory of the device processing the medical images;

[0032] The medical image is divided into blocks according to the available memory of the device to obtain the block-based medical image;

[0033] The steps for obtaining the image segmentation result output by the pre-trained segmentation model after inputting a medical image include:

[0034] The segmented medical image is then input into a pre-trained segmentation model;

[0035] Obtain the image segmentation result output by the segmentation model after processing the segmented medical image.

[0036] In an optional implementation, the step of finding the connected region corresponding to each category label includes:

[0037] For each category label, find connected regions in the image segmentation region marked by that category label, using the defined neighborhood.

[0038] Secondly, embodiments of the present invention provide a medical image processing device, including an image acquisition module and an image processing module;

[0039] The image acquisition module is used to acquire the image segmentation result output by the medical image after it is input into the pre-trained segmentation model; wherein, the image segmentation result includes at least one image segmentation region and the category label of each image segmentation region;

[0040] The image processing module is used to find the connected regions corresponding to each category label, and for each category label, the largest connected region corresponding to that category label is used as the target segmentation region for that category label.

[0041] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the medical image processing method described in any of the foregoing embodiments.

[0042] Fourthly, embodiments of the present invention provide a storage medium, the storage medium including a computer program, wherein the computer program, when running, controls the electronic device where the storage medium is located to execute the medical image processing method described in any of the foregoing embodiments.

[0043] The medical image processing method, apparatus, electronic device, and storage medium provided in this invention, after obtaining the image segmentation result output by the medical image input to the pre-trained segmentation model, finds the connected region corresponding to each category label in the image segmentation result, and for each category label, takes the largest connected region corresponding to that category label as the target segmentation region for that category label. In this way, the image segmentation region can be effectively filtered, avoiding missegmentation of the image segmentation region and improving the accuracy of the segmentation result. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a structural block diagram of an electronic device provided in an embodiment of the present invention.

[0046] Figure 2 This is a schematic flowchart of a medical image processing method provided in an embodiment of the present invention.

[0047] Figure 3 This is another schematic flowchart of the medical image processing method provided in an embodiment of the present invention.

[0048] Figure 4 This is another schematic flowchart of the medical image processing method provided in the embodiments of the present invention.

[0049] Figure 5 This is a block diagram of a medical image processing device provided in an embodiment of the present invention.

[0050] Icons: 100 - Electronic device; 10 - Medical image processing device; 11 - Image acquisition module; 12 - Image processing module; 20 - Memory; 30 - Processor; 40 - Communication unit. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0052] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0053] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0054] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0055] Medical images often reflect a patient's current physical condition. For example, computed tomography (CT) images are widely used in disease diagnosis, precision treatment, preoperative analysis, and intraoperative guidance. The accuracy of medical image segmentation is crucial in the treatment process, and early medical image segmentation relied entirely on physicians. However, with the rapid development of deep learning technology, it has been widely applied in the field of medical image segmentation.

[0056] However, current traditional deep learning-based medical image segmentation methods focus more on data preprocessing and lack postprocessing of model output, resulting in some misclassified regions in the segmentation results, low accuracy, and affecting the effectiveness of use.

[0057] Based on this, this embodiment provides a medical image processing method, apparatus, electronic device, and storage medium. By filtering the image segmentation results output by the segmentation model using the maximum connected region method, misclassified regions are filtered out, thus avoiding misclassification of image segmentation regions and improving the usability of the segmentation results.

[0058] Figure 1 This is a structural block diagram of an electronic device 100 provided in this embodiment. Figure 1 As shown, the electronic device may include a medical image processing device 10, a memory 20, a processor 30, and a communication unit 40. The memory 20 stores machine-readable instructions that can be executed by the processor 30. When the electronic device 100 is running, the processor 30 and the memory 20 communicate with each other via a bus. The processor 30 executes the machine-readable instructions and performs the medical image processing method.

[0059] The memory 20, processor 30, and communication unit 40 are electrically connected directly or indirectly to each other to achieve signal transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The medical image processing device 10 includes at least one software function module that can be stored in the memory 20 in the form of software or firmware. The processor 30 is used to execute the executable module (e.g., the software function module or computer program included in the medical image processing device 10) stored in the memory 20.

[0060] The memory 20 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0061] The processor 30 can be an integrated circuit chip with signal processing capabilities. The processor 30 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It can 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. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0062] In this embodiment, the memory 20 is used to store the program, and the processor 30 is used to execute the program after receiving the execution instruction. The process definition method disclosed in any implementation of this embodiment can be applied to the processor 30, or implemented by the processor 30.

[0063] The communication unit 40 is used to establish a communication connection between the electronic device 100 and other devices via a network, and to send and receive data via the network.

[0064] In some implementations, the network can be any type of wired or wireless network, or a combination thereof. By way of example only, the network may include wired networks, wireless networks, fiber optic networks, telecommunications networks, intranets, the Internet, local area networks (LANs), wide area networks (WANs), wireless local area networks (WLANs), metropolitan area networks (MANs), public switched telephone networks (PSTNs), Bluetooth networks, ZigBee networks, or near field communication (NFC) networks, or any combination thereof.

[0065] In this embodiment, the electronic device 100 may be, but is not limited to, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or other similar devices. Optionally, in some implementations, the electronic device 100 may also be a server or a service cluster consisting of multiple servers. This embodiment does not impose any restrictions on the specific type of electronic device.

[0066] Understandably, Figure 1 The structure shown is for illustrative purposes only. The electronic device 100 may also have... Figure 1 Showing more or fewer components, or having with Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0067] based on Figure 1 The implementation architecture of this embodiment provides a medical image processing method, which is based on... Figure 1 The electronic device shown performs the following based on Figure 1 The structural diagram of the electronic device 100 shown illustrates in detail the steps of the medical image processing method provided in this embodiment. Please refer to the attached diagram. Figure 2 The medical image processing method provided in this embodiment includes steps S101 to S103.

[0068] Step S101: Obtain the image segmentation result output by the pre-trained segmentation model after inputting the medical image.

[0069] The medical images may include one or more of the following: endoscopic images, angiography images, computed tomography images, positron emission tomography images, magnetic resonance images, and ultrasound images. Specifically, this embodiment does not limit the types of images.

[0070] After obtaining the medical image, it can be input into a pre-trained segmentation model for image segmentation. After the segmentation model performs image segmentation on the medical image, it can output the image segmentation result.

[0071] In this embodiment, the image segmentation result includes at least one image segmentation region and category labels for each image segmentation region. The category labels can be any distinguishing identifier, and their specific type is not limited; they can be numeric labels, English character labels, or Chinese character labels, and can be set according to actual needs.

[0072] Typical medical images include medical feature regions, which can be lesion areas, specific tissues, or organ regions, etc. After a medical image is input into a segmentation model, the model can segment these medical feature regions, outputting the segmentation results, i.e., image segmentation regions. Each medical feature region corresponds to one image segmentation region, and for the same medical feature region, it is labeled with the same category label; that is, each image segmentation region is labeled with a category label. For example, the image segmentation result includes two image segmentation regions, segmentation region a and segmentation region b. Segmentation region a is marked with category label 1, and segmentation region b is marked with category label 2.

[0073] Given that existing segmentation models cannot accurately segment certain similar feature regions, such as the spinal cord and other bones, they sometimes label parts of the spinal cord with the category labels corresponding to the bone regions, or vice versa. To improve the accuracy of image segmentation and avoid misclassification, in this embodiment, after obtaining the image segmentation result output by the segmentation model, step S102 is executed.

[0074] Step S102: Find the connected regions corresponding to each category label.

[0075] In this context, a connected component generally refers to an image region (blob) composed of foreground pixels with the same pixel value and adjacent positions. In this embodiment, after obtaining the image segmentation result output by the segmentation model, all connected components corresponding to each category label in the image segmentation result can be found.

[0076] Step S103: For each category label, the largest connected region corresponding to that category label is taken as the target segmentation region for that category label.

[0077] Specifically, for each category label, after finding all connected regions corresponding to that category label, the largest connected region corresponding to that category label is used as the target segmentation region for that category label. In other words, the largest connected region corresponding to that category label replaces the image segmentation region marked by that category label, and this is used as the final segmentation result for that category label.

[0078] The medical image processing method provided in this embodiment, after obtaining the image segmentation result output by the medical image input to the pre-trained segmentation model, finds the connected region corresponding to each category label in the image segmentation result. For each category label, the largest connected region corresponding to that category label is used as the target segmentation region for that category label. In this way, the image segmentation region can be effectively filtered, avoiding missegmentation of the image segmentation region and improving the accuracy of the segmentation result.

[0079] To facilitate finding the connected component corresponding to each category label in the image segmentation result, in this embodiment, after obtaining the image segmentation result output by the segmentation model, the connected component corresponding to each category label in the image segmentation result can be found through the following steps:

[0080] For each category label, find connected regions in the image segmentation region marked by that category label, using the defined neighborhood.

[0081] The defined neighborhood can be an 8-neighborhood or a 4-neighborhood. In some implementations, it can also be other neighborhoods. This embodiment does not make any specific limitations.

[0082] In this embodiment, after obtaining the image segmentation result, for each category label in the image segmentation result, all connected regions can be searched within the image segmentation region marked by that category label using a set neighborhood. For example, for a certain category label, if the connected regions within the image segmentation region marked by the category label are searched using an 8-neighborhood approach, then for each pixel within the image segmentation region marked by the category label, it is determined whether the values ​​of pixels in the eight directions (up, down, left, right, upper left, upper right, lower left, and lower right) are the same as the value of that pixel. Then, pixels with the same value are grouped into one object and determined to belong to the same connected region. For example, if the value of a pixel in the upper left direction is the same as the value of that pixel, then these two pixels are grouped into the same object and determined to belong to the same connected region. This process continues until all pixels within the image segmentation region marked by the category label have been processed, resulting in all connected regions corresponding to that category label. If we use a 4-neighborhood approach to find connected components within the image segmentation region labeled with that category label, then for each pixel within that region, we check if the values ​​of the pixels above, below, left, and right of that pixel's location are the same as its value. Pixels with the same value are then grouped together as one object, indicating they belong to the same connected component. This process continues until all pixels within the image segmentation region labeled with that category label have been processed, resulting in all connected components corresponding to that category label.

[0083] After obtaining all connected regions corresponding to each category label, we can sort all connected regions corresponding to each category label and take the largest connected region corresponding to each category label as the target segmentation region corresponding to each category label.

[0084] Given that medical images may be two-dimensional or three-dimensional in practical applications, to facilitate obtaining the largest connected region for each category label in the image segmentation results, for each category label, after finding all connected regions corresponding to that category label, if the medical image is two-dimensional, all connected regions corresponding to that category label can be sorted by area, and then the connected region with the largest area can be used as the target segmentation region corresponding to that category label; if the medical image is three-dimensional, all connected regions corresponding to that category label can be sorted by volume, and then the connected region with the largest volume can be used as the target segmentation region corresponding to that category label, thereby improving the accuracy of the segmentation results.

[0085] For example, when the medical image is two-dimensional, assuming the image segmentation result includes two segmented regions, namely segmentation region a and segmentation region b, segmentation region a is marked with category label 1, and segmentation region b is marked with category 2. For category label 1, within segmentation region a marked with this category label, connected regions a_1, a_2, and a_3 are found using an 8-neighborhood approach. The area of ​​connected region a_1 < the area of ​​connected region a_2 < the area of ​​connected region a_3. Therefore, connected region a_3 is used instead of segmentation region a as the final segmentation result for category label 1. When the medical image is three-dimensional, connected regions a_1, a_2, and a_3 are sorted by volume, and the connected region with the largest volume is used as the final segmentation result for category label 1.

[0086] Given that medical images often have varying resolutions across different dimensions in practical applications, data consistency cannot be guaranteed when input into the segmentation model. To ensure input data consistency and improve image segmentation accuracy, this embodiment refers to... Figure 3 Before obtaining the image segmentation result output by the pre-trained segmentation model after inputting the medical image, the medical image processing method further includes steps S201 to S202.

[0087] Step S201: Obtain pixel data of medical images.

[0088] Specifically, if the medical image is a two-dimensional image, pixel data of the two dimensions of the medical image is obtained; if the medical image is a three-dimensional image, pixel data of the three dimensions of the medical image is obtained.

[0089] Step S202: Perform interpolation on each pixel of the medical image to obtain the interpolated medical image.

[0090] After obtaining the pixel data for each dimension of the medical image, interpolation can be performed on each pixel of each dimension. Optionally, in this embodiment, nearest neighbor interpolation is used to interpolate each pixel of each dimension of the medical image.

[0091] Optionally, this can be achieved through the following steps:

[0092] Each pixel is taken as the target pixel, and pixels within a preset range of the target pixel are obtained;

[0093] The pixel values ​​of pixels within a preset range are counted to obtain the number of each pixel value;

[0094] The value of the most numerous pixels is used as the value of the target pixel for interpolation processing of the medical image.

[0095] The preset range can be set by radius or in other ways; specifically, this embodiment does not impose any restrictions. Understandably, when set by radius, the value of the set radius can be determined according to actual needs, and this embodiment does not impose any limitations on this either.

[0096] In this embodiment, each pixel is designated as a target pixel. Then, for each target pixel, all pixels within a preset range are acquired. After acquiring all pixels within the preset range, the pixel values ​​of all pixels within the preset range are counted to obtain the quantity of each pixel value. The pixel value with the highest quantity is then taken as the value of the target pixel. For example, for pixel 'a' in a certain dimension, there are 20 pixels within its preset range. Among them, 10 pixels have a pixel value of 200, 8 pixels have a pixel value of 100, and 2 pixels have a pixel value of 50. Since the pixel value of 200 is the most frequent, the pixel value of pixel 'a' is set to 200.

[0097] Accordingly, after interpolating each pixel of the medical image, the interpolated medical image can be input into a pre-trained segmentation model. The segmentation model then segments the interpolated medical image, and finally, the image segmentation result output by the segmentation model after processing the interpolated medical image is obtained.

[0098] The medical image processing method provided in this embodiment unifies the pixel interval of the medical image by interpolating each pixel in each dimension, so that the medical image has the same resolution in different dimensions, ensuring the consistency of the data fed into the segmentation model.

[0099] Because electronic devices have limited memory, it's crucial to ensure the smooth operation of the segmentation model while simultaneously running other programs. Medical images are characterized by large data volumes; if the entire image is input into the segmentation model at once, the excessively large image size will impose a high load on the model, consuming excessive memory and potentially causing it to crash. Therefore, please refer to [further details needed]. Figure 4 In this embodiment, before obtaining the image segmentation result output by the pre-trained segmentation model after the medical image is input, the medical image processing method further includes steps S301 to S302.

[0100] Step S301: Obtain the available memory of the device for processing medical images.

[0101] Step S302: Divide the medical image into blocks according to the available memory of the device to obtain the block-based medical image.

[0102] Before inputting the medical image into the segmentation model, the available memory of the current electronic device's GPU is obtained. Then, the size of the image block is set according to the available memory. Finally, the medical image is segmented according to the set image block size.

[0103] In one optional implementation, when setting the image block size based on available memory, the memory usage of the segmentation model when processing images of different sizes can be analyzed first to obtain the correspondence between different image sizes and memory usage. In actual use, after obtaining the available memory of the electronic device, the medical image can be segmented according to the correspondence between memory usage and image size, as well as the currently available memory, so that the segmentation model can meet memory requirements when segmenting the segmented medical image. For example, the correspondence between different image sizes and memory usage might be: image size a corresponds to memory A, image size b corresponds to memory B, and image size c corresponds to memory C. Assuming the available memory is A, the medical image can be segmented into blocks of size a.

[0104] Understandably, if the medical image is a two-dimensional image, it can be cut into multiple rectangular blocks; if the medical image is a three-dimensional image, it can be cut into multiple cubic blocks.

[0105] Accordingly, after the medical image is segmented, the segmented medical image can be input into a pre-trained segmentation model. The segmentation model will then process the segmented medical image and output the image segmentation result.

[0106] Optionally, in this embodiment, after dividing the medical image into blocks to obtain multiple image blocks, each image block can be sequentially input into a pre-trained segmentation model for segmentation processing to obtain the image segmentation result corresponding to each image block.

[0107] In one optional implementation, after obtaining the image segmentation results corresponding to each image block, the image segmentation results corresponding to each image block can be stitched together to obtain the stitched image segmentation result. After obtaining the stitched image segmentation result, all connected regions corresponding to each category label are searched.

[0108] The medical image processing method provided in this embodiment obtains the available memory of the GPU of the current electronic device before inputting the medical image into the segmentation model, and divides the medical image into blocks according to the available memory, thereby avoiding the crash of the segmentation model and meeting the memory requirements of the electronic device.

[0109] Due to the difficulty in acquiring medical image data, insufficient training data may occur when training segmentation models. Therefore, during data preprocessing, enhancement operations such as rotation, mirroring, and scaling are often performed on the original medical images to increase the data volume. However, in actual training, it has been found that left-right mirroring operations can lead to incomplete segmentation of the left and right parts of the same organ. For example, when the medical image is a lung image, since the lung is divided into a left lung and a right lung, after mirroring, the segmentation model cannot accurately segment the left and right lung parts, resulting in the left lung containing the label of the right lung or vice versa.

[0110] To improve the accuracy of the segmentation model, the medical image processing method provided in this embodiment also includes a segmentation model training step. During the segmentation model training process, in the data preprocessing stage, the mirroring operation is removed during data augmentation. Specifically, this can be achieved through the following steps:

[0111] First, obtain sample image data and corresponding label image data.

[0112] Next, based on the labeled image data, it is determined whether the sample image data is an organ image with mutually symmetrical regions.

[0113] If not, perform the first enhancement operation on the sample image data and the label image data.

[0114] If so, perform a second enhancement operation on the sample image data and the label image data.

[0115] The first enhanced operation includes mirroring, and the second added operation includes operations other than mirroring.

[0116] Finally, the enhanced sample image data and the labeled image data are input into the neural network for training to obtain the segmentation model.

[0117] In this process, by labeling each medical feature region in the sample image data, the corresponding labeled image data can be obtained.

[0118] It should be noted that when labeling each medical feature region, if the image is an organ image with mutually symmetrical regions (i.e., an organ image with two parts), then the image is labeled with a preset label, and different labels are used for the mutually symmetrical regions included in the image. The preset labels can be set according to actual needs, as long as they are identifiable and unique. For example, a lung image with mutually symmetrical regions can be labeled with the preset label L.

[0119] After obtaining the sample image data and the corresponding label image data, when preprocessing the obtained data, it is possible to determine whether the sample image data is an organ image with mutually symmetrical regions based on the label image data.

[0120] In an optional implementation, the step of determining whether the sample image data is an organ image with mutually symmetrical regions based on the labeled image data includes:

[0121] Read the tag information from the tag image data.

[0122] Determine whether the label information is the preset label information.

[0123] If so, the sample image data corresponding to the labeled image data is determined to be an organ image with mutually symmetrical regions.

[0124] Since the labeled image data is obtained by labeling the sample image data, the label information of the labeled image data can be read to determine whether the sample image data is an organ image with mutually symmetrical regions. Specifically, when the label information of the labeled image data is the preset label information, the sample image data corresponding to the labeled image data is determined to be an organ image with mutually symmetrical regions. When the label information of the labeled image data is not the preset label information, the sample image data corresponding to the labeled image data is determined not to be an organ image with mutually symmetrical regions.

[0125] For example, after reading the label information of the label image data, the label information is analyzed and it is found that the label information is a preset label L. Then, the sample image data corresponding to the label image data is determined to be an organ image with mutually symmetrical regions.

[0126] In this embodiment, if it is determined that the sample image data is not an organ image with mutually symmetrical regions, a first enhancement operation is performed on the sample image data and the label image data, that is, a mirror operation is performed on the sample image data and the label image data to increase the data volume; if it is determined that the sample image data is an organ image with mutually symmetrical regions, a second enhancement operation is performed on the sample image data and the label image data, that is, a data enhancement operation other than the mirror operation is performed on the sample image data and the label image data to increase the data volume, such as rotation operation, scaling operation, etc.

[0127] Understandably, when performing the first augmentation operation on the sample image data and the label image data, the first augmentation operation may include not only mirroring operations, but also other data augmentation operations such as rotation operations and scaling operations.

[0128] After augmenting the sample image data and label image data, the augmented sample image data and label image data can be input into the neural network for training to obtain the segmentation model.

[0129] It should be noted that in this embodiment, the segmentation model can be obtained using any network, such as Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), etc., and any training method, such as supervised training or unsupervised training. For details, please refer to the process of training a neural network to obtain a segmentation model in the prior art, which will not be elaborated here.

[0130] Optionally, in this embodiment, during the training of the segmentation model, in order to ensure data consistency, the sample image data and the label image data can also be interpolated in steps S201 to S202. The interpolation operations of the sample image data and the label image data need to be performed synchronously.

[0131] Optionally, in this embodiment, during the training of the segmentation model, in order to meet memory requirements, the sample image data and label image data can also be segmented in steps S301 to S302, and the segmentation operation of the sample image data and label image data also needs to be performed synchronously.

[0132] The medical image processing method provided in this embodiment removes mirroring operations from organ images with mutually symmetrical regions during data preprocessing during the training of the segmentation model. This allows the segmentation model to effectively segment organs with mutually symmetrical regions, thereby improving the accuracy of the segmentation model.

[0133] Based on the same inventive concept, please refer to the following: Figure 5 This embodiment also provides a medical image processing device 10, which is applied to... Figure 1 The electronic devices shown, such as Figure 5 As shown, the medical image processing device 10 provided in this embodiment includes an image acquisition module 11 and an image processing module 12.

[0134] The image acquisition module 11 is used to acquire the image segmentation result output by the medical image after it is input into the pre-trained segmentation model; wherein, the image segmentation result includes at least one image segmentation region and the category label of each image segmentation region.

[0135] The image processing module 12 is used to find the connected region corresponding to each category label, and for each category label, the largest connected region corresponding to that category label is used as the target segmentation region for that category label.

[0136] In an optional implementation, the medical image processing device provided in this embodiment further includes a model training module, which is used to acquire sample image data and label image data corresponding to the sample image data.

[0137] Based on the labeled image data, determine whether the sample image data is an organ image with mutually symmetrical regions.

[0138] If not, perform the first enhancement operation on the sample image data and the label image data.

[0139] If so, a second enhancement operation is performed on the sample image data and the label image data; wherein, the first enhancement operation includes a mirroring operation, and the second enhancement operation includes operations other than the mirroring operation.

[0140] The enhanced sample image data and the labeled image data are input into the neural network for training to obtain the segmentation model.

[0141] In an optional implementation, the model training module is specifically used for:

[0142] Read the tag information from the tag image data.

[0143] Determine whether the label information is the preset label information.

[0144] If so, the sample image data corresponding to the labeled image data is determined to be an organ image with mutually symmetrical regions.

[0145] In an optional implementation, the image processing module 12 is further configured to acquire pixel data of the medical image before acquiring the image segmentation result output by the pre-trained segmentation model after the medical image is input, and to perform interpolation processing on each pixel of the medical image to obtain the interpolated medical image.

[0146] The image acquisition module 11 is used to input the interpolated medical image into the pre-trained segmentation model and obtain the image segmentation result output by the segmentation model after processing the interpolated medical image.

[0147] In an optional implementation, the image processing module 12 is specifically used for:

[0148] Each pixel is used as the target pixel, and pixels within a preset range of the target pixel are obtained.

[0149] The pixel values ​​of pixels within a preset range are counted to obtain the number of each pixel value.

[0150] The value of the most numerous pixels is used as the value of the target pixel for interpolation processing of medical images.

[0151] In an optional implementation, the image processing module 12 is further configured to obtain the available memory of the device for processing the medical image before obtaining the image segmentation result output by the pre-trained segmentation model after the medical image is input, and to divide the medical image into blocks according to the available memory of the device to obtain the block-divided medical image.

[0152] The image acquisition module 11 is used to input the segmented medical image into the pre-trained segmentation model and obtain the image segmentation result output by the segmentation model after processing the segmented medical image.

[0153] In an optional implementation, the image processing module 12 is specifically used to find connected regions in the image segmentation region marked by the category label for each category label, based on a set neighborhood.

[0154] The medical image processing apparatus provided in this embodiment, after acquiring the image segmentation result output by the medical image input to the pre-trained segmentation model, finds all connected regions corresponding to each category label in the image segmentation result. For each category label, the largest connected region corresponding to that category label is taken as the target segmentation region for that category label. In this way, the image segmentation region can be effectively filtered, avoiding missegmentation of the image segmentation region and improving the usability of the segmentation result.

[0155] The medical image processing device provided in this embodiment unifies the resolution of the medical image in each dimension by interpolating each pixel of each dimension, thus ensuring the consistency of the data fed into the segmentation model.

[0156] The medical image processing device provided in this embodiment obtains the available memory of the GPU of the current electronic device before inputting the medical image into the segmentation model, and divides the medical image into blocks according to the available memory, thereby avoiding the collapse of the segmentation model and meeting the memory requirements of the electronic device.

[0157] The medical image processing apparatus provided in this embodiment removes mirroring operations from organ images with mutually symmetrical regions during data preprocessing in the process of training the segmentation model. This allows the segmentation model to effectively segment organs with mutually symmetrical regions, thereby improving the accuracy of the segmentation model.

[0158] Since the principle of the device in this embodiment to solve the problem is similar to the medical image processing method described above in this embodiment, the implementation principle of the device can be referred to the implementation principle of the method, and the repeated parts will not be described again.

[0159] Based on the above, this embodiment provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the medical image processing method described in any of the foregoing embodiments.

[0160] Based on the above, this embodiment provides a storage medium including a computer program, which, when executed, controls the electronic device containing the storage medium to perform the medical image processing method described in any of the foregoing embodiments.

[0161] In summary, the medical image processing method, apparatus, electronic device, and storage medium provided in this embodiment of the invention, after obtaining the image segmentation result output by the medical image input to the pre-trained segmentation model, finds all connected regions corresponding to each category label in the image segmentation result, and for each category label, uses the largest connected region corresponding to that category label as the target segmentation region for that category label. In this way, the image segmentation region can be effectively filtered, avoiding missegmentation of the image segmentation region and improving the accuracy of the segmentation result.

[0162] The above descriptions are merely various embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A medical image processing method, characterized in that, The method includes: Acquire sample image data and corresponding label image data, wherein the label image data is obtained by labeling each medical feature region in the sample image data. If the sample image is an organ image with mutually symmetrical regions, then the sample image is labeled with a preset label. Based on the labeled image data, determine whether the sample image data is an organ image with mutually symmetrical regions; If not, perform a first enhancement operation on the sample image data and the label image data; If so, a second enhancement operation is performed on the sample image data and the label image data; wherein the first enhancement operation includes a mirroring operation, and the second enhancement operation does not include the mirroring operation; The enhanced sample image data and the labeled image data are input into the neural network for training to obtain the segmentation model; The step of determining whether the sample image data is an organ image with mutually symmetrical regions based on the labeled image data includes: Read the tag information from the tag image data; Determine whether the label information is preset label information; If so, the sample image data corresponding to the labeled image data is determined to be an organ image with mutually symmetrical regions; The image segmentation result is obtained after a medical image is input into a pre-trained segmentation model; wherein the image segmentation result includes at least one image segmentation region and a category label for each image segmentation region; Find the connected regions corresponding to each of the aforementioned category labels; For each category label, the largest connected region corresponding to that category label is taken as the target segmentation region for that category label.

2. The medical image processing method according to claim 1, characterized in that, Before obtaining the image segmentation result output by the pre-trained segmentation model after inputting the medical image, the method further includes: Obtain the pixel data of the medical image; Interpolation is performed on each pixel of the medical image to obtain the interpolated medical image; The steps for obtaining the image segmentation result output by the pre-trained segmentation model after inputting a medical image include: The interpolated medical image is input into a pre-trained segmentation model; Obtain the image segmentation result output by the segmentation model after processing the interpolated medical image.

3. The medical image processing method according to claim 2, characterized in that, The step of interpolating each pixel of the medical image includes: Each pixel is taken as a target pixel, and pixels within a preset range of the target pixel are obtained; The pixel values ​​of the pixels within the preset range are counted to obtain the number of each pixel value; The value of the most numerous pixel is used as the value of the target pixel to perform interpolation processing on the medical image.

4. The medical image processing method according to claim 1, characterized in that, Before obtaining the image segmentation result output by the pre-trained segmentation model after inputting the medical image, the method further includes: Obtain the available memory of the device processing the medical images; The medical image is divided into blocks according to the available memory of the device to obtain the block-based medical image; The steps for obtaining the image segmentation result output by the pre-trained segmentation model after inputting a medical image include: The segmented medical image is then input into a pre-trained segmentation model; Obtain the image segmentation result output by the segmentation model after processing the segmented medical image.

5. The medical image processing method according to claim 1, characterized in that, The steps for finding the connected regions corresponding to each category label include: For each category label, find connected regions in the image segmentation region marked by that category label, using the defined neighborhood.

6. A medical image processing device, characterized in that, It includes a model training module, an image acquisition module, and an image processing module; The model training module is used to acquire sample image data and corresponding label image data. The label image data is obtained by labeling each medical feature region in the sample image data. If the sample image is an organ image with mutually symmetrical regions, then the sample image is labeled with a preset label. Based on the label image data, it is determined whether the sample image data is an organ image with mutually symmetrical regions. If not, a first enhancement operation is performed on the sample image data and the label image data. If yes, a second enhancement operation is performed on the sample image data and the label image data. The first enhancement operation includes a mirroring operation, while the second enhancement operation does not include the mirroring operation. The enhanced sample image data and label image data are input into a neural network for training to obtain a segmentation model. The step of determining whether the sample image data is an organ image with mutually symmetrical regions based on the label image data includes: reading the label information of the label image data; determining whether the label information is preset label information; if yes, then determining that the sample image data corresponding to the label image data is an organ image with mutually symmetrical regions. The image acquisition module is used to acquire the image segmentation result output by the medical image after it is input into the pre-trained segmentation model; wherein, the image segmentation result includes at least one image segmentation region and the category label of each image segmentation region; The image processing module is used to find the connected regions corresponding to each category label, and for each category label, the largest connected region corresponding to that category label is used as the target segmentation region for that category label.

7. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the medical image processing method according to any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium includes a computer program, which, when executed, controls the electronic device containing the storage medium to perform the medical image processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Thoracic organ segmentation method based on deep learning

    CN110992373A