A method for detecting a target region in medical images

By extracting and processing the area of ​​the organ to be detected in medical image data, removing the noise area, and training the target area detection model, the problem of low detection accuracy and reliability in the prior art is solved, and higher detection accuracy and reliability are achieved.

CN114331963BActive Publication Date: 2025-06-27TIANHE SUPERCOMPUTING HUAIHAI SUB CENT +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111432876.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-06-27
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

The prior art is difficult to accurately remove noise areas when detecting target areas in medical imaging data, resulting in low detection accuracy and reliability.

Method used

By extracting the image information of the organ area to be detected in the original image of the medical image sample, performing binarization processing and grayscale average calculation, dividing it into sub-regions, labeling candidate noise areas, and generating sample input images by removing the target noise areas, and training the target area detection model.

Benefits of technology

The accuracy and reliability of the target area detection model are improved, and the accuracy and reliability of the target area detection of medical imaging are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114331963B_ABST
    Figure CN114331963B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for detecting a target region of a medical image, comprising the steps of: S1, training to generate a target region detection model; and S2, obtaining a medical image to be detected, and generating a target region detection result of the medical image to be detected based on the target region detection model. By precisely removing the noise regions in the original image of the medical image sample, the target region detection model of the present invention can better learn the features of the target region, improving the accuracy and reliability of the target region detection model, and thus improving the accuracy and reliability of the detection of the target region of the medical image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a method for detecting target regions in medical images. Background Art

[0002] With the rapid development of artificial intelligence, it has been quickly applied to multiple fields. Using artificial intelligence technology to assist in detecting medical image data and predicting target regions such as nodules in medical image data provides assistance for screening early cancers. In the medical field, medical image data information accounts for 90% of the entire medical data information and shows an increasing trend. Medical image data includes many medical images such as X-ray chest films, lung CTs, abdominal CTs, and brain MRI images. The amount and information volume of medical image data are huge.

[0003] In the prior art, target region detection is usually performed by directly annotating target regions to train a detection model. However, due to the complex information contained in medical image data. For example, in the scenario of predicting lung nodules, the lung image also includes complex tracheal data, vascular data, and other information. If accurate removal is not performed, the accuracy of the trained detection cannot be guaranteed, which is prone to misjudgment, resulting in low detection accuracy and poor reliability. Therefore, how to provide an accurate and reliable method for detecting target regions in medical images has become an urgent technical problem to be solved. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for detecting target regions in medical images, which improves the accuracy and reliability of target region detection in medical images.

[0005] According to the first aspect of the present invention, there is provided a method for detecting target regions in medical images, including:

[0006] Step S1, training and generating a target region detection model;

[0007] Step S2, obtaining a medical image to be detected, and generating a target region detection result of the medical image to be detected based on the target region detection model;

[0008] Wherein, the step S1 specifically includes:

[0009] Step S11, obtaining a set of original image information of medical image samples {A1, A2,... A N} and corresponding sample label information {B1, B2,... B N}, where A n is the nth sample image information, and B n is the label information corresponding to the nth sample original image information. Among them, in B n , the target region part of A n is marked as 1, and the target region part of An The non-target regions are labeled as 0, where n ranges from 1 to N, and N is the total number of sample images;

[0010] Step S12: Extract the image information C of the organ region to be detected from A n and perform binarization on C to generate D n , and obtain the grayscale average value T n of D n and the central point coordinates R n ; n n

[0011] Step S13: Divide D n into M sub-region information {D n1 , D n2 , … D nM}, where D nm is the nth sub-region of D n , and m ranges from 1 to M;

[0012] Step S14: Based on the grayscale average value T n , the central point coordinates R n and a preset distance threshold S, label the candidate noise regions of each D nm ;

[0013] Step S15: Based on the candidate noise regions of all D nm , determine the target noise regions of D n , remove the target noise regions in D n to generate the corresponding sample input image E n ;

[0014] Step S16: Input E n and the corresponding B n into the target region detection model architecture for training to generate the target region detection model.

[0015] According to the second aspect of the present invention, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method according to the first aspect of the present invention.

[0016] According to the third aspect of the present invention, there is provided a computer-readable storage medium, and the computer instructions are used to execute the method according to the first aspect of the present invention.

[0017] The present invention has obvious advantages and beneficial effects compared with the prior art. By means of the above technical solution, a method for detecting a target area of a medical image provided by the present invention can achieve considerable technical progressiveness and practicability, and has wide utilization value in the industry. It has at least the following advantages:

