Rectal lesion detection method and device, electronic equipment and storage medium

By combining the encoding and decoding modules of a convolutional neural network with a global attention mechanism, multi-level features of rectal images are extracted and fused, solving the problem of low tumor segmentation accuracy in traditional methods and achieving high-precision rectal lesion detection.

CN121235971APending Publication Date: 2025-12-30THE SECOND AFFILIATED HOSPITAL OF ANHUI MEDICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410247672.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Traditional manual segmentation methods are insufficient to meet the requirements for accurate tumor location detection in medical images, especially in CT and MRI images, where the segmentation accuracy is low due to the variability in tumor shape, size, and location, as well as the presence of noise and artifacts.

Method used

A method for detecting rectal lesions based on convolutional neural networks is adopted. By using multi-layer convolution and pooling operations and upsampling operations in the encoding and decoding modules, combined with a global attention mechanism, multi-level spatial and semantic features of the image are extracted and fused to improve detection accuracy.

Benefits of technology

It significantly improves the accuracy and robustness of rectal lesion detection, enabling more precise identification of lesion areas in rectal images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121235971A_ABST
    Figure CN121235971A_ABST
Patent Text Reader

Abstract

The invention provides a rectum lesion detection method and device, electronic equipment and a storage medium, and belongs to the technical field of medical image.A to-be-recognized rectum image is input into a coding module in a rectum detection model, a coding vector output by the coding module is obtained, the coding module comprises a plurality of alternating convolution units and pooling units, and the convolution units and the pooling units correspond to the coding vector. Through multi-layer convolution and pooling, extracting multi-level spatial information of the to-be-identified rectum image; the coding vector is input to a decoding module in the rectum detection model, a rectum lesion detection result output by the decoding module is obtained, the decoding module comprises a plurality of alternating convolution units and up-sampling units, semantic feature information of multiple levels is extracted through multi-layer convolution and up-sampling, and a rectum lesion detection result is obtained. And the features of the to-be-identified rectum image are fully described, so that the rectum detection accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of medical imaging technology, and in particular to a rectal lesion detection method and device, electronic equipment and storage medium. BACKGROUND

[0002] In the field of medical imaging, medical image segmentation is crucial for accurate diagnosis and treatment planning. With the continuous development of medical imaging technology, CT (Computed Tomography) and MRI (Magnetic Resonance Imaging) are widely used, and the medical images obtained have complex anatomical structures and rich information. However, due to the variability of tumor shape, size and location in the image, as well as the noise and artifacts present in the image, traditional manual segmentation methods cannot meet the needs of precision medicine. SUMMARY

[0003] The present application provides a rectal lesion detection method, device, electronic equipment and storage medium to solve the defect of low accuracy of manual segmentation of tumor location in the prior art.

[0004] In a first aspect, the present application provides a rectal lesion detection method, comprising:

[0005] inputting the rectal image to be recognized into an encoding module in a rectal detection model to obtain an encoding vector output by the encoding module, the encoding module comprising a plurality of alternating convolution units and pooling units;

[0006] inputting the encoding vector into a decoding module in the rectal detection model to obtain a rectal lesion detection result output by the decoding module, the decoding module comprising a plurality of alternating convolution units and up-sampling units

[0007] According to the rectal lesion detection method provided by the present application, the rectal image to be recognized is input into an encoding module in a rectal detection model to obtain an encoding vector output by the encoding module, comprising:

[0008] inputting the rectal image to be recognized into a first encoding layer of the encoding module to obtain a first encoding feature map output by the first encoding layer, the first encoding layer comprising convolution units and max-pooling units connected in sequence;

[0009] inputting the first encoding feature map into a second encoding layer of the encoding module to obtain a second encoding feature map output by the second encoding layer, the second encoding layer comprising convolution units and max-pooling units connected in sequence;

[0010] input the second encoding feature map to a third encoding layer of the encoding module to obtain a third encoding feature map output by the third encoding layer, the third encoding layer comprising convolution units and max-pooling units connected in sequence;

[0011] input the third encoding feature map to a fourth encoding layer of the encoding module to obtain a fourth encoding feature map output by the fourth encoding layer, the fourth encoding layer comprising convolution units and max-pooling units connected in sequence;

