Colorectum image segmentation method and electronic equipment thereof
Through the combination of multi-scale feature extraction and dynamic serpentine convolutional nucleus, the complex structural problem of colorectal segmentation is solved, high-precision colorectal segmentation is achieved, and the safety and effectiveness of cervical cancer radiotherapy is improved.
Patent Information
- Application Number
- CN202510235714.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-07-08
AI Technical Summary
The prior art is difficult to accurately segment the complex structure of the colorectal, especially in cervical cancer internal radiotherapy, segmentation discontinuity and error caused by the unique tubular morphology of the colorectal and the motor artifacts affect the safety and effectiveness of radiotherapy.
The multi-scale feature extraction and dynamic serpentine convolution kernels are used to extract the local and global features of colorectal images through convolution kernels of different sizes. Combined with adaptive image enhancement and encoder-decoder structure, the segmentation results are optimized using Dice loss function, cross entropy loss function and boundary loss function.
It significantly improves the accuracy and efficiency of colorectal segmentation, reduces missed segmentation, optimizes the distribution of radiotherapy doses, ensures the safety of organs that endangers the body, and improves the overall quality and safety of radiotherapy for cervical cancer.
Smart Images

Figure CN120278949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing and applications, and particularly to a colorectal image segmentation method and an electronic device thereof. Background Art
[0002] In the field of tumor treatment, cervical cancer is one of the major diseases seriously endangering the lives and health of women globally. Radiotherapy is an important treatment method, and brachytherapy occupies a key position in the treatment of cervical cancer due to its unique advantages.
[0003] Brachytherapy can achieve high-dose concentrated irradiation of tumor tissues by precisely implanting radioactive sources inside or near the tumor. In the treatment of cervical cancer, this precise local irradiation method can effectively kill cancer cells. Compared with external radiotherapy and other means, it can more accurately focus on the tumor and significantly improve the local tumor control rate. The treatment process is to accurately place the radioactive source at the tumor position with the help of an implanting needle to achieve high-dose local treatment. However, while the radioactive source plays a therapeutic role, it also brings potential risks. If the dose distribution cannot be accurately controlled, excessive radiation will cause serious harm to the surrounding normal tissues, trigger a series of complications, and greatly affect the patient's quality of life and subsequent rehabilitation effect.
[0004] In the brachytherapy of cervical cancer, the colorectum, as an important critical organ, its accurate segmentation plays an indispensable role in optimizing the radiotherapy dose distribution. There is a certain anatomical relationship between the position and shape of the colorectum and the cervical part. Precisely identifying and segmenting the colorectum can enable doctors to clearly understand its relative position relationship with the tumor. Then, when formulating a radiotherapy plan, the radiation dose and irradiation range can be reasonably adjusted according to the actual situation of the colorectum. By avoiding unnecessary irradiation of the colorectum, the damage caused by radiation to it can be effectively reduced, and the occurrence of side effects such as intestinal dysfunction and radiation enteritis can be reduced, ensuring the safety and tolerance of patients during the treatment process, which is of extremely important significance for improving the overall effect of brachytherapy for cervical cancer and improving the prognosis of patients.
[0005] However, currently, due to the complex anatomical structure of the colorectum itself, such as its unique tubular shape, motion artifacts and other factors, coupled with the problem of the degradation of CT image quality caused by radioactive sources in the brachytherapy data of cervical cancer, the accurate segmentation of the colorectum faces huge challenges, and new technical methods are urgently needed to achieve a breakthrough.
[0006] Traditional segmentation methods used to hold an important position in the field of medical image segmentation. Threshold-based methods attempt to distinguish pixels of different tissues by presetting gray thresholds, which have certain effects in simple image scenarios. Edge detection methods, on the other hand, use edge detection operators such as Canny to identify the boundary contours of organs in the image. Region growing methods start from selected seed points and gradually expand the region outward according to the similarity criterion of pixels to achieve the purpose of segmentation. However, these traditional methods face many difficulties in the segmentation of colorectal CT of organs at risk in cervical cancer. With the development of technology, deep learning-based segmentation methods have gradually become the mainstream. U-Net and its improved versions such as U-Net++, Dense-U-Net, and Attention-U-Net, etc., have made certain progress in various medical image segmentation tasks by using their unique encoder-decoder architecture and related optimization measures. But in the scenario of colorectal CT segmentation in intracavitary radiotherapy for cervical cancer, these methods still have limitations.
[0007] When using traditional segmentation methods for colorectal CT segmentation in cervical cancer, threshold-based methods are affected by the characteristics of colorectal soft tissues and individual differences, and it is impossible to determine an appropriate threshold, resulting in large segmentation deviations; edge detection methods are difficult to accurately capture fuzzy boundaries due to the interference of intestinal folds and motion artifacts, resulting in discontinuous segmentation; region growing methods are prone to overgrowth or undergrowth due to the similarity of surrounding tissues and the complexity of the colorectal structure, and cannot meet the clinical accuracy requirements. Among deep learning-based methods, U-Net and its improved versions have insufficient understanding of the complex structure of the colorectum in intracavitary radiotherapy for cervical cancer, and perform poorly in dealing with situations such as local dilation, bending, and adhesion, and are prone to errors in complex parts; deep learning methods for other tumors cannot be directly applied and are difficult to cope with their unique challenges due to the anatomical and imaging differences between the colorectum and other tumors. Summary of the Invention
[0008] In order to solve the defect that due to factors such as the unique tubular shape of the colorectum itself and motion artifacts, the existing technical methods do not have enough understanding of the complex structure of the colorectum and cannot accurately segment it, the present invention proposes a method for segmenting colorectal images.
[0009] The technical solution adopted by the present invention is a colorectal image segmentation method, including S100, obtaining a colorectal image; S300, multi-scale feature extraction, respectively using at least three different-sized convolutional kernels to extract local and global features of the colorectal image to obtain multi-scale feature maps; S500, offset calculation, learning the features of the multi-scale feature maps, and changing the positions of the convolutional kernels according to the learned offsets to generate dynamic snake-shaped convolutional kernels; S600, performing dynamic snake-shaped convolution, inputting the multi-scale features into the snake-shaped convolutional kernels for convolution, and obtaining tubular feature maps of different scales after convolution; S700, feature map fusion and conversion, fusing the extracted feature maps of different scales to obtain a total feature map, and converting the total feature map into a segmentation map.
[0010] Preferably, in step S500, according to the feature maps of different scales extracted by convolutional kernels of different sizes, a small convolutional neural network is used to learn their features, and offsets of convolutional kernels of different sizes are respectively generated. This can solve the problem of how to obtain accurate offsets.
[0011] Preferably, after step S100 and before step S300, it further includes S210, image enhancement, using an adaptive histogram equalization algorithm to perform image enhancement on the colorectal image. This helps to improve the distinguishability of the image, enabling the network to better identify the colorectal region.
[0012] Preferably, after step S100 and before step S300, it further includes S220, data augmentation, using techniques such as random cropping, left-right flipping, and up-down flipping to perform data augmentation on the colorectal image. This increases the diversity of training data, avoids model overfitting, and further improves the generalization ability of the model.
[0013] Preferably, the colorectal image segmentation method is implemented using a network architecture with an encoder-decoder structure, and skip connections are introduced between the encoder and the decoder. This can retain the detailed information at the bottom layer of the colorectal image and avoid feature loss.
[0014] Preferably, after step S700, it further includes S800, model optimization, combining the Dice loss function, cross-entropy loss function, and boundary loss function to evaluate the difference between the predicted result and the actual result.
[0015] Preferably, the total loss function in step S800 is expressed as: total loss function = λ1 × Dice loss function + λ2 × cross-entropy loss function + λ3 × boundary loss function.
[0016] To solve the defect that due to factors such as the unique tubular morphology and motion artifacts of the colorectum, existing electronic devices cannot accurately segment the complex structure of the colorectum due to insufficient understanding of it, the present invention proposes an electronic device.
[0017] The technical solution adopted by the present invention is an electronic device, including: a processor and a memory. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method as described in any one of the above.
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] The present invention aims to overcome the defects of the prior art, design multi-scale feature extraction convolutional kernels, and use convolutional kernels of different sizes to extract local and global features of images respectively; dynamic convolution dynamically adjusts the convolutional kernels to extract information of different scales, enhancing the network's recognition ability for the complex morphology of the colorectum. Compared with the traditional segmentation method, the present invention automatically extracts features by deep learning, without the need for manual cumbersome parameter adjustment, significantly improving the segmentation efficiency and accuracy, and reducing human errors. Compared with the general CNN segmentation network, the present invention enhances the image contrast through an adaptive image enhancement algorithm, reduces the impact of the radiation source on the image quality, and makes the colorectum area clearer. Through multi-scale convolution and dynamic convolution, the perception of the colorectal structure is enhanced, the topological structure accuracy can be better maintained, the colorectal boundary can be tracked more accurately in a complex imaging environment, effectively reducing missegmentation and optimizing the radiotherapy dose distribution. It enhances the ability to handle complex organs and low-quality images, ensures the safety of critical organs, and thus improves the overall quality and safety of cervical cancer radiotherapy. A colorectal image segmentation method and its electronic device disclosed in this application can achieve the purpose of accurately understanding and segmenting the complex structure of the colorectum. Description of the Drawings
[0020] The present invention will be described in detail below in conjunction with the embodiments and the drawings, where:
[0021] Figure 1 It shows a schematic flowchart of a colorectal image segmentation method provided by an embodiment of the present invention;
[0022] Figure 2 It shows a network structure diagram of a colorectal image segmentation method provided by an embodiment of the present invention;
[0023] Figure 3 It shows a multi-scale dynamic convolution diagram in a colorectal image segmentation method provided by an embodiment of the present invention. Detailed Embodiments
[0024] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below in conjunction with the accompanying drawings. Examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar components or components with the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation to the present invention.
[0025] When using traditional segmentation methods for colorectal CT segmentation in cervical cancer, threshold-based methods are affected by the characteristics of colorectal soft tissues and individual differences, making it impossible to determine an appropriate threshold, resulting in large segmentation deviations; boundary detection methods are difficult to accurately capture fuzzy boundaries due to intestinal folds and motion artifacts, causing discontinuous segmentation; region growing methods are prone to overgrowth or undergrowth due to the similarity of surrounding tissues and the complexity of the colorectal structure, and cannot meet the clinical accuracy requirements. Among deep learning-based methods, U-Net and its improved versions have insufficient understanding of the complex structure of the colorectum in intracavitary radiotherapy for cervical cancer, perform poorly in dealing with local dilation, bending, adhesion, etc., and are prone to errors in complex parts; deep learning methods for other tumors cannot be directly applied and are difficult to address their unique challenges due to the anatomical and imaging differences between the colorectum and other tumors.
[0026] The present invention discloses a colorectal image segmentation method. Please refer to Figures 1 to 3 , including:
[0027] S100. Obtain a colorectal image;
[0028] S300. Extract multi-scale features, and respectively use at least three different sizes of convolutional kernels to extract local features and global features of the colorectal image to obtain multi-scale feature maps;
[0029] S500. Calculate the offset, learn the features of the multi-scale feature maps, and change the positions of the convolutional kernels according to the learned offsets to generate dynamic snake-shaped convolutional kernels of different sizes;
[0030] S600. Perform dynamic snake-shaped convolution, input the multi-scale feature maps into the dynamic snake-shaped convolutional kernels for convolution, and obtain tubular feature maps of different scales after convolution;
[0031] S700. Feature map fusion and conversion, fuse the extracted tubular feature maps of different scales to obtain a total feature map, and convert the total feature map into a segmentation map.
[0032] Step S100 obtains a colorectal image. The colorectal image is used as the initial material for segmentation and should first be obtained. In addition to common CT (Computed Tomography) images, the obtained colorectal image can also be a medical disease diagnosis and treatment image such as an MRI (Magnetic Resonance Imaging) image, an ultrasound image, or an X-ray image. In addition, since the colorectal region in the human body is relatively large, to capture a clear colorectal image of the lesion location, the obtained colorectal image is a partial colorectal image. Obviously, it can also be a complete colorectal image.
[0033] In other embodiments, in step S100, the first colorectal image and the second colorectal image can be captured simultaneously. The second colorectal image is a part of the first colorectal image. The sizes and resolutions of these two parts of the image are the same. Further steps are performed on the two parts of the image so that the features extracted from the two parts of the image can corroborate each other during the segmentation process to trace a more accurate colorectal boundary. The second colorectal image can be the boundary region or the lesion region of the colorectum. Further, the second colorectal image can be incorporated into the first colorectal image to obtain a third colorectal image. The third colorectal image has a higher resolution in the boundary region or the lesion region of the colorectum, and the required features can be obtained more easily when extracting features from the third colorectum.
[0034] It should be noted that convolution kernels of different sizes can extract local or global features of the colorectal image simultaneously / separately. Whether to extract simultaneously or separately depends on the computing power during the segmentation process. Obviously, the speed is faster when extracting local or global features of the colorectal image simultaneously.
[0035] Step S300 performs multi-scale feature extraction. Three types of convolution kernels with fixed sizes are used. Three convolution kernels with different sizes can extract local and global features of the colorectal image simultaneously. That is, there are differences in the features that can be extracted between the large-size convolution kernel and the small-size convolution kernel. There are cases where the large-size convolution kernel cannot extract the features extracted by the small-size convolution kernel, or the small-size convolution kernel cannot extract the features extracted by the large-size convolution kernel. Through the fusion of multi-scale information, the network can more accurately identify the complex morphology of the colorectum. Especially when dealing with irregular and blurred regions, the robustness and accuracy of the segmentation can be improved.
[0036] Specifically, a multi-scale convolutional layer group is designed, and convolution kernels of different sizes are used respectively. Among them, a small 3*3 convolution kernel captures local detail features such as the folds and boundaries of the colorectum; a medium 5*5 convolution kernel extracts medium-scale features such as the local morphology of the colorectum; a large 7*7 convolution kernel obtains global context information such as the overall trend of the colorectum. Among them, there are at least three convolution kernels of different sizes, and other numbers of convolution kernels exceeding three can also be set.
[0037] Step S500 Offset Calculation. The offsets of the multi-scale feature convolution kernels can be generated according to the neural network or directly obtained from historical data or practical experience. Based on the generated offsets, the positions of the convolution kernels can be changed to form snake-shaped convolution kernels more suitable for the geometric structure of colorectal images. Since the shape of the colon and rectum is tubular, the features of colorectal images tend to be distributed along the geometric structure of the colorectal images. Therefore, by performing convolution with the snake-shaped convolution kernels along the geometric structure of the colorectal images, more features with less noise can be obtained.
[0038] Specifically, the offsets of the convolution kernels for learning multi-scale features can be obtained according to different local and global features, and multiple offsets can be obtained. The multiple offsets are respectively corresponding to convolution kernels of different sizes, so that the positions of the convolution kernels of different sizes are changed according to different offsets respectively. Preferably, only one offset is obtained for the offsets of the convolution kernels for learning multi-scale features, and this one offset changes the positions of the convolution kernels of different sizes, which helps to improve the tightness of the connection between the different-scale feature maps obtained subsequently.
[0039] Among them, the number of snake-shaped convolution kernels of different sizes is related to the number of convolution kernels of different sizes.
[0040] In addition, the snake-shaped convolution kernel is different from the ordinary square convolution kernel. The most basic form of the snake-shaped convolution kernel is a long strip. The long strip can be bent and folded, and branches may also be formed on the main body of the long strip to form a dendritic structure. This form is the snake shape described in this application.
[0041] Step S600 Perform Dynamic Snake Convolution. Since the colon and rectum in colorectal images have different shapes, directions and sizes at different positions, it is necessary to dynamically generate convolution kernels of different sizes and shapes to achieve the purpose of easily obtaining and matching features. The snake-shaped convolution kernels can be dynamically generated according to the features of the input colorectal images, so that the network can adaptively adjust the shape of the snake-shaped convolution kernels according to different colorectal image contents. Especially when dealing with complex colorectal morphologies, relevant features can be extracted more accurately. The adaptive characteristics of dynamic convolution help to improve the network's ability to process the complex boundaries of the intestinal structure, especially the folds, bends and adhesions in the intestine.
[0042] Step S700: Feature map fusion and transformation. After extracting local or global features through convolutional kernels of different sizes, it is necessary to fuse the features to obtain the total feature map. The feature fusion method can be element-wise fusion such as addition or multiplication, or feature map-level fusion such as concatenation. Before fusion, element confidence weights or feature map confidence weight parameters can be introduced to obtain a more reliable total feature map. After obtaining the total feature map, it is converted into a segmentation map to achieve high-quality and high-precision image segmentation.
[0043] Compared with traditional segmentation methods, the present invention automatically extracts features using deep learning, eliminating the need for manual and cumbersome parameter adjustment, significantly improving the segmentation efficiency and accuracy, and reducing human errors. Compared with general CNN segmentation networks, the present invention enhances the image contrast through an adaptive image enhancement algorithm, reduces the impact of radiation sources on the image quality, and makes the colorectal region clearer. The multi-scale approach enhances the perception of the colorectal structure through convolution and dynamic convolution, better maintains the topological structure accuracy, more accurately tracks the colorectal boundary in complex imaging environments, effectively reduces missegmentation, and optimizes the radiotherapy dose distribution. A colorectal image segmentation method and its electronic device disclosed in this application can achieve the purpose of accurately understanding and segmenting the complex structure of the colorectum.
[0044] In some embodiments, in step S500, according to the feature maps of different scales extracted by convolutional kernels of different sizes, a small convolutional neural network is used to learn their features, and the offsets of convolutional kernels of different sizes are generated respectively.
[0045] Specifically, the offsets of convolutional kernels of different sizes are obtained by a small convolutional neural network learning the feature maps of different scales extracted by convolutional kernels of different sizes. Since the self-feature maps are used as the original materials for learning, the obtained offsets and weights have a strong correlation for different convolutional kernels, making the offset direction more accurate. Also, since the learning is performed by a small convolutional neural network, the accuracy of the obtained offsets can be guaranteed. This offset is predicted by a special convolutional layer (offset_conv). This convolutional layer is usually a small convolutional kernel (such as 3x3) for learning the offset from the feature map.
[0046] It should be noted that for the tubular structure of the colorectal image, the feature map formed after dynamic convolution of the snake-shaped convolutional kernel is used as the tubular feature map, so as to obtain the tubular feature map that matches the tubular structure, avoid the influence of features outside the tubular feature map on subsequent segmentation, and further achieve the accurate segmentation of the colorectal image.
[0047] In some embodiments, after step S100 and before step S300, it further includes:
[0048] S210. Image enhancement: The colorectal images are enhanced using the adaptive histogram equalization algorithm.
[0049] The CT images are enhanced using the CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm to improve the image contrast and reduce the impact of the radiation source on the image quality. This method helps to improve the resolvability of the images, enabling the network to better identify the colorectal region.
[0050] Specifically, after step S100 and before step S200, data preprocessing is included, which is divided into image enhancement and data augmentation. For image enhancement, the CLAHE algorithm is used to enhance the CT images: First, the CT images are divided into several small blocks, and histogram equalization is performed on each small block; then, by restricting the amplitude of contrast enhancement, over-enhancement of noise is avoided; finally, an interpolation method is used to eliminate the boundary effects between the blocks and generate a smooth enhanced image. For data augmentation, techniques such as random cropping, left-right flipping, and up-down flipping are used to increase the diversity of the training data and avoid model overfitting.
[0051] In some embodiments, after step S100 and before step S300, it further includes:
[0052] S220. Data augmentation: The colorectal images are augmented using techniques such as random cropping, left-right flipping, and up-down flipping.
[0053] Data augmentation techniques, such as random cropping, left-right flipping, and up-down flipping, are applied to increase the diversity of the training data, avoid model overfitting, and further improve the generalization ability of the model.
[0054] In some embodiments, the colorectal image segmentation method is implemented using a network architecture with an encoder-decoder structure, and skip connections are introduced between the encoder and the decoder.
[0055] In terms of the network architecture, the present invention adopts an encoder-decoder structure, combined with dynamic convolution and multi-scale feature extraction. In the encoder part, through multiple convolutional layers and pooling layers, downsampling is gradually performed to extract high-level semantic features; in the decoder part, the image size is gradually restored through transposed convolutional layers and upsampling operations to reconstruct the final segmentation result. To retain the underlying detail information and avoid feature loss, the present invention introduces skip connections between the encoder and the decoder, enabling the decoder to make full use of the underlying detail features when restoring the image. In the decoder stage, the dynamic convolution module can further enhance the adaptability of the network to complex colorectal morphologies and improve the segmentation accuracy.
[0056] In some embodiments, after step S700, it further includes:
[0057] S800. Model optimization, evaluating the difference between the predicted result and the actual result by combining the Dice loss function, cross-entropy loss function, and boundary loss function.
[0058] In the design of the loss function, the present invention combines the Dice loss function, cross-entropy loss function, and boundary loss function. The Dice loss function can effectively improve the overlapping area between the predicted result and the true label, enhancing the segmentation accuracy; the cross-entropy loss function optimizes the network's ability to distinguish different regions (such as the colorectum and the background) from the classification perspective, enhancing the stability of the model; the boundary loss function further improves the segmentation accuracy of the colorectum boundary, especially in complex regions (such as the folds and adhesions of the intestine), making the segmentation result more precise and accurate.
[0059] In some specific embodiments, the total loss function in step S800 is expressed as: Total loss function = λ1 × Dice loss function + λ2 × Cross-entropy loss function + λ3 × Boundary loss function.
[0060] Among them, different loss functions are combined and calculated by weighted summation, Total Loss = λ1 × Dice Loss + λ2 × CrossEntropy Loss + λ3 × Boundary Loss, where λ1, λ2, and λ3 respectively represent the weights of different loss functions. Preferably, λ1, λ2, and λ3 will be tried or learned and trained in the segmentation method to obtain the optimal weights.
[0061] Select the cross-entropy loss function and the boundary loss function to combine for optimizing the network parameters. The cross-entropy loss function optimizes the network's ability to distinguish different regions (such as the colorectum and the background) from the classification perspective, and its formula is as follows:
[0062]
[0063] The boundary loss function calculates the distance between the predicted boundary and the true boundary, minimizes the boundary error, and improves the boundary segmentation accuracy. Its formula is as follows:
[0064]
[0065] The present invention also discloses an electronic device, including: a processor and a memory. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method as described above.
[0066] The electronic device includes a processor and a memory. Optionally, the electronic device further includes an input device and an output device. The processor, the memory, the input device, and the output device are coupled through a connector, which includes various interfaces, transmission lines, buses, etc., and the embodiments of the present application do not limit this. It should be understood that in various embodiments of the present application, coupling means being interconnected in a specific manner, including being directly connected or indirectly connected through other devices. For example, they can be connected through various interfaces, transmission lines, buses, etc.
[0067] The processor may include one or more processors. For example, it includes one or more central processing units (CPUs). When the processor is a single CPU, the CPU can be a single-core CPU or a multi-core CPU. Optionally, the processor can be a processor group composed of multiple CPUs, and the multiple processors are coupled to each other through one or more buses. Optionally, the processor can also be other types of processors, etc., and the embodiments of the present application do not limit this.
[0068] The memory can be used to store computer program instructions and various computer program codes including the program codes for executing the solution of the present application. Optionally, the memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), and the memory is used for relevant instructions and data.
[0069] The input device is used to input data and / or signals, and the output device is used to output data and / or signals. The input device and the output device can be independent devices or an integrated device.
[0070] It can be understood that in the embodiments of the present application, the memory can not only be used to store relevant instructions but also relevant data. For example, the memory can be used to store the target ultrasonic image, the first foreground image, and the background image obtained through the input device, or the memory can also be used to store the first target image obtained through the processor, etc. The embodiments of the present application do not limit the specific data stored in the memory.
[0071] In practical applications, the electronic device may also separately include necessary other components, including but not limited to any number of input / output devices, processors, memories, etc., and all electronic devices that can implement the embodiments of the present application are within the protection scope of the present application.
[0072] In the description of this specification, when terms such as "Example 1", "this example", and "in one example" appear, it means that the specific features, structures, materials, or characteristics described in connection with the example or example are included in at least one example or example of the invention or invention. In this specification, the schematic expression of the above terms does not necessarily refer to the same example or example; moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more examples or examples.
[0073] In the description of this specification, terms such as "connection", "installation", "fixation", "setting", "having", etc. are all understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0074] In the description of this specification, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article, or device including the said element.
[0075] The above description of the embodiments is for the convenience of those of ordinary skill in the art to understand and apply the technology of this case. Obviously, those who are familiar with the technology in this field can easily make various modifications to these examples and apply the general principles described herein to other embodiments without creative labor. Therefore, this case is not limited to the above embodiments, and modifications in the following several situations should all be within the protection scope of this case: ① A new technical solution implemented based on the technical solution of the present invention and combined with the existing common general knowledge, and the technical effect produced by this new technical solution does not exceed the technical effect of the present invention; ② An equivalent replacement of some features of the technical solution of the present invention using well-known technologies, and the technical effect produced is the same as the technical effect of the present invention; ③ Expansion based on the technical solution of the present invention, and the substantial content of the expanded technical solution does not exceed the technical solution of the present invention; ④ An equivalent transformation made using the content of the specification and drawings of the present invention, directly or indirectly applied in other related technical fields.
Claims
1. A colorectal image segmentation method, characterized in that, Including: S100. Obtain a colorectal image; S300. Multi-scale feature extraction, using at least three different-sized convolutional kernels to extract local and global features of the colorectal image respectively to obtain multi-scale feature maps; S500. Offset calculation, learning the features of the multi-scale feature maps and changing the positions of the convolutional kernels according to the learned offsets, thereby generating dynamic serpentine convolutional kernels; S600. Perform dynamic serpentine convolution, inputting the multi-scale feature maps into the dynamic serpentine convolutional kernels for convolution, and obtaining tubular feature maps of different scales after convolution; S700. Feature map fusion and conversion, fusing the extracted tubular feature maps of different scales to obtain a total feature map, and converting the total feature map into a segmentation map.
2. The colorectal image segmentation method according to claim 1, characterized in that, In the step S500, according to the feature maps of different scales extracted by the convolutional kernels of different sizes, learning their features through a small convolutional neural network, and respectively generating offsets of the convolutional kernels of different sizes.
3. A colorectal image segmentation method according to claim 1 or 2, characterized in that After the step S100 and before the step S300, it further includes: S210. Image enhancement, using an adaptive histogram equalization algorithm to perform image enhancement on the colorectal image.
4. A colorectal image segmentation method according to claim 1 or 2, characterized in that, After the step S100 and before the step S300, it further includes: S220. Data augmentation, using techniques such as random cropping, left-right flipping, and up-down flipping to perform data augmentation on the colorectal image.
5. A colorectal image segmentation method according to claim 1 or 2, characterized in that The colorectal image segmentation method is implemented using a network architecture with an encoder-decoder structure, and a skip connection is introduced between the encoder and the decoder.
6. A colorectal image segmentation method according to claim 1 or 2, characterized in that, After the step S700, it further includes: S800. Model optimization, evaluating the difference between the predicted result and the actual result by combining the Dice loss function, the cross-entropy loss function, and the boundary loss function.
7. A colorectal image segmentation method according to claim 6, characterized in that The total loss function in the step S800 is expressed as: Total loss function = λ1 × Dice loss function + λ2 × cross-entropy loss function + λ3 × boundary loss function.
8. An electronic device, characterized in that, Including: A processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1 to 7.