[0018] By precisely removing the noise area in the original image of the medical image sample, the present invention enables the target area detection model to better learn the features of the target area, improves the accuracy and reliability of the target area detection model, and thus improves the accuracy and reliability of the medical image target area detection.

[0019] The above description is only an overview of the technical solution of the present invention. In order to be able to more clearly understand the technical means of the present invention, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the following specifically gives preferred embodiments and, in conjunction with the drawings, details are described as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic diagram of the training process of the target area detection model provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0021] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in conjunction with the drawings and preferred embodiments, details the specific implementation manners and effects of a method for detecting a target area of a medical image according to the present invention as follows.

[0022] The embodiment of the present invention provides a method for detecting a target area of a medical image, including:

[0023] Step S1, training to generate a target area detection model;

[0024] Step S2, obtaining a medical image to be detected, and generating a target area detection result of the medical image to be detected based on the target area detection model.

[0025] Among them, the medical image to be detected can be an X-ray chest film, a lung CT, an abdominal CT, a brain MRI image, etc. It can be understood that for different medical images to be detected, a corresponding sample image can be used for the target area detection model, and the present invention does not make specific limitations on the medical image to be detected. It should be noted that, in order to more clearly illustrate the embodiment of the present invention, the following embodiments are all described by taking a lung CT as an example, and the corresponding target area is a lung nodule.

[0026] As Figure 1 shown, the step S1 specifically includes:

[0027] Step S11. Obtain the set of original image information of medical image samples {A1, A2, … A N} and the corresponding sample label information {B1, B2, … B N}, where A n is the nth sample image information, and B n is the label information corresponding to the nth sample original image information. Among them, in B n , the target area part of A n is marked as 1, and the non-target area of A n is marked as 0. The value range of n is from 1 to N, and N is the total number of sample images;

[0028] Among them, in order to improve the efficiency and accuracy of obtaining sample labels, the corresponding sample label information can be based on the existing pulmonary nodule prediction model, predict the sample images, and then proofread the prediction results based on the proofreading information input by the doctor, and obtain the sample labels based on the final results. The existing pulmonary nodule prediction model can be the Unet network model, and based on the transfer learning algorithm, it is used to assist in marking pulmonary nodules. The Unet network model is an existing model, and the transfer learning algorithm is an existing algorithm, which will not be elaborated here.

[0029] In addition, still taking the target area as pulmonary nodules as an example, data enhancement can be performed according to different nodule types and nodule size of pulmonary nodules as a prerequisite for sample balancing. The enhancement method is any one or more of random scaling, rotation, and flipping. Thus, the data balance in the model training process is ensured. The image blocks after the change can also be formed into a mini-batch. A mini-batch refers to dividing the data to be trained into several parts, shuffling the order of the pictures before segmentation to increase randomness and the diversity of training samples, thereby effectively avoiding the overfitting phenomenon in the training process of the initial lesion segmentation network. Furthermore, the reliability and accuracy of the target area detection model generated by training are ensured.

[0030] Step S12. Extract the image information C n of the organ area to be detected from A n , perform binarization processing on C n to generate D n , and obtain the gray average value T n and the center point coordinate R n of D n ;

[0031] Among them, still taking the organ to be detected as the lung as an example, it can be directly adjusted according to the HU value of the lung, and the lung parenchyma is extracted using the lung window (-1200HU~300HU) to obtain D n . The HU value of the lung is a common parameter value in the medical field. Extracting the lung parenchyma using the lung window is an existing technology, which will not be elaborated here.

[0032] Step S13: Divide D n into M sub-region information {D n1 , D n2 , … D nM}, where D nm is the nth sub-region of D n , and the value range of m is from 1 to M;

[0033] Step S14: Based on the grayscale average value T n , the center point coordinate R n and the preset distance threshold S, label the candidate noise regions of each D nm ;

[0034] Step S15: Based on the candidate noise regions of all D nm , determine the target noise regions of D n , remove the target noise regions in D n to generate the corresponding sample input image E n ;

[0035] Among them, through steps S13 - S15, by dividing D n into M sub-region information, the target noise regions of D n can be determined more accurately and quickly, the target noise regions can be accurately removed, the noise of the sample input can be reduced, thereby improving the accuracy and reliability of the target region detection model.

[0036] Step S16: Input E n and the corresponding B n into the target region detection model architecture for training to generate the target region detection model.