[0012] input the fourth encoding feature map to a fifth encoding layer of the encoding module to obtain an encoding vector output by the fifth encoding layer, the fifth encoding layer comprising one convolution unit.

[0013] According to the rectal lesion detection method provided by the application, each convolution unit comprises two convolution networks connected in sequence, and each convolution network comprises convolution layers, batch normalization layers and activation layers connected in sequence.

[0014] According to the rectal lesion detection method provided by the application, inputting the encoding vector into the decoding module in the rectal detection model to obtain a rectal lesion detection result output by the decoding module comprises:

[0015] input the encoding vector into a first decoding layer of the decoding module to obtain a first decoding feature map output by the first decoding layer, the first decoding layer comprising up-sampling layers, splicing layers and convolution layers connected in sequence;

[0016] input the first decoding feature map into a second decoding layer of the decoding module to obtain a second decoding feature map output by the second decoding layer, the second decoding feature map comprising up-sampling layers, splicing layers and convolution layers connected in sequence;

[0017] input the second decoding feature map into a third decoding layer of the decoding module to obtain a third decoding feature map output by the third decoding layer, the third decoding feature map comprising up-sampling layers, splicing layers and convolution layers connected in sequence;

[0018] input the third decoding feature map into a fourth decoding layer of the decoding module to obtain a rectal lesion detection result output by the fourth decoding layer.

[0019] According to the rectal lesion detection method provided by the application, inputting the third decoding feature map into the fourth decoding layer of the decoding module to obtain the rectal lesion detection result output by the fourth decoding layer comprises:

[0020] input the intermediate feature map to a first feature extraction unit of the fourth decoding layer to obtain a first intermediate feature output by the first feature extraction unit, the first feature extraction unit comprising a 3*3 convolutional layer, and the intermediate feature map being obtained by processing the to-be-identified rectum image by the convolutional units in the first encoding layer;

[0021] After upsampling the third decoding feature map, input the third decoding feature map to a second feature extraction unit of the fourth decoding layer to obtain a second intermediate feature output by the second feature extraction unit, the second feature extraction unit comprising a pooling layer and a 1*1 convolutional layer connected in sequence;

[0022] fuse the first intermediate feature and the second intermediate feature to obtain a fused feature;

[0023] After upsampling the fused feature, map the fused feature using a S-shaped function to obtain the rectum lesion detection result and output the rectum lesion detection result.

[0024] According to the rectum lesion detection method provided by the present application, the rectum detection model is trained based on the following steps:

[0025] input a training sample into the rectum detection model to obtain a corresponding prediction result output by the rectum detection model;

[0026] based on the prediction result and a true result corresponding to the training sample, calculate a loss value;

[0027] based on the loss value, adjust parameters of the rectum detection model until the loss value is less than a preset threshold or the number of training reaches a preset number of times;

[0028] the model parameters when the loss value is less than the preset threshold or the number of training reaches the preset number of times are used as the model parameters of the trained rectum detection model.

[0029] In a second aspect, the present application further provides a rectum lesion detection device, comprising:

[0030] an input module configured to input a to-be-identified rectum image into an encoding module in a rectum detection model to obtain an encoding vector output by the encoding module, the encoding module comprising a plurality of alternating convolutional units and pooling units;

[0031] an output module configured to input the encoding vector into a decoding module in the rectum detection model to obtain a rectum lesion detection result output by the decoding module, the decoding module comprising a plurality of alternating convolutional units and upsampling units.

[0032] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the rectum lesion detection method according to any one of the above aspects when executing the program.

[0033] In a fourth aspect, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the rectum lesion detection method according to any one of the above aspects.

[0034] In a fifth aspect, the present application further provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the steps of the rectum lesion detection method according to any one of the above aspects.

