Prostate image segmentation method, device and equipment based on data enhancement
By enhancing data on prostate images and training segmentation models, the problem of prostate image segmentation relies on doctors' experience in the prior art, and efficient and accurate automated segmentation is achieved.
Patent Information
- Application Number
- CN202111272188.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The existing prostate image segmentation methods rely on doctors to do it manually, resulting in the quality of image segmentation dependent on doctors' experience, time-consuming and subjective.
Using a data augmentation method, data augmentation is performed on the original image in the training sample, training samples are generated, and then a prostate image segmentation model is generated by training a preset network, which is used to segment the test samples.
It improves the efficiency and accuracy of prostate image segmentation, reduces the dependence on doctors' experience, and realizes automated segmentation.
Smart Images

Figure CN113989243B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a prostate image segmentation method, device and computer equipment based on data enhancement. Background Art
[0002] Prostate diseases are common in older men. In particular, prostate cancer has become the second largest cancer threat to men's health. In the United States, about 1 in 6 men will get prostate cancer and 1 in 36 men will die from the disease. Among many examination methods, MRI (Magnetic Resonance Imaging) has become the most effective means of prostate cancer examination.
[0003] Accurate segmentation of prostate images from magnetic resonance (MR) images is an important step in treatment planning and is crucial for the diagnosis of prostate cancer. Currently, prostate image segmentation is done manually by doctors, and the quality of the segmented images mainly depends on the doctors' experience. Manual segmentation of images is time-consuming and subjective. Therefore, a fast segmentation method for prostate images is urgently needed in clinical practice. Summary of the invention
[0004] The main purpose of this application is to provide a prostate image segmentation method, device and computer equipment based on data enhancement, aiming to solve the technical problems that the existing prostate image segmentation is done manually by doctors, the quality of the segmented image mainly depends on the doctor's experience, and the manual segmentation of images is time-consuming and subjective.
[0005] In a first aspect, the present application provides a prostate image segmentation method based on data enhancement, the method comprising the following steps:
[0006] Performing data enhancement on a portion of original images in the training samples to generate training samples, wherein the original images include labeled prostate MR images;
[0007] Training a preset network according to the training samples to generate a prostate image segmentation model;
[0008] The test sample is tested according to the prostate image segmentation model to obtain the segmentation result of each prostate test image in the test sample, wherein the segmentation result includes the prostate image.
[0009] Preferably, performing data enhancement on a portion of the original images in the training samples to generate the training samples includes:
[0010] Splitting the training sample according to a preset ratio to generate a first training sample and a second training sample, wherein the number of labeled prostate MR images in the second training sample is greater than the number of labeled prostate MR images in the first training sample;
[0011] The labeled prostate MR image in the first to-be-trained sample is translated, scaled and rotated according to a preset affine transformation function to generate a training sample, wherein the training sample includes the first training sample after data enhancement and the second to-be-trained sample.
[0012] Preferably, the translation includes horizontal movement and vertical movement, and the distances of the horizontal movement and the vertical movement are selected from a first preset range; the scale of the zoom is selected from a second preset range; and the angle of the rotation is selected from a third preset range.
[0013] Preferably, after translating, scaling and rotating the labeled prostate MR image in the first training sample according to the preset affine transformation function, the method further includes:
[0014] Acquiring the area of each labeled prostate MR image after data enhancement and acquiring the area of each labeled prostate MR image before data enhancement;
[0015] Determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement;
[0016] If it is determined that the preset condition is met, generating a first training sample from each labeled prostate MR image after data enhancement that meets the preset condition;
[0017] If it is determined that the preset condition is not met, data enhancement is performed again on each labeled prostate MR image before or after data enhancement that does not meet the preset condition.
[0018] Preferably, determining whether a preset condition is met according to the area of each training data after data enhancement and the area of each training data before data enhancement includes:
[0019] Based on a preset formula, the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement, the area ratio of each labeled prostate MR image is obtained;
[0020] comparing the area ratio with a preset threshold;
[0021] If the area ratio is greater than a preset threshold, it is determined that the preset condition is not met;
[0022] If the area ratio is less than or equal to a preset threshold, it is determined that the preset condition is met.
[0023] Preferably, the preset condition includes a preset threshold, and the preset threshold is a value within a third preset range.
[0024] Preferably, the training of a preset network according to the training samples to generate a prostate image segmentation model includes:
[0025] By sequentially training a preset network with the images in the training samples, determining whether the trained preset network is in a converged state;
[0026] If it is determined that the trained preset network is in a convergence state, generating a prostate image segmentation model based on the trained preset network;
[0027] If it is determined that the trained preset network is not in a convergence state, the preset network continues to be trained until the trained preset network is in a convergence state, thereby generating a prostate image segmentation model.
[0028] Preferably, testing the test sample according to the prostate image segmentation model to obtain the segmentation result of each test data in the test sample includes:
[0029] Inputting a prostate test image in a test sample into the prostate image segmentation model;
[0030] Each of the test data is segmented based on the prostate image segmentation model to obtain a segmentation result of each of the prostate test images.
[0031] In a second aspect, the present application further provides a prostate image segmentation device based on data enhancement, the device comprising:
[0032] A first generating module is used to perform data enhancement on a portion of original images in the training samples to generate training samples, wherein the original images include labeled prostate MR images;
[0033] A second generation module is used to train a preset network according to the training samples to generate a prostate image segmentation model;
[0034] The acquisition module is used to test the test sample according to the prostate image segmentation model, and obtain the segmentation results of each prostate test image in the test sample, wherein the segmentation results include the prostate image.
[0035] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the prostate image segmentation method based on data enhancement as described above are implemented.
[0036] The present application provides a prostate image segmentation method, apparatus and computer equipment based on data enhancement, which generates training samples by performing data enhancement on part of the original images in the training samples, wherein the original images include labeled prostate MR images; trains a preset network according to the training samples to generate a prostate image segmentation model; tests the test samples according to the prostate image segmentation model to obtain segmentation results of each prostate test image in the test samples, wherein the segmentation results include prostate bodies, and achieves segmentation of the prostate bodies in the prostate images through the model, which not only improves the efficiency of segmentation, but also improves the accuracy of segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 A schematic diagram of a flow chart of a prostate image segmentation method based on data enhancement provided in an embodiment of the present application;
[0039] Figure 2 A performance response line graph of a threshold value threshod provided in an embodiment of the present application;
[0040] Figure 3 A schematic block diagram of a prostate image segmentation device based on data enhancement provided in an embodiment of the present application;
[0041] Figure 4 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application.
[0042] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0045] The embodiment of the present application provides a prostate image segmentation method, device and computer device based on data enhancement. The prostate image segmentation method based on data enhancement can be applied to a computer device, which can be an electronic device such as a laptop computer or a desktop computer.
[0046] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0047] Please refer to Figure 1 , Figure 1 A flowchart of a prostate image segmentation method based on data enhancement is provided in an embodiment of the present application.
[0048] like Figure 1 As shown, the method includes steps S101 to S103.
[0049] Step S101 : performing data enhancement on a portion of original images in training samples to generate training samples, wherein the original images include labeled prostate MR images.
[0050] Exemplarily, the samples to be trained include original images, which are labeled prostate MR images. For example, 200 prostate images are divided into training samples and test data in a certain ratio in advance. Data enhancement is performed on some labeled prostate MR images in the training samples to generate training samples, which include non-data-enhanced labeled prostate MR images and data-enhanced labeled prostate MR images.
[0051] Specifically, the data enhancement of part of the original images in the training samples to generate training samples includes: splitting the training samples according to a preset ratio to generate a first training sample and a second training sample, wherein the number of labeled prostate MR images in the second training sample is greater than the number of labeled prostate MR images in the first training sample; translating, scaling and rotating the labeled prostate MR images in the first training sample according to a preset affine transformation function to generate training samples, wherein the training samples include the first training sample and the second training sample after data enhancement.
[0052] Exemplarily, the labeled prostate MR images in the training samples are split into the first training sample and the second training sample according to a preset ratio. For example, the labeled prostate MR images in the training samples are split into the first training sample and the second training sample according to a ratio of 2:8, wherein the number of labeled prostate MR images in the second training sample is greater than the number of labeled prostate MR images in the first training sample.
[0053] The first training sample is generated by translating, scaling and rotating each labeled prostate MR image in the first training sample by using a preset affine transformation function, thereby generating a training sample, wherein the training sample includes the first training sample and the second training sample. The first training sample is a sample after data enhancement is performed on each labeled prostate MR image in the first training sample. For example, the preset affine transformation function I is obtained. new =M dx,dy,θ,r I, where I is the labeled prostate MR image before radiometric transformation, I new is a labeled prostate MR image after radiometric transformation. dx,dy,θ,r is the matrix used for radial transformation, where dx is the horizontal translation distance, dy is the vertical translation distance, θ is the rotation angle, and r is the scaling factor.
[0054] Specifically, the translation includes horizontal movement and vertical movement, and the distances of the horizontal movement and the vertical movement are selected from a first preset range; the scale of the zoom is selected from a second preset range; and the angle of the rotation is selected from a third preset range.
[0055] Exemplarily, for example, the first preset range is (-8, 8), then the distances of the horizontal movement dx and the vertical movement dy are selected as random numbers in (-8, 8); the second preset range is (0.6, 1.5), then the scaling r is selected as a random number in (0.6, 1.5); the second preset range is (-8, 8), then the rotation angle θ is selected as a random number in (-8, 8).
[0056] Specifically, after translating, scaling and rotating the labeled prostate MR images in the first training sample according to the preset affine transformation function, it also includes: obtaining the area of each labeled prostate MR image after data enhancement and obtaining the area of each labeled prostate MR image before data enhancement; determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement; if it is determined that the preset condition is met, generating a first training sample for each labeled prostate MR image after data enhancement that meets the preset condition; if it is determined that the preset condition is not met, re-enhancing the data of each labeled prostate MR image before or after data enhancement that does not meet the preset condition.
[0057] For example, in a labeled prostate MR image, label 1 represents the prostate gland, and label 0 represents the background. The area of the prostate gland can be obtained by counting the number of label 1s. The area of the prostate before the affine transformation is A, and the area of the prostate after the transformation is A new The area A of the prostate before and after the affine transformation new , determine whether each labeled prostate MR image after data enhancement meets the preset conditions. If it is determined that each labeled prostate MR image after data enhancement meets the preset conditions, the first training sample is generated by each labeled prostate MR image after data enhancement that meets the preset conditions; if it is determined that the preset conditions are not met, the affine transformation is re-performed on each labeled prostate MR image in the first training sample, for example, the distance of horizontal movement dx and vertical movement dy is re-selected from a random number in (-8,8); the scaling scale r is re-selected from a random number in (0.6,1.5); the rotation angle is selected from θ and a random number in (-8,8) is re-selected.
[0058] Specifically, determining whether a preset condition is met according to the area of each training data after data enhancement and the area of each training data before data enhancement includes: obtaining the area ratio of each labeled prostate MR image based on a preset formula, the area of each labeled prostate MR image after data enhancement, and the area of each labeled prostate MR image before data enhancement; comparing the area ratio with a preset threshold; if the area ratio is greater than the preset threshold, determining that the preset condition is not met; if the area ratio is less than or equal to the preset threshold, determining that the preset condition is met.
[0059] For example, get the preset formula The area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement, where A newis the area of each labeled prostate MR image before data enhancement, A is the area of each labeled prostate MR image after data enhancement, and the area ratio of each labeled prostate MR image is obtained by a preset formula. The area ratio of each labeled prostate MR image is compared with the preset threshold. If the area ratio is greater than the preset threshold, it is determined that the preset condition is not met; if the area ratio is less than or equal to the preset threshold, it is determined that the preset condition is met. For example, if It is determined that the preset conditions are not met; if It is determined that the preset conditions are met, where threshod is a preset threshold. The value of the preset threshold threshod will affect the final segmentation result. The relationship between threshod and the performance of the model is as follows: Figure 2 As shown in the figure, it can be seen that as the threshod increases, the performance of the model increases. When the threshod is 0.5, the performance of the model reaches its peak. After that, as the threshod increases, the performance of the model continues to decrease.
[0060] When threshod is 0.5, the performance of the model reaches the best value, indicating that the transformation of the prostate MR image needs to be limited to a reasonable spatial range to produce an effective prostate MR image. When the value of threshod is greater than 0.5, the performance of the model decreases, indicating that when the spatial range of the transformation is too large, some unreasonable samples will be generated to affect the performance of the model. Therefore, the preset threshold should be between (0.3, 0.5).
[0061] Step S102: training a preset network according to the training samples to generate a prostate image segmentation model.
[0062] Exemplarily, a preset network is trained by training samples, and the preset network includes a fully convolutional network. The first training sample and the second sample to be trained are sequentially trained on the fully convolutional network after data enhancement in the training sample to generate a prostate image segmentation model.
[0063] Specifically, the method of training a preset network according to the training samples to generate a prostate image segmentation model includes: training the preset network with the images in the training samples in sequence to determine whether the trained preset network is in a convergence state; if it is determined that the trained preset network is in a convergence state, generating a prostate image segmentation model based on the trained preset network; if it is determined that the trained preset network is not in a convergence state, continuing to train the preset network until the trained preset network is in a convergence state to generate a prostate image segmentation model.
[0064] Exemplarily, when the full convolution network is trained by each labeled prostate MR image and each labeled prostate MR image after data enhancement in the training sample, it is determined whether the full convolution network is in a convergence state. If it is determined that the trained full convolution network is in a convergence state, the trained full convolution network is used as a prostate image segmentation model; if it is determined that the trained full convolution network is not in a convergence state, the full convolution network is continued to be trained until the full convolution network is in a convergence state, and a prostate image segmentation model is generated. For example, the loss value of the full convolution network after each training is obtained, and the current loss value is compared with the loss value obtained after the last training. If they are the same or within a preset range, it is determined that the full convolution network is in a convergence state, otherwise, it is not in a convergence state.
[0065] Step S103: testing the test sample according to the prostate image segmentation model to obtain the segmentation result of each prostate test image in the test sample, wherein the segmentation result includes the prostate body.
[0066] Exemplarily, a prostate test image in a test sample is input into a prostate image segmentation model, the prostate test image is processed by the prostate image segmentation model, the background and prostate body in the prostate test image are identified, and the prostate body in the prostate test image is segmented.
[0067] In an embodiment of the present application, data enhancement is performed on part of the original images in the training samples to generate training samples, and then a preset network is trained with labeled prostate MR images after part of the data enhancement in the training samples to generate a prostate image segmentation model. The generated prostate image segmentation model is used to test the test samples to obtain the prostate bodies of each prostate test image in the test samples, and the prostate bodies in the prostate images are segmented by the model, which not only improves the efficiency of segmentation, but also improves the accuracy of segmentation.
[0068] The method using data enhancement is compared with the method without data enhancement, and the results are shown in Table 1. As can be seen from Table 1, the proposed data enhancement method helps to improve the prostate segmentation performance.
[0069] Comparison of methods using data enhancement and methods not using data enhancement in Table 1:
[0070] DSC Using Data Augmentation 0.8533 No data augmentation 0.8412
[0071] Its advantage lies in the design of a new data enhancement technology for prostate MR images, which enables the deep learning model to better segment the prostate.
[0072] Please refer to Figure 3 , Figure 3A schematic block diagram of a prostate image segmentation device based on data enhancement provided in an embodiment of the present application.
[0073] like Figure 3 As shown, the device 400 includes: a first generating module 401, a second generating module 402, and an acquiring module 403.
[0074] A first generating module 401 is used to perform data enhancement on a portion of original images in a training sample to generate a training sample, wherein the original image includes a labeled prostate MR image;
[0075] The second generating module 402 is used to train a preset network according to the training samples to generate a prostate image segmentation model;
[0076] The acquisition module 403 is used to test the test sample according to the prostate image segmentation model, and obtain the segmentation result of each prostate test image in the test sample, wherein the segmentation result includes the prostate image.
[0077] The first generating module 401 is further used for:
[0078] Splitting the training sample according to a preset ratio to generate a first training sample and a second training sample, wherein the number of labeled prostate MR images in the second training sample is greater than the number of labeled prostate MR images in the first training sample;
[0079] The labeled prostate MR image in the first to-be-trained sample is translated, scaled and rotated according to a preset affine transformation function to generate a training sample, wherein the training sample includes the first training sample after data enhancement and the second to-be-trained sample.
[0080] The first generating module 401 is further used for:
[0081] The translation includes horizontal movement and vertical movement, and the distances of the horizontal movement and the vertical movement are selected from a first preset range; the scale of the zoom is selected from a second preset range; and the angle of the rotation is selected from a third preset range.
[0082] Wherein, the prostate image segmentation device based on data enhancement is also used for:
[0083] Acquiring the area of each labeled prostate MR image after data enhancement and acquiring the area of each labeled prostate MR image before data enhancement;
[0084] Determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement;
[0085] If it is determined that the preset condition is met, generating a first training sample from each labeled prostate MR image after data enhancement that meets the preset condition;
[0086] If it is determined that the preset condition is not met, data enhancement is performed again on each labeled prostate MR image before or after data enhancement that does not meet the preset condition.
[0087] The first generating module 401 is further used for:
[0088] Based on a preset formula, the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement, the area ratio of each labeled prostate MR image is obtained;
[0089] comparing the area ratio with a preset threshold;
[0090] If the area ratio is greater than a preset threshold, it is determined that the preset condition is not met;
[0091] If the area ratio is less than or equal to a preset threshold, it is determined that the preset condition is met.
[0092] The first generating module 401 is further used for:
[0093] The preset condition includes a preset threshold, and the preset threshold is a value within a third preset range.
[0094] The second generating module 402 is further configured to:
[0095] By sequentially training a preset network with the images in the training samples, determining whether the trained preset network is in a converged state;
[0096] If it is determined that the trained preset network is in a convergence state, generating a prostate image segmentation model based on the trained preset network;
[0097] If it is determined that the trained preset network is not in a convergence state, the preset network continues to be trained until the trained preset network is in a convergence state, thereby generating a prostate image segmentation model.
[0098] The acquisition module 403 is further used for:
[0099] Inputting a prostate test image in a test sample into the prostate image segmentation model;
[0100] Each of the test data is segmented based on the prostate image segmentation model to obtain a segmentation result of each of the prostate test images.
[0101] It should be noted that technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device and each module and unit can refer to the corresponding process in the aforementioned data enhancement-based prostate image segmentation method embodiment, and will not be repeated here.
[0102] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 4 Runs on the computer device shown.
[0103] See also Figure 4 , Figure 4 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a terminal.
[0104] like Figure 4 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0105] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any prostate image segmentation method based on data enhancement.
[0106] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0107] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any prostate image segmentation method based on data enhancement.
[0108] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0109] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0110] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0111] Performing data enhancement on a portion of original images in the training samples to generate training samples, wherein the original images include labeled prostate MR images;
[0112] Training a preset network according to the training samples to generate a prostate image segmentation model;
[0113] The test sample is tested according to the prostate image segmentation model to obtain the segmentation result of each prostate test image in the test sample, wherein the segmentation result includes the prostate image.
[0114] In one embodiment, the processor implements data enhancement for a portion of the original image in the training sample, and when generating the training sample, is used to implement:
[0115] Splitting the training sample according to a preset ratio to generate a first training sample and a second training sample, wherein the number of labeled prostate MR images in the second training sample is greater than the number of labeled prostate MR images in the first training sample;
[0116] The labeled prostate MR image in the first to-be-trained sample is translated, scaled and rotated according to a preset affine transformation function to generate a training sample, wherein the training sample includes the first training sample after data enhancement and the second to-be-trained sample.
[0117] In one embodiment, when the processor is implemented, it is used to implement: the translation includes horizontal movement and vertical movement, and the distances of the horizontal movement and the vertical movement are selected from a first preset range; the scale of the scaling is selected from a second preset range; the angle of the rotation is selected from a third preset range
[0118] In one embodiment, after the processor translates, scales and rotates the labeled prostate MR image in the first training sample according to a preset affine transformation function, it is used to implement:
[0119] Acquiring the area of each labeled prostate MR image after data enhancement and acquiring the area of each labeled prostate MR image before data enhancement;
[0120] Determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement;
[0121] If it is determined that the preset condition is met, generating a first training sample from each labeled prostate MR image after data enhancement that meets the preset condition;
[0122] If it is determined that the preset condition is not met, data enhancement is performed again on each labeled prostate MR image before or after data enhancement that does not meet the preset condition.
[0123] In one embodiment, the processor is used to implement, when determining whether a preset condition is met according to the area of each training data after data enhancement and the area of each training data before data enhancement:
[0124] Based on a preset formula, the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement, the area ratio of each labeled prostate MR image is obtained;
[0125] comparing the area ratio with a preset threshold;
[0126] If the area ratio is greater than a preset threshold, it is determined that the preset condition is not met;
[0127] If the area ratio is less than or equal to a preset threshold, it is determined that the preset condition is met.
[0128] In one embodiment, when the processor is implemented, it is used to implement: the preset condition includes a preset threshold, and the preset threshold selects a value within a third preset range.
[0129] In one embodiment, when the processor trains a preset network according to the training samples to generate a prostate image segmentation model, it is used to implement:
[0130] By sequentially training a preset network with the images in the training samples, determining whether the trained preset network is in a converged state;
[0131] If it is determined that the trained preset network is in a convergence state, generating a prostate image segmentation model based on the trained preset network;
[0132] If it is determined that the trained preset network is not in a convergence state, the preset network continues to be trained until the trained preset network is in a convergence state, thereby generating a prostate image segmentation model.
[0133] In one embodiment, the processor implements testing of the test sample according to the prostate image segmentation model, and when obtaining the segmentation result of each test data in the test sample, is used to implement:
[0134] Inputting a prostate test image in a test sample into the prostate image segmentation model;
[0135] Each of the test data is segmented based on the prostate image segmentation model to obtain a segmentation result of each of the prostate test images.
[0136] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the prostate image segmentation method based on data enhancement in the present application.
[0137] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0138] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0139] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A prostate image segmentation method based on data enhancement, characterized in that: include: Performing data enhancement on a portion of original images in the training samples to generate training samples, wherein the original images include labeled prostate MR images; The step of performing data enhancement on a portion of the original images in the training samples to generate the training samples includes: Splitting the training sample according to a preset ratio to generate a first training sample and a second training sample, wherein the number of labeled prostate MR images in the second training sample is greater than the number of labeled prostate MR images in the first training sample; Translating, scaling and rotating the labeled prostate MR image in the first to-be-trained sample according to a preset affine transformation function to generate a training sample, wherein the training sample includes the first training sample after data enhancement and the second to-be-trained sample; After translating, scaling and rotating the labeled prostate MR image in the first training sample according to the preset affine transformation function, the method further includes: Acquiring the area of each labeled prostate MR image after data enhancement and acquiring the area of each labeled prostate MR image before data enhancement; Determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement; If it is determined that the preset condition is met, generating a first training sample from each labeled prostate MR image after data enhancement that meets the preset condition; If it is determined that the preset condition is not met, re-enhancement is performed on each labeled prostate MR image before or after data enhancement that does not meet the preset condition; The determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement includes: Based on a preset formula, the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement, the area ratio of each labeled prostate MR image is obtained; comparing the area ratio with a preset threshold; If the area ratio is greater than a preset threshold, it is determined that the preset condition is not met; If the area ratio is less than or equal to a preset threshold, it is determined that the preset condition is met; Training a preset network according to the training samples to generate a prostate image segmentation model; The test sample is tested according to the prostate image segmentation model to obtain the segmentation result of each prostate test image in the test sample, wherein the segmentation result includes the prostate body.
2. The prostate image segmentation method based on data enhancement according to claim 1, characterized in that: The translation includes horizontal movement and vertical movement, and the distances of the horizontal movement and the vertical movement are selected from a first preset range; the scale of the zoom is selected from a second preset range; and the angle of the rotation is selected from a third preset range.
3. The method according to claim 1, characterized in that The preset condition includes a preset threshold, and the preset threshold is a value within a third preset range.
4. The prostate image segmentation method based on data enhancement according to claim 1, characterized in that: The step of training a preset network according to the training samples to generate a prostate image segmentation model comprises: By sequentially training a preset network with the images in the training samples, determining whether the trained preset network is in a converged state; If it is determined that the trained preset network is in a convergence state, generating a prostate image segmentation model based on the trained preset network; If it is determined that the trained preset network is not in a convergence state, the preset network continues to be trained until the trained preset network is in a convergence state, thereby generating a prostate image segmentation model.
5. The prostate image segmentation method based on data enhancement according to claim 1, characterized in that: The step of testing the test sample according to the prostate image segmentation model to obtain the segmentation result of each test data in the test sample includes: Inputting a prostate test image in a test sample into the prostate image segmentation model; Each of the test data is segmented based on the prostate image segmentation model to obtain a segmentation result of each of the prostate test images.
6. A prostate image segmentation device based on data enhancement, characterized in that: include: A first generating module is used to perform data enhancement on a portion of original images in the training samples to generate training samples, wherein the original images include labeled prostate MR images; The step of performing data enhancement on a portion of the original images in the training samples to generate the training samples includes: Splitting the training sample according to a preset ratio to generate a first training sample and a second training sample, wherein the number of labeled prostate MR images in the second training sample is greater than the number of labeled prostate MR images in the first training sample; Translating, scaling and rotating the labeled prostate MR image in the first to-be-trained sample according to a preset affine transformation function to generate a training sample, wherein the training sample includes the first training sample after data enhancement and the second to-be-trained sample; After translating, scaling and rotating the labeled prostate MR image in the first training sample according to the preset affine transformation function, the method further includes: Acquiring the area of each labeled prostate MR image after data enhancement and acquiring the area of each labeled prostate MR image before data enhancement; Determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement; If it is determined that the preset condition is met, generating a first training sample from each labeled prostate MR image after data enhancement that meets the preset condition; If it is determined that the preset condition is not met, re-enhancement is performed on each labeled prostate MR image before or after data enhancement that does not meet the preset condition; The determining whether a preset condition is met according to the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement includes: Based on a preset formula, the area of each labeled prostate MR image after data enhancement and the area of each labeled prostate MR image before data enhancement, the area ratio of each labeled prostate MR image is obtained; comparing the area ratio with a preset threshold; If the area ratio is greater than a preset threshold, it is determined that the preset condition is not met; If the area ratio is less than or equal to a preset threshold, it is determined that the preset condition is met; A second generation module is used to train a preset network according to the training samples to generate a prostate image segmentation model; The acquisition module is used to test the test sample according to the prostate image segmentation model, and obtain the segmentation results of each prostate test image in the test sample, wherein the segmentation results include the prostate image.
7. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the prostate image segmentation method based on data enhancement as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Image data processing method and device
CN112801857A
Method and System for Automatic Prostate Segmentation in Magnetic Resonance Images
US20140029823A1