[0037] It should be noted that the sample data needs to be normalized before being input into the target region detection model architecture. The normalization process can be placed before extracting the region of the organ to be detected, or after removing the target noise region, etc., at any stage. However, if it is placed after extracting the region of the organ to be detected or after removing the target noise region, the calculation amount of normalization will increase. Therefore, in order to reduce the calculation amount and improve the efficiency of normalization, as a preferred embodiment, step S12 further includes:

[0038] Step S120: First perform data normalization on A n , and then extract the image information C n of the region of the organ to be detected.

[0039] As an embodiment, step S14 includes:

[0040] Step S141: According to D nmThe distance R between each pixel n From near to far, traverse D in turn nm The gray value of each pixel in the n If a pixel point is a noise point, the pixel point is determined as a noise point and is used as the central pixel point to execute step S142;

[0041] Step S142, respectively obtaining the distances between the four upper, lower, left and right pixels of each central pixel and the corresponding central pixel. If there is a pixel whose distance to the corresponding central pixel is less than or equal to the distance threshold, the corresponding pixel is determined as a noise point and step S143 is executed. If not, step S144 is executed.

[0042] Step S143, taking each determined noise point as a central pixel point, and returning to execute step S142;

[0043] Step S144: Determine the area composed of all noise points as D nm Candidate noise regions in .

[0044] The noise is usually the trachea, blood vessels, air and other noises remaining after the binarization process. For lung CT, the trachea is the main one. The above noise is connected. Therefore, through steps S141 and S142, the candidate noise region in Dnm can be quickly and accurately determined. And according to the growth morphology of the trachea in the lungs, the basic trachea can be extracted by traversing from the middle to the outside, which ensures the basis for the growth of the trachea in the lungs and improves the extraction efficiency of the candidate noise region.

[0045] As an embodiment, the step S15 includes:

[0046] Step S151: D of all the labeled candidate noise areas nm Linking is done according to the positional relationship between the original sub-regions;

[0047] Step S152, selecting any sub-region from the sub-regions that are not currently selected as the central region as the central region, linking all sub-regions around the central region with the central region according to the positional relationship of the original region, constructing a region to be tested, and linking all candidate noise regions in the region to be tested to generate a noise region to be tested;

[0048] Among them, any sub-region can be selected as the central region from the sub-regions that have not been selected as the central region currently. It can be selected arbitrarily, as long as it is ensured that all sub-regions are traversed as the central region in the end. To further improve the traversal efficiency, as an embodiment, in step S152, selecting any sub-region as the central region from the sub-regions that have not been selected as the central region currently includes: selecting the corresponding sub-region as the central region from the sub-regions that have not been selected as the central region currently in the order of spreading outward with the first selected central region as the center. As a preferred embodiment, the first selected central region is the sub-region where R n is located. It can further improve the accuracy and efficiency of generating the region of interest for noise measurement.

[0049] Step S153: Perform edge detection on the region of interest for noise measurement. If there is an edge-closed region, execute step S154; otherwise, execute step S155.

[0050] Among them, the edge detection algorithm can directly adopt the existing algorithm, such as the canny edge detection algorithm, which will not be elaborated here.

[0051] Step 154: Obtain the aspect ratio of the image of the edge-closed region. If it is greater than or equal to the preset ratio threshold, determine the edge-closed region as the target noise region and remove it. If it is less than the preset ratio threshold, retain it, and then execute step S155.

[0052] The ratio threshold is set according to the specific application scenario. For example, in the scenario of removing the trachea of the lungs, the ratio threshold can be set to 1. Meeting the condition indicates compliance with the human morphological structure.

[0053] Step S155: Determine whether all sub-regions have been used as the central region and completed the judgment of steps S152 - S154. If so, execute step S156; otherwise, return to execute step S152.

[0054] Step S156: If the image of the unclosed region meets the aspect ratio greater than or equal to the preset ratio threshold and the area size is greater than the minimum closed area of the region of interest for noise measurement, determine the unclosed region image as the target noise region and remove it. If it does not meet the conditions, retain it, and generate the corresponding sample input image E n .

[0055] Through steps S151 - S156, by adopting the intermediate traversal principle after image segmentation, on the basis of increasing the diversity of candidate noise point selection, and after determining the candidate noise regions for each sub-region respectively, and then through the connection between sub-regions, a secondary verification judgment is provided. Compared with the method of directly traversing the entire image to determine the target noise region, the reliability and accuracy of determining the target noise region are improved.

[0056] As an embodiment, in step S15, it further includes:

[0057] After removing the target noise area in Dn and performing a repair operation on the edge area, a corresponding sample input image En is generated. Still taking a lung CT as an example, the existing adaptive curvature threshold method can be specifically used to repair the lung boundary. After smoothing, the curvature threshold of points can be accurately calculated, and the concave points with larger curvature values are the area points near the lung edge to be repaired. The specific algorithm will not be elaborated here.

[0058] As an embodiment, the target area includes several sub-blocks, B n in which A n each sub-block included in the target area is labeled as 1, and each sub-block in the non-target area of A n is labeled as 0. Step S16 includes:

[0059] Step S161: Input E n and the corresponding B n into the target area detection model architecture, divide E n into P sample sub-blocks for learning, and output the prediction probability of each sample sub-block;

[0060] Step S162: Determine the loss value based on the prediction probability, actual annotation value of each sample sub-block, and a preset loss function;

[0061] Among them, the preset loss function is L:

[0062] L = a * L1 + b * L2,

[0063] Among them, L1 is the Focal loss, L2 is the Dice loss, a is the preset weight of L1, and b is the preset weight of L2. In the embodiment of the present invention, the loss function selected during training is the Exponential Logarithmic loss. In the prior art, during the training process of the target region detection model, most use the Dice loss as the loss function. However, the dice loss is very disadvantageous for predicting small targets. Once there are some pixel prediction errors in small targets, it may cause huge fluctuations in the dice coefficient, resulting in large gradient changes and unstable training. To prevent small target regions from being learned, the embodiment of the present invention adopts the Exponential Logarithmic loss, which is a combination of the Focal loss and the Dice loss, and also combines the Focal loss. This loss function is a dynamically scaled cross-entropy loss. When the confidence of the correct class increases, the scaling factor decays to zero. Thereby improving the reliability and accuracy of the target region detection model. The Focal loss and the Dice loss are both existing loss functions and will not be elaborated here.

[0064] Step S163, adjust the model parameters of the detection model architecture based on the loss value, and repeat the training until the loss value meets the preset model convergence condition to generate the target region detection model.

[0065] As an embodiment, the step S2 includes:

[0066] Step S21, obtain the medical image to be detected, and input the medical image to be detected into the pre-trained target region detection model;

[0067] Step S22, the target region detection model divides the medical image to be detected into P sub-blocks and outputs the prediction probability of each sub-block;

[0068] Step S23, determine the sub-blocks with prediction probabilities greater than the preset probability threshold as candidate sub-blocks, and determine the region with the number of consecutive candidate sub-blocks greater than the preset sub-block number threshold as the target region.

[0069] The embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method of the embodiment of the present invention.

[0070] The embodiment of the present invention also provides a computer-readable storage medium, and the computer instructions are used to execute the method of the embodiment of the present invention.

[0071] In the embodiments of the present invention, by precisely removing the noise regions in the original medical image samples, the target region detection model can better learn the features of the target regions, improving the accuracy and reliability of the target region detection model, and thus enhancing the accuracy and reliability of medical image target region detection.

[0072] It should be noted that in the embodiments of the present invention, some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, and so on.