[0035] The rectum lesion detection method, device, electronic device, and storage medium provided by the present application input the rectum image to be recognized into an encoding module in the rectum detection model to obtain an encoding vector output by the encoding module, the encoding module comprises a plurality of alternating convolution units and pooling units, and through multi-layer convolution and pooling, a plurality of levels of spatial information of the rectum image to be recognized are extracted; the encoding vector is input into a decoding module in the rectum detection model to obtain a rectum lesion detection result output by the decoding module, the decoding module comprises a plurality of alternating convolution units and up-sampling units, and through multi-layer convolution and up-sampling, a plurality of levels of semantic feature information are extracted to fully depict the features of the rectum image to be recognized, thereby improving the accuracy of rectum detection. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0037] Figure 1 is one of the flowcharts of the rectum lesion detection method provided by the present application;

[0038] Figure 2 is another flowchart of the rectum lesion detection method provided by the present application;

[0039] Figure 3 is a schematic diagram of the rectum lesion detection result provided by the present application;

[0040] Figure 4 is a schematic diagram of the rectum detection model provided by the present application;

[0041] Figure 5is a schematic view of a rectal lesion detection system provided by the present application;

[0042] Figure 6 is a structural schematic view of a rectal lesion detection device provided by the present application;

[0043] Figure 7 is a structural schematic view of an electronic device provided by the present application. DETAILED DESCRIPTION

[0044] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0045] It should be noted that, in the description of the embodiments of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover the non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or device comprising the element. The terms "upper", "lower" and the like indicate the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application and simplify the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise specified and limited, the terms "mount", "connect", "connect" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0046] The terms "first", "second", and the like in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a class and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / ", generally represents a "or" relationship between the front and rear associated objects.

[0047] In the field of medical imaging, medical image segmentation is crucial for accurate diagnosis and treatment planning. With the continuous development of medical imaging technology, such as CT (Computed Tomography) and MRI (Magnetic Resonance Imaging), medical images obtained have complex anatomical structures and rich information. However, due to the variability of tumor shape, size and location in the image, as well as the noise and artifacts present in the image, traditional manual segmentation methods are difficult to meet the needs of precision medicine.

[0048] Previous studies have analyzed and simulated the features of medical images, but it is difficult to determine the segmentation of tumors in medical images from the perspective of signal processing. Tumors in medical images exhibit diverse morphological characteristics, and there are differences between different diseases and patients, increasing the challenge of segmentation algorithms. Therefore, there is an urgent need for a segmentation method that can adapt to various medical image features to improve the accuracy and robustness of tumor recognition.

[0049] To solve the above problems, the present application proposes the following embodiments. The following embodiments are described in conjunction with Figures 1-7 A rectal lesion detection method, device, electronic equipment and storage medium are provided.

[0050] Figure 1 is one of the flowcharts of the rectal lesion detection method provided by the present application, as shown in Figure 1 includes but is not limited to the following steps:

[0051] S110, input the to-be-identified rectal image into the encoding module in the rectal detection model to obtain an encoding vector output by the encoding module, the encoding module comprising a plurality of alternating convolution units and pooling units.

[0052] S120, input the encoding vector into the decoding module in the rectal detection model to obtain a rectal lesion detection result output by the decoding module, the decoding module comprising a plurality of alternating convolution units and up-sampling units.

[0053] Specifically, the encoding module includes a plurality of alternately repeated convolution units and pooling units, and the rectum image to be identified sequentially passes through the plurality of alternately repeated convolution units and pooling units to obtain an encoding vector; the decoding module includes a plurality of alternately repeated convolution units and up-sampling units, and the encoding vector sequentially passes through the plurality of alternately repeated convolution units and up-sampling units to obtain a final rectum lesion detection result.

[0054] Figure 3 is a schematic diagram of the rectum lesion detection result provided by the present application, as shown in Figure 3 , input is an input rectum MRI image to be identified, predict is a predicted rectum lesion detection result, and mask is a real mask image.

[0055] Here, the encoding module is responsible for extracting image features, and the decoding module gradually performs up-sampling. In order to enhance information transmission, a global attention mechanism is introduced to fuse the features of the corresponding levels in the encoding module and the decoding module (for example: the input size is 256*256, and after one convolution, it is 128*128. The feature map of this size will be fused with the same size in the decoding module), wherein the encoding module extracts shallow local information, and the decoding module focuses on local deep information. The fusion of the two helps to overcome the problem of information loss caused by the pooling operation, while retaining important detail information, thereby improving the performance and accuracy of the network in the image segmentation task.

