A method and system for identifying brain tumors in brain magnetic resonance images
By calculating the similarity of adjacent sections and adjusting the number of MRI sections, the processed 3D image is formed, and the problem of low brain tumor recognition efficiency in brain MRI images in the prior art is solved, achieving a more efficient and accurate recognition effect.
Patent Information
- Application Number
- CN202310775752.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2043-06-28
AI Technical Summary
In the prior art, in the process of brain tumor recognition in brain MRI images, 2D recognition methods cannot utilize spatial information, while 3D recognition methods are computationally large, resulting in low recognition efficiency.
By calculating the similarity between two adjacent slices, combining the number of slices in the minimum cerebral tumor area in the training sample and the layer thickness and layer spacing of MRI, the number of slices in the MRI file is reduced, and the processed 3D image is formed as the input of 3D U-Net for identification.
The calculation amount is reduced, the spatial information of MRI is retained, and the efficiency and accuracy of brain tumor recognition are improved.
Smart Images

Figure CN116777883B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition, and in particular to a method and system for identifying brain tumors in brain magnetic resonance images. Background Art
[0002] The brain is the control center of the human body, supporting people's thinking and actions, and is the source of human wisdom. At the same time, the brain is also a highly sophisticated organ. Any brain disease will seriously affect people's normal life. Brain tumors are diseases caused by abnormal generation of intracranial cells. They have become one of the diseases that seriously endanger human health. In clinical practice, non-invasive technologies such as MRI (Magnetic Resonance Imaging) are usually used to obtain brain images. Doctors then determine the location of the lesion and determine the treatment plan based on the characteristics of the lesion, such as surgical treatment, chemotherapy, radiotherapy, etc., to improve the patient's chance of survival and survival time.
[0003] The identification of brain tumors mainly relies on the judgment of doctors, which is closely related to the experience of doctors. In addition, due to the influence of human vision, it is more difficult to identify small brain tumors. The automatic segmentation method of brain MRI is attracting more and more attention. The segmentation effect of deep learning-based segmentation technology is better than that of traditional segmentation methods. However, brain MRI is a three-dimensional image. If a 2D segmentation method is used, some important information will inevitably be lost. However, if a 3D segmentation method is used, the amount of data is too large, and both training and recognition are very slow, and errors of exceeding GPU memory are often reported. Summary of the invention
[0004] In order to solve the above problems, in a first aspect, the present invention provides a method for identifying brain tumors in brain magnetic resonance images, the method comprising the following steps:
[0005] Obtain a training sample set, and calculate the MRI where the smallest brain tumor area marked in all training samples is located, and obtain the slice thickness ST′ of the MRI, the slice spacing SG′ of the MRI, and the number of slices SN′ of the smallest brain tumor in the MRI; calculate the distance L according to the slice thickness ST′, the slice spacing SG′ and the number of slices SN′;
[0006] Parse the brain MRI file to be identified to obtain a slice sequence, and obtain the slice thickness ST, slice spacing SG and slice number SN of the brain MRI to be identified, and obtain the depth D of the 3D image required for input of the constructed 3D U-Net;
[0007] Calculate the similarity of two adjacent slices to obtain a similarity sequence corresponding to the slice sequence; obtain the MRI file to be identified after processing consisting of D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG;
[0008] The processed MRI file to be identified is used as the input of the trained 3D U-Net to obtain the recognition result.
[0009] Preferably, the MRI file to be identified after the processing of obtaining D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG is specifically:
[0010] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0011] The slice sequence is split into D subsequences from front to back. The slices in the subsequence are continuous. If each subsequence satisfies the following conditions at the same time, the splitting method is recorded:
[0012] ①The subsequence includes at least one slice,
[0013] ②The number of slices in the subsequence is less than SN″,
[0014] ③The average value of the sum of the similarity subsequences corresponding to the subsequences is less than the threshold;
[0015] The segmentation method to be used is determined from the recorded segmentation methods, the segmentation method to be used is used to segment the slice sequence to obtain multiple subsequences, the slice corresponding to each of the subsequences is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0016] Preferably, the determining of the segmentation method to be used from the recorded segmentation methods is specifically:
[0017] For each recorded segmentation method, the similarity of the corresponding segmented subsequences is calculated, and then the standard deviation of the similarities of all subsequences corresponding to the segmentation method is calculated, and the segmentation method with the smallest standard deviation is used as the segmentation method to be used.
[0018] Preferably, the determining of the slice corresponding to each of the subsequences is specifically:
[0019] If the subsequence has only one slice, then the slice contained in the subsequence is used as the slice corresponding to the subsequence;
[0020] If the subsequence has multiple slices, determine whether the number of slices is an odd number. If so, select the slice in the middle of the subsequence as the slice corresponding to the subsequence. If not, calculate the similarity of the two slices in the middle with the previous slice and the next slice respectively, obtain the weights of the two slices, and select the slice with the smallest weight from the two slices in the middle as the slice corresponding to the subsequence.
[0021] Preferably, the MRI file to be identified after the processing of obtaining D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG is specifically:
[0022] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0023] According to the similarity sequence, D-1 slice pairs with the smallest similarity are obtained, and the sequence numbers of the slices in the slice pairs in the slice sequence are obtained. According to the sequence numbers, the cutting points are obtained, and then D subsequences are obtained. It is determined whether the number of slices in the subsequence is less than or equal to the number of slices SN″. If so, the slices in the sequence consisting of the subsequence, the previous subsequence of the subsequence, and the next subsequence of the subsequence are re-divided into three subsequences according to the similarity of the slices;
[0024] When the number of slices in all subsequences is greater than the number of slices, D subsequences are recorded, the slice corresponding to each subsequence is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0025] On the other hand, the present invention also provides a brain tumor recognition system in brain magnetic resonance images, the system comprising the following modules:
[0026] A distance calculation module is used to obtain a training sample set, calculate the MRI where the smallest brain tumor area marked in all training samples is located, and obtain the slice thickness ST′ of the MRI, the slice spacing SG′ of the MRI, and the number of slices SN′ of the smallest brain tumor in the MRI; and calculate the distance L according to the slice thickness ST′, the slice spacing SG′ and the number of slices SN′;
[0027] The parsing module is used to parse the brain MRI file to be identified to obtain a slice sequence, and obtain the slice thickness ST, the inter-slice distance SG and the number of slices SN of the brain MRI to be identified, and obtain the depth D of the 3D image required to be input to the constructed 3D U-Net;
[0028] A dimension reduction module is used to calculate the similarity of two adjacent slices to obtain a similarity sequence corresponding to the slice sequence; and obtain a processed MRI file to be identified consisting of D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG;
[0029] The recognition module is used to use the processed MRI file to be recognized as the input of the trained 3D U-Net to obtain the recognition result.
[0030] Preferably, the MRI file to be identified after the processing of obtaining D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG is specifically:
[0031] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0032] The slice sequence is split into D subsequences from front to back. The slices in the subsequence are continuous. If each subsequence satisfies the following conditions at the same time, the splitting method is recorded:
[0033] ①The subsequence includes at least one slice,
[0034] ②The number of slices in the subsequence is less than SN″,
[0035] ③The average value of the sum of the similarity subsequences corresponding to the subsequences is less than the threshold;
[0036] The segmentation method to be used is determined from the recorded segmentation methods, the segmentation method to be used is used to segment the slice sequence to obtain multiple subsequences, the slice corresponding to each of the subsequences is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0037] Preferably, the determining of the segmentation method to be used from the recorded segmentation methods is specifically:
[0038] For each recorded segmentation method, the similarity of the corresponding segmented subsequences is calculated, and then the standard deviation of the similarities of all subsequences corresponding to the segmentation method is calculated, and the segmentation method with the smallest standard deviation is used as the segmentation method to be used.
[0039] Preferably, the determining of the slice corresponding to each of the subsequences is specifically:
[0040] If the subsequence has only one slice, then the slice contained in the subsequence is used as the slice corresponding to the subsequence;
[0041] If the subsequence has multiple slices, determine whether the number of slices is an odd number. If so, select the slice in the middle of the subsequence as the slice corresponding to the subsequence. If not, calculate the similarity of the two slices in the middle with the previous slice and the next slice respectively, obtain the weights of the two slices, and select the slice with the smallest weight from the two slices in the middle as the slice corresponding to the subsequence.
[0042] Preferably, the MRI file to be identified after the processing of obtaining D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG is specifically:
[0043] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0044] According to the similarity sequence, D-1 slice pairs with the smallest similarity are obtained, and the sequence numbers of the slices in the slice pairs in the slice sequence are obtained. According to the sequence numbers, the cutting points are obtained, and then D subsequences are obtained. It is determined whether the number of slices in the subsequence is less than or equal to the number of slices SN″. If so, the slices in the sequence consisting of the subsequence, the previous subsequence of the subsequence, and the next subsequence of the subsequence are re-divided into three subsequences according to the similarity of the slices;
[0045] When the number of slices in all subsequences is greater than the number of slices, D subsequences are recorded, the slice corresponding to each subsequence is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0046] Finally, the present invention also provides a computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the method as described above is implemented.
[0047] In view of the problems in the prior art of identifying brain tumors in brain magnetic resonance images that 2D identification or segmentation methods cannot utilize spatial information and 3D identification or segmentation methods have a large amount of calculation, the present invention processes brain nuclear magnetic resonance MRI files. Specifically, the brain nuclear magnetic resonance MRI files to be identified are processed according to the similarity between two adjacent slices and the number of slices occupied by the smallest brain tumor in the training sample, thereby reducing the number of slices in the MRI file, reducing the amount of calculation, and retaining the spatial information of the MRI, resulting in a better recognition effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 is a flow chart of the first embodiment;
[0050] Figure 2 This is a schematic diagram of the inter-slice spacing and slice thickness in MRI;
[0051] Figure 3 It is the slice sequence-similarity sequence correspondence diagram;
[0052] Figure 4 This is a structural diagram of embodiment 2. DETAILED DESCRIPTION
[0053] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] The existing screenshot method is that doctors manually capture images at key locations such as the pharynx and larynx during the examination. Based on this, the present invention provides a method and system that can automatically capture images of key locations during electronic nasopharyngeal endoscopy examination.
[0056] First embodiment
[0057] In a first aspect, the present invention provides a method for identifying brain tumors in brain magnetic resonance images, such as Figure 1 As shown, the method comprises the following steps:
[0058] Step 1, obtain a training sample set, and calculate the MRI where the smallest brain tumor area marked in all training samples is located, and obtain the slice thickness ST′ of the MRI, the slice spacing SG′ of the MRI, and the number of slices SN′ of the smallest brain tumor in the MRI; calculate the distance L according to the slice thickness ST′, the slice spacing SG′ and the number of slices SN′;
[0059] After marking the training sample set, you can view the marked location and other information. Since different training samples have different slice thicknesses and gaps, the schematic diagram of slice thickness and gap is as follows: Figure 2 As shown, the spatial distances of the same number of slices are not the same. If the slices extracted from the brain MRI to be identified are too sparse, it may cause the small tumor area to be unrecognizable. The present invention first finds the smallest brain tumor area in the sample training set, and the smallest brain tumor area is the brain tumor area with the shortest distance in the vertical direction of the slice from the marked brain tumor area. The smallest brain tumor area can be obtained based on the marked brain tumor area in the sample, and the distance of the brain tumor area in the vertical slice direction is L. In a specific embodiment, L is specifically calculated as SN′*ST′+(SN′-1)*SG′.
[0060] Step 2, parse the brain MRI file to be identified to obtain a slice sequence, and obtain the slice thickness ST, slice spacing SG and slice number SN of the brain MRI to be identified, and obtain the depth D of the 3D image required to be input to the constructed 3D U-Net;
[0061] MRI consists of many slices, each slice is a picture. MRI is actually a 3D image with three dimensions: length, width, and depth, where the depth is the number of slices. Parsing the MRI file can obtain relevant information such as the MRI layer thickness, inter-layer spacing, and number of slices, and can also obtain the slice sequence included in the MRI file. Since the input requirements of 3D U-Net are the same, the processing and segmentation can be unified. Here we mainly obtain the length, width, and depth of the 3D image required by the constructed 3D U-Net.
[0062] In the present invention, it is not required that the layer thickness, layer spacing and number of slices of the brain magnetic resonance imaging (MRI) to be identified are the same, that is, the MRI to be identified can come from different devices and be obtained by scanning the human brain using different parameters. In addition, it is not required that the layer thickness, layer spacing and number of slices of the training sample MRI are the same, because the same steps 2, 3 and 4 will be performed on the training samples, but the training samples are only for training the 3D U-Net. In addition, it is not required that the length, width and depth of the training samples are the same, nor is it required that the length, width and depth of the MRI to be identified be the same, because the 3D image will be shaped or reshaped according to the input requirements of the built 3D U-Net.
[0063] Step 3, calculating the similarity between two adjacent slices to obtain a similarity sequence corresponding to the slice sequence; obtaining a processed MRI file to be identified consisting of D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG;
[0064] In order to reduce the data to be processed by 3D U-Net, it is necessary to compress MRI in the depth direction as much as possible. During the compression process, two or more adjacent slices with high similarity can be merged into one, or one of the slices can be selected. However, for the accuracy of recognition, too many continuous slices cannot be merged, which easily leads to failure of brain tumor segmentation. The present invention obtains D slices from the slice sequence according to the similarity sequence, distance L, slice thickness ST and slice spacing SG to form the processed MRI file to be recognized.
[0065] The similarity sequence corresponds to the slice sequence, and the elements in the similarity sequence are the similarity values between the slice with the corresponding serial number in the slice sequence and the next slice. Figure 3 The corresponding relationship between the slice sequence and the similarity sequence is shown. According to the sequence number of the element in the similarity sequence, two adjacent slices for calculating the similarity in the corresponding slice sequence can be found.
[0066] Step 4: Use the processed MRI file to be identified as the input of the trained 3D U-Net to obtain the identification result.
[0067] After the MRI file to be identified has gone through steps 2 and 3, the number of slices contained in it has been greatly reduced, which not only improves the recognition speed but also utilizes the spatial information of MRI, making the recognition result more accurate.
[0068] In a specific embodiment, the MRI file to be identified after the processing of D slices is obtained from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG, specifically:
[0069] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0070] The slice thickness, slice spacing and number of slices of the brain magnetic resonance imaging (MRI) to be identified are different from those of the training samples. In order to ensure that the processed MRI to be identified contains brain tumor information, that is, to avoid missing possible tumors, the range of slice merging cannot be too wide. It is necessary to ensure that the distance between the merged slices is not greater than L. The number of slices SN″ included in the distance L can be calculated based on the slice thickness ST and the slice spacing SG. Specifically, SN″=(L+SG) / (ST+SG).
[0071] Split the slice sequence into D subsequences from front to back. The slices in the subsequence are continuous, and the next slice of the last slice of the previous subsequence is the first slice of the next subsequence. If each subsequence satisfies the following conditions at the same time, record the splitting method:
[0072] ①The subsequence includes at least one slice,
[0073] ②The number of slices in the subsequence is less than SN″,
[0074] ③The average value of the sum of the similarity subsequences corresponding to the subsequences is less than the threshold;
[0075] The segmentation method to be used is determined from the recorded segmentation methods, the segmentation method to be used is used to segment the slice sequence to obtain multiple subsequences, the slice corresponding to each of the subsequences is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0076] For example, if the slice sequence includes 20 slices and D=4, then one segmentation method is (1,2,3,4), (5,6), (7,8,9,10,11,12), (13,14,15,16,17,18,19,20). Assume that SN″=3. Since the number of slices contained in the second subsequence in this segmentation method is less than SN″, the requirement is not met. After conditions ①② are met, the amount of calculation can be reduced when judging whether ③ is met. The calculation of condition ③ can be assisted by the similarity sequence, which further reduces repeated calculations.
[0077] There are many ways of segmentation. Based on the principle of segmenting slices with high similarity into one subsequence as much as possible, in a specific embodiment, the segmentation method to be used is determined from the recorded segmentation methods, specifically:
[0078] For each recorded segmentation method, the similarity of the corresponding segmented subsequences is calculated, and then the standard deviation of the similarities of all subsequences corresponding to the segmentation method is calculated, and the segmentation method with the smallest standard deviation is used as the segmentation method to be used.
[0079] There are many ways to calculate the similarity of subsequences. In a more specific embodiment, a similarity subsequence corresponding to the subsequence is obtained, the average value of the similarity subsequence is calculated, and the average value is used as the similarity of the subsequence. However, it should be noted that both the similarity sequence and the similarity subsequence will be one less than the number of elements in the corresponding slice sequence. For example, if a slice subsequence has 10 elements, then the similarity subsequence corresponding to the subsequence has 9 elements. This is because the last slice of the slice subsequence is not calculated to have a similarity with the next slice that does not belong to the slice subsequence. There are many ways to calculate the similarity of images, which will not be repeated here.
[0080] After the segmentation mode is obtained, multiple slice subsequences are obtained. It is necessary to further determine the slice corresponding to each slice subsequence. In a specific embodiment, the slice corresponding to each subsequence is determined as follows:
[0081] If the subsequence has only one slice, then the slice contained in the subsequence is used as the slice corresponding to the subsequence;
[0082] If the subsequence has multiple slices, determine whether the number of slices is an odd number. If so, select the slice in the middle of the subsequence as the slice corresponding to the subsequence. If not, calculate the similarity of the two slices in the middle with the previous slice and the next slice respectively, obtain the weights of the two slices, and select the slice with the smallest weight from the two slices in the middle as the slice corresponding to the subsequence.
[0083] In another specific embodiment, the determining of the slice corresponding to each of the subsequences is specifically: obtaining the feature map as the slice corresponding to the subsequence by convolution or downsampling. The convolution kernel is related to the number of slices contained in the subsequence, and downsampling preferentially uses the maximum pooling in the depth direction, and the maximum pooling in the depth direction refers to obtaining the maximum pixel point in the depth direction as the value of the pixel point corresponding to the feature map.
[0084] In another embodiment, the MRI file to be identified after the processing of D slices is obtained from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG, is specifically:
[0085] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0086] According to the similarity sequence, D-1 slice pairs with the smallest similarity are obtained, and the sequence numbers of the slices in the slice pairs in the slice sequence are obtained. According to the sequence numbers, the cutting points are obtained, and then D subsequences are obtained. It is determined whether the number of slices in the subsequence is less than or equal to the number of slices SN″. If so, the slices in the sequence consisting of the subsequence, the previous subsequence of the subsequence, and the next subsequence of the subsequence are re-divided into three subsequences according to the similarity of the slices;
[0087] When the number of slices in all subsequences is greater than the number of slices, D subsequences are recorded, the slice corresponding to each subsequence is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0088] Second embodiment
[0089] The present invention also provides a brain tumor recognition system in brain magnetic resonance images, the system comprising the following modules:
[0090] A distance calculation module is used to obtain a training sample set, calculate the MRI where the smallest brain tumor area marked in all training samples is located, and obtain the slice thickness ST′ of the MRI, the slice spacing SG′ of the MRI, and the number of slices SN′ of the smallest brain tumor in the MRI; and calculate the distance L according to the slice thickness ST′, the slice spacing SG′ and the number of slices SN′;
[0091] The parsing module is used to parse the brain MRI file to be identified to obtain a slice sequence, and obtain the slice thickness ST, the inter-slice distance SG and the number of slices SN of the brain MRI to be identified, and obtain the depth D of the 3D image required to be input to the constructed 3D U-Net;
[0092] A dimension reduction module is used to calculate the similarity of two adjacent slices to obtain a similarity sequence corresponding to the slice sequence; and obtain a processed MRI file to be identified consisting of D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG;
[0093] The recognition module is used to use the processed MRI file to be recognized as the input of the trained 3D U-Net to obtain the recognition result.
[0094] Preferably, the MRI file to be identified after the processing of obtaining D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG is specifically:
[0095] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0096] The slice sequence is split into D subsequences from front to back. The slices in the subsequence are continuous. If each subsequence satisfies the following conditions at the same time, the splitting method is recorded:
[0097] ①The subsequence includes at least one slice,
[0098] ②The number of slices in the subsequence is less than SN″,
[0099] ③The average value of the sum of the similarity subsequences corresponding to the subsequences is less than the threshold;
[0100] The segmentation method to be used is determined from the recorded segmentation methods, the segmentation method to be used is used to segment the slice sequence to obtain multiple subsequences, the slice corresponding to each of the subsequences is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0101] Preferably, the determining of the segmentation method to be used from the recorded segmentation methods is specifically:
[0102] For each recorded segmentation method, the similarity of the corresponding segmented subsequences is calculated, and then the standard deviation of the similarities of all subsequences corresponding to the segmentation method is calculated, and the segmentation method with the smallest standard deviation is used as the segmentation method to be used.
[0103] Preferably, the determining of the slice corresponding to each of the subsequences is specifically:
[0104] If the subsequence has only one slice, then the slice contained in the subsequence is used as the slice corresponding to the subsequence;
[0105] If the subsequence has multiple slices, determine whether the number of slices is an odd number. If so, select the slice in the middle of the subsequence as the slice corresponding to the subsequence. If not, calculate the similarity of the two slices in the middle with the previous slice and the next slice respectively, obtain the weights of the two slices, and select the slice with the smallest weight from the two slices in the middle as the slice corresponding to the subsequence.
[0106] Preferably, the MRI file to be identified after the processing of obtaining D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG is specifically:
[0107] Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG;
[0108] According to the similarity sequence, D-1 slice pairs with the smallest similarity are obtained, and the sequence numbers of the slices in the slice pairs in the slice sequence are obtained. According to the sequence numbers, the cutting points are obtained, and then D subsequences are obtained. It is determined whether the number of slices in the subsequence is less than or equal to the number of slices SN″. If so, the slices in the sequence consisting of the subsequence, the previous subsequence of the subsequence, and the next subsequence of the subsequence are re-divided into three subsequences according to the similarity of the slices;
[0109] When the number of slices in all subsequences is greater than the number of slices, D subsequences are recorded, the slice corresponding to each subsequence is determined, and the slices corresponding to each subsequence are arranged in order to obtain the MRI file to be identified.
[0110] Third embodiment
[0111] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first embodiment of the present invention is implemented.
[0112] Fourth embodiment
[0113] The present invention provides a computer device, which includes at least a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the method described in the first embodiment of the present invention is implemented.
[0114] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying brain tumors in brain magnetic resonance images, characterized in that: The method comprises the following steps: Obtain a training sample set, and calculate the MRI where the smallest brain tumor area marked in all training samples is located, and obtain the slice thickness ST' of the MRI, the slice spacing SG' of the MRI, and the number of slices SN' of the smallest brain tumor in the MRI; calculate the distance L according to the slice thickness ST', the slice spacing SG' and the number of slices SN'; Parse the brain MRI file to be identified to obtain a slice sequence, and obtain the slice thickness ST, slice spacing SG and slice number SN of the brain MRI to be identified, and obtain the depth D of the 3D image required for input of the constructed 3D U-Net; Calculate the similarity of two adjacent slices to obtain a similarity sequence corresponding to the slice sequence; obtain the MRI file to be identified after processing consisting of D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG; The processed MRI file to be identified is used as the input of the trained 3D U-Net to obtain the identification result; The MRI file to be identified after the processing of D slices is obtained from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG, specifically: Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG; The slice sequence is split into D subsequences from front to back. The slices in the subsequence are continuous. If each subsequence satisfies the following conditions at the same time, the splitting method is recorded: ①The subsequence includes at least one slice, ②The number of slices in the subsequence is less than SN″, ③The average value of the sum of the similarity subsequences corresponding to the subsequences is less than the threshold; A segmentation method to be used is determined from the recorded segmentation methods, the segmentation method to be used is used to segment the slice sequence to obtain multiple subsequences, the slice corresponding to each subsequence is determined, and the slices corresponding to each subsequence are arranged in order to obtain an MRI file to be identified; wherein determining the slice corresponding to each subsequence includes selecting a slice located in the middle of the subsequence as the slice corresponding to the subsequence.
2. The method according to claim 1, characterized in that The segmentation method to be used is determined from the recorded segmentation methods, specifically: For each recorded segmentation method, the similarity of the corresponding segmented subsequences is calculated, and then the standard deviation of the similarities of all subsequences corresponding to the segmentation method is calculated, and the segmentation method with the smallest standard deviation is used as the segmentation method to be used.
3. The method according to claim 1, characterized in that The determining of the slice corresponding to each of the subsequences is specifically as follows: If the subsequence has only one slice, then the slice contained in the subsequence is used as the slice corresponding to the subsequence; If the subsequence has multiple slices, determine whether the number of slices is an odd number. If so, select the slice in the middle of the subsequence as the slice corresponding to the subsequence. If not, calculate the similarity of the two slices in the middle with the previous slice and the next slice respectively, obtain the weights of the two slices, and select the slice with the smallest weight from the two slices in the middle as the slice corresponding to the subsequence.
4. A brain tumor recognition system in brain magnetic resonance images, characterized in that: The system includes the following modules: A distance calculation module is used to obtain a training sample set, calculate the MRI where the smallest brain tumor area marked in all training samples is located, and obtain the slice thickness ST' of the MRI, the slice spacing SG' of the MRI, and the number of slices SN' of the smallest brain tumor in the MRI; and calculate the distance L according to the slice thickness ST', the slice spacing SG' and the number of slices SN'; The parsing module is used to parse the brain MRI file to be identified to obtain a slice sequence, and obtain the slice thickness ST, the inter-slice distance SG and the number of slices SN of the brain MRI to be identified, and obtain the depth D of the 3D image required to be input to the constructed 3D U-Net; A dimension reduction module is used to calculate the similarity of two adjacent slices to obtain a similarity sequence corresponding to the slice sequence; and obtain a processed MRI file to be identified consisting of D slices from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG; The recognition module is used to use the processed MRI file to be recognized as the input of the trained 3D U-Net to obtain the recognition result; The MRI file to be identified after the processing of D slices is obtained from the slice sequence according to the similarity sequence, the distance L, the slice thickness ST and the slice spacing SG, specifically: Calculate the number of slices SN″ included in the distance L according to the slice thickness ST and the slice spacing SG; The slice sequence is split into D subsequences from front to back. The slices in the subsequence are continuous. If each subsequence satisfies the following conditions at the same time, the splitting method is recorded: ①The subsequence includes at least one slice, ②The number of slices in the subsequence is less than SN″, ③The average value of the sum of the similarity subsequences corresponding to the subsequences is less than the threshold; A segmentation method to be used is determined from the recorded segmentation methods, the segmentation method to be used is used to segment the slice sequence to obtain multiple subsequences, the slice corresponding to each subsequence is determined, and the slices corresponding to each subsequence are arranged in order to obtain an MRI file to be identified; wherein determining the slice corresponding to each subsequence includes selecting a slice located in the middle of the subsequence as the slice corresponding to the subsequence.
5. The system according to claim 4, characterized in that The segmentation method to be used is determined from the recorded segmentation methods, specifically: For each recorded segmentation method, the similarity of the corresponding segmented subsequences is calculated, and then the standard deviation of the similarities of all subsequences corresponding to the segmentation method is calculated, and the segmentation method with the smallest standard deviation is used as the segmentation method to be used.
6. The system according to claim 4, characterized in that The determining of the slice corresponding to each of the subsequences is specifically as follows: If the subsequence has only one slice, then the slice contained in the subsequence is used as the slice corresponding to the subsequence; If the subsequence has multiple slices, determine whether the number of slices is an odd number. If so, select the slice in the middle of the subsequence as the slice corresponding to the subsequence. If not, calculate the similarity of the two slices in the middle with the previous slice and the next slice respectively, obtain the weights of the two slices, and select the slice with the smallest weight from the two slices in the middle as the slice corresponding to the subsequence.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Brain glioma key frame intelligent grabbing system based on VGG twinning network
CN112734737A
Three dimensional localization of a moving target for adaptive radiation therapy
US20160217595A1