[0073] The above are only the preferred embodiments of the present invention, and do not impose any formal limitations on the present invention. Although the present invention has been disclosed above with the preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the equivalent embodiments by using the disclosed technical content within the scope of the technical solution of the present invention. However, as long as the content does not depart from the technical solution of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A method for detecting a target region in medical images, characterized in that, Including: Step S1, training to generate a target region detection model; Step S2, obtaining the medical image to be detected, and generating a target region detection result of the medical image to be detected based on the target region detection model; Among them, the specific steps of Step S1 include: Step S11, obtain a set of original image information of medical image samples {A1, A2, … A N} and the corresponding sample label information {B1, B2, … B N}, where A n is the nth sample image information, B n is the label information corresponding to the nth sample original image information, and in B n , the target region part of A n is marked as 1, and the non-target region of A n is marked as 0. The value range of n is from 1 to N, and N is the total number of sample images; Step S12: Extract the image information C of the organ region to be detected from A n , and perform binarization processing on C n to generate D n . Obtain the gray-scale average value T n of D n and the central point coordinate R n ; n ​ Step S13: Divide D n into M sub-region information {D n1 , D n2 , … D nM}, where D nm is the m-th sub-region of D n , and the value range of m is from 1 to M; Step S14: Based on the grayscale average value T n , the center point coordinate R n and the preset distance threshold S, label each D nm 's candidate noise region; Step S14 includes: Step S141: According to the distance R of each pixel point in D nm from near to far, traverse the gray value of each pixel point in D in turn n in sequence. If there is a pixel point whose gray value is less than T nm , then determine this pixel point as a noise point and use it as the central pixel point, and execute Step S142; n ​ Step S142, respectively obtaining the distances between the four pixels above, below, left, and right of each central pixel point and the corresponding central pixel point. If there are pixel points whose distances from the corresponding central pixel point are less than or equal to the distance threshold, the corresponding pixel points are determined as noise points, and Step S143 is executed. If not, Step S144 is executed; Step S143, taking each determined noise point as the central pixel point, and returning to execute Step S142; Step S144: Determine the area composed of all noise points as candidate noise region D nm in Step S15. Based on all candidate noise regions of D nm , determine the target noise region of D n . Remove the target noise region in D n to generate the corresponding sample input image E n ; The steps of Step S15 include: Step S151: Link all Ds that label candidate noise regions nm according to the positional relationship between the original sub-regions; Step S152, selecting any sub-region from the sub-regions that have not been selected as the central region as the central region, linking all the sub-regions around the central region to the central region according to the positional relationship of the original regions to construct a region to be detected, and linking all the candidate noise regions in the region to be detected to generate a noise region to be detected; Step S153, performing edge detection on the noise region to be detected. If there is an edge-closed region, Step S154 is executed. Otherwise, Step S155 is executed; Step 154, obtaining the aspect ratio of the image of the edge-closed region. If it is greater than or equal to the preset ratio threshold, the edge-closed region is determined as the target noise region and removed. If it is less than the preset ratio threshold, it is retained, and then Step S155 is executed; Step S155, determining whether all sub-regions have been used as the central region and completing the judgment of Step S152 - Step S154. If so, Step S156 is executed. Otherwise, return to execute Step S152; Step S156: If the unclosed region image satisfies that the aspect ratio is greater than or equal to a preset ratio threshold and the area size is greater than the minimum closed area of the noise region to be measured, then determine the unclosed region image as the target noise region and remove it; if not, retain it to generate the corresponding sample input image E n ; Step S16: Input E n and the corresponding B n into the target region detection model architecture for training to generate the target region detection model.

2. The method according to claim 1, wherein The steps of Step S12 further include: Step S120, for A n After performing data normalization processing first, then extract the image information C of the organ region to be detected n .

3. The method according to claim 1, wherein In Step S152, selecting any sub-region from the sub-regions that have not been selected as the central region as the central region includes: Selecting the corresponding sub-region from the sub-regions that have not been selected as the central region as the central region in the order of spreading outward with the first selected central region as the center.

4. The method according to claim 3, wherein The first selected central region is R n where the sub-region is located.

5. The method according to claim 1, wherein In the steps of Step S15, it further includes: Remove the target noise region in D n After removing the target noise region in D and performing a repair operation on the edge region, generate the corresponding sample input image E n .

6. The method according to claim 1, wherein The target area includes a number of sub - blocks, B n In it, A n Each sub - block included in the target area of A is labeled as 1, and A n Each sub - block of the non - target area of A is labeled as 0. The step S16 includes: Step S161: Input E n and the corresponding B n into the target area detection model architecture, divide E n into P sample sub-blocks for learning, and output the prediction probability of each sample sub-block; Step S162, determining the loss value based on the prediction probability, actual annotation value of each sample sub-block, and the preset loss function; Step S163, adjusting the model parameters of the detection model architecture based on the loss value, and repeating the training until the loss value meets the preset model convergence condition to generate the target region detection model.

7. The method according to claim 6, wherein The preset loss function is L: L = a * L1 + b * L2, wherein, L1 is the Focal loss, L2 is the Dice loss, a is the preset weight of L1, and b is the preset weight of L2.

8. The method according to claim 1, wherein: The step S2 includes: Step S21, obtaining a medical image to be detected, and inputting the medical image to be detected into a pre-trained target region detection model; Step S22, the target region detection model divides the medical image to be detected into P sub-blocks and outputs the prediction probability of each sub-block; Step S23, determining the sub-blocks with prediction probabilities greater than a preset probability threshold as candidate sub-blocks, and determining the regions with the number of consecutive candidate sub-blocks greater than a preset sub-block number threshold as target regions.

Citation Information

Patent Citations

  • Method for automatically identifying pavement diseases

    CN104021574A

  • Detection method based on medical image and model training method and device

    CN109949271A