[0056] The rectum lesion detection method and device, electronic equipment and storage medium provided by the present application input the rectum image to be identified into the encoding module in the rectum detection model, obtain the encoding vector output by the encoding module, the encoding module includes a plurality of alternately repeated convolution units and pooling units, and extract multiple levels of spatial information of the rectum image to be identified through multiple convolution and pooling; input the encoding vector into the decoding module in the rectum detection model to obtain the rectum lesion detection result output by the decoding module, the decoding module includes a plurality of alternately repeated convolution units and up-sampling units, and extract multiple levels of semantic feature information through multiple convolution and up-sampling, fully describe the features of the rectum image to be identified, thereby improving the accuracy of rectum detection.

[0057] In an optional embodiment, the inputting the rectum image to be identified into the encoding module in the rectum detection model to obtain the encoding vector output by the encoding module comprises:

[0058] inputting the rectum image to be identified into the first encoding layer of the encoding module to obtain the first encoding feature map output by the first encoding layer, the first encoding layer includes a convolution unit and a maximum pooling unit connected in sequence;

[0059] inputting the first encoded feature map into a second encoding layer of the encoding module to obtain a second encoded feature map output by the second encoding layer, the second encoding layer comprising convolution units and max-pooling units connected in sequence;

[0060] inputting the second encoded feature map into a third encoding layer of the encoding module to obtain a third encoded feature map output by the third encoding layer, the third encoding layer comprising convolution units and max-pooling units connected in sequence;

[0061] inputting the third encoded feature map into a fourth encoding layer of the encoding module to obtain a fourth encoded feature map output by the fourth encoding layer, the fourth encoding layer comprising convolution units and max-pooling units connected in sequence;

[0062] inputting the fourth encoded feature map into a fifth encoding layer of the encoding module to obtain an encoding vector output by the fifth encoding layer, the fifth encoding layer comprising one convolution unit.

[0063] Optionally, the max-pooling unit is a 2*2 max-pooling layer.

[0064] Further, each convolution unit comprises two convolution networks connected in sequence, and each convolution network comprises convolution layers, batch normalization layers and activation layers connected in sequence.

[0065] Optionally, the convolution layer is a 3*3 convolution kernel, and the activation layer uses a ReLu activation function.

[0066] In an optional embodiment, the inputting the encoding vector into the decoding module in the rectum detection model to obtain a rectum lesion detection result output by the decoding module comprises:

[0067] inputting the encoding vector into a first decoding layer of the decoding module to obtain a first decoding feature map output by the first decoding layer, the first decoding layer comprising upsampling layers, concatenation layers and convolution layers connected in sequence;

[0068] inputting the first decoding feature map into a second decoding layer of the decoding module to obtain a second decoding feature map output by the second decoding layer, the second decoding feature map comprising upsampling layers, concatenation layers and convolution layers connected in sequence;

[0069] inputting the second decoding feature map into a third decoding layer of the decoding module to obtain a third decoding feature map output by the third decoding layer, the third decoding feature map comprising upsampling layers, concatenation layers and convolution layers connected in sequence;

[0070] inputting the third decoding feature map into a fourth decoding layer of the decoding module to obtain a rectum lesion detection result output by the fourth decoding layer.

[0071] Optionally, the up-sampling layer adopts 2*2 de-convolution, so that the output of the convolution unit in each encoding layer is the same size as the output of the up-sampling layer in the corresponding decoding layer. Specifically, the output of the convolution unit in the second encoding layer is the same size as the output of the up-sampling layer in the third decoding layer, the output of the convolution unit in the third encoding layer is the same size as the output of the up-sampling layer in the second decoding layer, and the output of the convolution unit in the fourth encoding layer is the same size as the output of the up-sampling layer in the first decoding layer.

[0072] Here, the concatenation layer is to concatenate the encoded feature maps of the same size with the output of the up-sampling layer. Specifically, after the output of the convolution unit in the fourth encoding layer is concatenated with the output of the up-sampling layer in the first decoding layer, it is input to the convolution layer of the first decoding layer to obtain the first decoding feature map; after the output of the convolution unit in the third encoding layer is concatenated with the output of the up-sampling layer in the second decoding layer, it is input to the convolution layer of the second decoding layer to obtain the second decoding feature map; after the output of the convolution unit in the second encoding layer is concatenated with the output of the up-sampling layer in the third decoding layer, it is input to the convolution layer of the third decoding layer to obtain the third decoding feature map.

[0073] It can be understood that the encoding module extracts the feature information of the MRI image, the decoding module reconstructs the feature information, and the shallow layer feature and the deep layer feature are fully fused through the concatenation layer, so as to ensure that the network can effectively retain the shallow layer information and the deep layer information, thereby improving the accuracy of rectal lesion detection. In addition, the shallow layer feature and the deep layer feature are fused, so that the model pays more attention to the information most relevant to the current task, thereby improving the performance and generalization ability of the model.

[0074] Further, the third decoding feature map is input to the fourth decoding layer of the decoding module to obtain a rectal lesion detection result output by the fourth decoding layer, which comprises:

[0075] The intermediate feature map is input to a first feature extraction unit of the fourth decoding layer to obtain a first intermediate feature output by the first feature extraction unit, and the first feature extraction unit comprises a 3*3 convolution layer, and the intermediate feature map is obtained by processing the to-be-identified rectal image by the convolution unit in the first encoding layer.

[0076] The third decoding feature map is input to a second feature extraction unit of the fourth decoding layer to obtain a second intermediate feature output by the second feature extraction unit, and the second feature extraction unit comprises a pooling layer and a 1*1 convolution layer connected in sequence.

[0077] The first intermediate feature and the second intermediate feature are fused to obtain a fused feature.

[0078] After upsampling the fusion feature, a sigmoid function is used for mapping to obtain the rectum lesion detection result and output.

[0079] Specifically, the output (i.e., the intermediate feature map) of the convolution unit in the first encoding layer is processed by a 3*3 convolution operation to obtain a first intermediate feature; meanwhile, the third decoding feature map is upsampled using an upsampling layer, and then pooled and 1*1 convolution operation is performed to obtain a second intermediate feature; the first intermediate feature and the second intermediate feature are multiplied to obtain a channel attention weighted fusion feature; after the feature is upsampled by deconvolution or 1*1 convolution operation, a sigmoid function is used as a connection function to map the upsampled result to [0, 1], and for each pixel point, the mapping result greater than the threshold is determined as a tumor, and otherwise as normal intestinal tissue.

[0080] Optionally, by using a global attention mechanism, the weights of low-level features (features in the encoder) are adjusted according to the global information of high-level features (features in the decoder), thereby enhancing the perception of important information in the image.

[0081] It can be understood that the spatial channel convolution (sliding convolution along the Z axis) is used for the output of the convolution unit in the first encoding layer to extract the mapping relationship of the spatial information in the convolution layer, so as to facilitate the differentiation of the intestinal tract and the tumor from other similar tissues or background.

[0082] Optionally, the pooling layer in the second feature extraction unit is a global average pooling layer.

[0083] In an optional embodiment, the rectum detection model is trained based on the following steps:

[0084] The training sample is input into the rectum detection model to obtain a corresponding prediction result output by the rectum detection model;

[0085] Based on the prediction result and the true result corresponding to the training sample, a loss value is calculated;

[0086] Based on the loss value, the parameters of the rectum detection model are adjusted until the loss value is less than a preset threshold or the number of training times reaches a preset number;

[0087] The model parameters when the loss value is less than the preset threshold or the number of training times reaches the preset number are used as the model parameters of the trained rectum detection model.

[0088] Here, the training sample is the intestinal tumor MRI data, and the intestinal tumor MRI data has a corresponding label, i.e., a real mask image. The MRI image label contains the label information of the tumor region, and the label is usually provided at the pixel level or the voxel level (three-dimensional pixel volume unit) to indicate whether each pixel or voxel belongs to the tumor region.

[0089] Optionally, after determining the accurate positioning of the tumor in each MRI image, the position coordinates are labeled using the labeling tool LabelMe.

[0090] Optionally, the obtained intestinal tumor MRI data and labels are subjected to data augmentation to expand the total data set. For example, 255 originally obtained images are expanded to 510 images, and the data set is divided into a training set, a validation set, and a test set.

[0091] Optionally, the format of the training sample is RGB 256*256.

[0092] In an optional embodiment, to prevent overfitting, a part of the data set is taken out as a validation set, and cross-validation is used to train and evaluate the model. Specifically, five-fold cross-validation is used to improve the robustness of the model. The training set and the validation set are divided into 5 parts, one part is taken out each time to do the test set, and the other four parts are used to train the model as the training set. Then, the loss value of the model on the test set is calculated, and the average value of five times is taken as the final evaluation index, i.e., the evaluation index k = 5

[0093] wherein BCE represents the loss value.

[0094] Optionally, binary classification cross-entropy is used as the loss value, specifically:

[0095]

[0096] wherein Loss represents the loss value, y i represents the prediction result of the i-th pixel point, N represents the number of pixel points, and p(y i ) represents the result of mapping the prediction result of the i-th pixel point using the sigmod function,

[0097] Whether each pixel point is a tumor position is determined by a preset threshold. The pixel point greater than the preset threshold is determined as a tumor, and vice versa.

[0098] Optionally, Adam is used as the optimizer, which dynamically adjusts the learning rate of each parameter by using the first moment estimate and the second moment estimate of the gradient. It has different learning rates for different parameters, which can adapt to the characteristics of different parameters, so as to be more stable and efficient in the training process. After multiple rounds of channel training and cross-validation, the minimum loss value is finally obtained, and the obtained model parameter file is saved as the parameter of the final rectum detection model.

[0099] In an optional embodiment, the rectum detection model is evaluated using the Dice coefficient, the intersection over union (IoU) and the Hausdorff distance. The specific calculation formula is as follows:

[0100]

[0101] wherein pred is a set of predicted values, true is a set of true values, the numerator is the intersection between pred and true, and the denominator is the union of pred and true, pred∩true is approximated as the dot product between the predicted graph pred and the true graph true, and the sum of the element results of the dot product is added, the best result of segmentation is 1, and the worst result is 0;

[0102]

[0103] wherein Intersection is the area of the intersection region of the predicted result and the true label, Union is the area of the union region, the intersection region represents the correct part of the prediction, and the union region contains all the predicted regions and the regions of the true label, the value range of IoU is between 0 and 1, wherein 0 represents no overlap, 1 represents complete overlap, and the larger the IoU is, the higher the coincidence degree between the predicted result of the model and the true situation is;

[0104] H(A,B)=max{sup a∈A inf b∈B d(a,b),sup b∈B inf a∈A d(a,b)};

[0105] wherein d(a,b) represents the distance between the set element a and the set element b, the Hausdorff distance calculates the distance between the farthest points in two sets, and the larger value between the Hausdorff distance between the predicted value and the true value set and the Hausdorff distance between the true value and the predicted value set is taken. The boundary similarity between the predicted result of the model and the true label is evaluated by the Hausdorff distance. If the boundaries of the two are closer, the Hausdorff distance is smaller, indicating that the prediction of the model is more accurate, and vice versa.

[0106] The prediction results of the rectum detection model provided by the present application and the U-Net and FCN (Fully Convolutional Network) models are shown in Table 1 below. It can be seen that the segmentation accuracy of the rectum detection model provided by the present application is higher.

[0107] Table 1 Comparison of results of each algorithm for tumor segmentation

[0108]

[0109]

[0110] Figure 5 is a schematic diagram of a rectum lesion detection system provided by the present application, as shown in Figure 5 , the rectum lesion detection result is interactively displayed by using a GUI interface.

[0111] Figure 2 is a second schematic diagram of the process of a rectum lesion detection method provided by the present application, Figure 4 is a schematic diagram of a rectum detection model provided by the present application, in order to facilitate understanding, the rectum lesion detection method provided by the present application will be described below in combination with Figure 2 and Figure 4 .

[0112] After data preprocessing of the rectum MRI image, the rectum detection model is trained based on the annotation until the accuracy of the rectum detection model reaches the threshold condition, such as the loss value being less than the preset threshold, to obtain the final rectum detection model, the model is used for tumor prediction, and whether there is a tumor and the tumor segmentation picture are displayed through the GUI interactive interface.

[0113] In summary, the rectum lesion detection method provided by the present application inputs a processed rectum MRI image in RGB format with a size of 256*256 into a classification and segmentation model based on a convolutional neural network, thereby realizing rapid diagnosis of the rectum MRI image, predicting whether the magnetic resonance image of the axial position rectal cancer has a tumor and the accurate lesion position, and significantly improving the accuracy of diagnosis, thereby providing doctors with a faster and more accurate rectal cancer diagnosis tool.

[0114] The rectum lesion detection device provided by the present application will be described below, and the rectum lesion detection device described below can be correspondingly referred to the rectum lesion detection method described above. Figure 6 is a structural schematic diagram of a rectum lesion detection device provided by the present application, as shown in Figure 6 , the rectum lesion detection device comprises:

[0115] The input module 610 is configured to input a rectum image to be recognized into an encoding module in a rectum detection model, to obtain an encoding vector output by the encoding module, and the encoding module comprises a plurality of alternating convolution units and pooling units.

[0116] The output module 620 is configured to input the encoding vector into a decoding module in the rectum detection model, to obtain a rectum lesion detection result output by the decoding module, and the decoding module comprises a plurality of alternating convolution units and up-sampling units.

[0117] It should be noted that the rectum lesion detection device provided by the embodiment of the present application can execute the rectum lesion detection method described in any of the above embodiments when actually running, and the embodiment will not be repeated here.

[0118] Figure 7 is a structural schematic diagram of an electronic device provided by the present application, as Figure 7 shown, the electronic device can include a processor 710, a communications interface 720, a memory 730, and a communications bus 740, wherein the processor 710, the communications interface 720, and the memory 730 complete mutual communication through the communications bus 740. The processor 710 can call the logic instructions in the memory 730 to execute a rectum lesion detection method, which includes: inputting a rectum image to be recognized into an encoding module in a rectum detection model, to obtain an encoding vector output by the encoding module, and the encoding module comprises a plurality of alternating convolution units and pooling units; inputting the encoding vector into a decoding module in the rectum detection model, to obtain a rectum lesion detection result output by the decoding module, and the decoding module comprises a plurality of alternating convolution units and up-sampling units.

[0119] In addition, the logic instructions in the memory 730 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0120] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the rectal lesion detection method provided in the above embodiments, the method comprising: inputting a rectal image to be identified into an encoding module in a rectal detection model to obtain an encoding vector output by the encoding module, the encoding module comprising a plurality of alternating convolution units and pooling units; inputting the encoding vector into a decoding module in the rectal detection model to obtain a rectal lesion detection result output by the decoding module, the decoding module comprising a plurality of alternating convolution units and upsampling units.

[0121] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the rectal lesion detection method provided in the above embodiments. The method includes: inputting a rectal image to be identified into an encoding module in a rectal detection model to obtain an encoding vector output by the encoding module, wherein the encoding module includes a plurality of alternating convolutional units and pooling units; inputting the encoding vector into a decoding module in the rectal detection model to obtain a rectal lesion detection result output by the decoding module, wherein the decoding module includes a plurality of alternating convolutional units and upsampling units.

[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting rectal lesions, characterized in that, The method comprises the following steps: inputting a to-be-recognized rectum image into an encoding module in a rectum detection model to obtain an encoding vector output by the encoding module, the encoding module comprising a plurality of alternating convolution units and pooling units; inputting the encoding vector into a decoding module in the rectum detection model to obtain a rectum lesion detection result output by the decoding module, the decoding module comprising a plurality of alternating convolution units and up-sampling units.

2. The rectal lesion detection method according to claim 1, characterized by, The method comprises the following steps: inputting a to-be-recognized rectum image into an encoding module in a rectum detection model to obtain an encoding vector output by the encoding module, the encoding module comprising a plurality of alternating convolution units and pooling units; inputting the to-be-recognized rectum image into a first encoding layer of the encoding module to obtain a first encoding feature map output by the first encoding layer, the first encoding layer comprising a convolution unit and a max-pooling unit connected in sequence; inputting the first encoding feature map into a second encoding layer of the encoding module to obtain a second encoding feature map output by the second encoding layer, the second encoding layer comprising a convolution unit and a max-pooling unit connected in sequence; inputting the second encoding feature map into a third encoding layer of the encoding module to obtain a third encoding feature map output by the third encoding layer, the third encoding layer comprising a convolution unit and a max-pooling unit connected in sequence; inputting the third encoding feature map into a fourth encoding layer of the encoding module to obtain a fourth encoding feature map output by the fourth encoding layer, the fourth encoding layer comprising a convolution unit and a max-pooling unit connected in sequence; 3. The rectal lesion detection method according to claim 2, characterized by, inputting the fourth encoding feature map into a fifth encoding layer of the encoding module to obtain an encoding vector output by the fifth encoding layer, the fifth encoding layer comprising a convolution unit.

4. The rectal lesion detection method according to claim 2, characterized by, Each of the convolution units comprises two convolution networks connected in sequence, and each of the convolution networks comprises a convolution layer, a batch normalization layer and an activation layer connected in sequence. The method comprises the following steps: inputting the encoding vector into a first decoding layer of the decoding module to obtain a first decoding feature map output by the first decoding layer, the first decoding layer comprising an up-sampling layer, a concatenation layer and a convolution layer connected in sequence; inputting the first decoding feature map into a second decoding layer of the decoding module to obtain a second decoding feature map output by the second decoding layer, the second decoding layer comprising an up-sampling layer, a concatenation layer and a convolution layer connected in sequence; inputting the second decoding feature map into a third decoding layer of the decoding module to obtain a third decoding feature map output by the third decoding layer, the third decoding layer comprising an up-sampling layer, a concatenation layer and a convolution layer connected in sequence; 5. The rectal lesion detection method according to claim 4, characterized by, inputting the third decoding feature map into a fourth decoding layer of the decoding module to obtain a rectum lesion detection result output by the fourth decoding layer. The method comprises the following steps: inputting the third decoding feature map into a fourth decoding layer of the decoding module to obtain a rectum lesion detection result output by the fourth decoding layer. input the intermediate feature map to a first feature extraction unit of the fourth decoding layer to obtain a first intermediate feature output by the first feature extraction unit, the first feature extraction unit comprising a 3*3 convolutional layer, and the intermediate feature map being obtained by processing the to-be-identified rectum image by the convolutional units in the first encoding layer; perform up-sampling on the third decoding feature map, and then input the up-sampled third decoding feature map to a second feature extraction unit of the fourth decoding layer to obtain a second intermediate feature output by the second feature extraction unit, the second feature extraction unit comprising a pooling layer and a 1*1 convolutional layer connected in sequence; fuse the first intermediate feature and the second intermediate feature to obtain a fused feature; perform up-sampling on the fused feature, and then use an S-shaped function to map the up-sampled fused feature to obtain the rectum lesion detection result and output the rectum lesion detection result.

6. The rectal lesion detection method according to any one of claims 1 to 5, characterized by, The rectum detection model is trained based on the following steps: input a training sample into the rectum detection model to obtain a corresponding prediction result output by the rectum detection model; based on the prediction result and a true result corresponding to the training sample, calculate a loss value; based on the loss value, adjust parameters of the rectum detection model until the loss value is less than a preset threshold or a training number reaches a preset number; use the model parameters when the loss value is less than the preset threshold or the training number reaches the preset number as the model parameters of the trained rectum detection model.

7. A device for detecting a rectal lesion, the device comprising: comprise: an input module configured to input a to-be-identified rectum image into an encoding module in a rectum detection model to obtain an encoding vector output by the encoding module, the encoding module comprising a plurality of alternating convolutional units and pooling units; an output module configured to input the encoding vector into a decoding module in the rectum detection model to obtain a rectum lesion detection result output by the decoding module, the decoding module comprising a plurality of alternating convolutional units and up-sampling units.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the rectum lesion detection method according to any one of claims 1 to 6. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the rectum lesion detection method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the rectum lesion detection method according to any one of claims 1 to 6.