Medical image segmentation method and system, computer equipment and storage medium
By using convolutional neural networks, multi-scale feature fusion, attention mechanism, conditional random field and morphological operations in medical image segmentation, combined with anatomical prior images, the problem of difficulty in identifying small anatomical structures in the existing technology is solved, and the problem of improving the problem of improving the The accuracy and detail of medical image segmentation.
Patent Information
- Application Number
- CN202410984032.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing medical image segmentation technology is sensitive to image noise and it is difficult to correctly identify small anatomical structures such as airways and blood vessels, resulting in insufficient segmentation accuracy, limiting the application of medical image analysis.
Pre-set convolutional neural network is used for preliminary segmentation, combining multi-scale feature fusion and attention mechanism optimization segmentation results, using conditional random field and morphological operations to adjust boundaries, obtain anatomical prior images for type screening, and generate detailed image segmentation reports .
It significantly improves the accuracy and accuracy of medical image segmentation, can better identify and segment the small structures of the lungs, provide detailed anatomical structure information, and provide clinicians with reliable diagnostic reference.
Smart Images

Figure CN118941590A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image segmentation, and in particular to a medical image segmentation method, system, computer device and storage medium. Background Art
[0002] At present, with the development of computer technology and medical imaging technology, medical image segmentation technology has gradually become one of the key technologies in medical image analysis because medical image segmentation methods can meet the needs of accurate diagnosis and treatment and improve the efficiency of automated analysis.
[0003] Existing medical image segmentation technologies mainly use threshold method, region growing method and morphological method. Since threshold method, region growing method and morphological method all rely on the gray value and local features of the image, these existing medical image segmentation methods are sensitive to image noise and have limited effects when processing complex structures, resulting in insufficient image segmentation accuracy. When using existing medical image segmentation methods to process small anatomical structures (such as airways and blood vessels), the airways and blood vessels are too dense in the image, and it is difficult to correctly identify each airway and blood vessel using existing medical image segmentation methods, which increases the difficulty of image segmentation and limits the application of medical image segmentation technology in medical image analysis.
[0004] The above-mentioned prior art solutions have the following defects: the segmentation accuracy of traditional medical image segmentation methods is low, so there is room for improvement. Summary of the invention
[0005] In order to improve the accuracy of medical image segmentation, the present application provides a medical image segmentation method, system, computer device and storage medium.
[0006] The above-mentioned invention objective of the present application is achieved through the following technical solutions: A medical image segmentation method, the medical image segmentation method comprising: Acquire a lung detection image, perform preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result; The optimized segmentation result is adjusted by using conditional random fields and morphological operations in sequence to obtain a standard segmentation result; An anatomical prior image is acquired, the standard segmentation result is screened by type according to the anatomical prior image, and an image segmentation report is generated according to the screening result.
[0007] By adopting the above technical solution, by using the preset convolutional neural network to perform preliminary segmentation of the lung detection image, the advantages of the deep learning model in feature extraction and image segmentation can be fully utilized to ensure the accuracy and detail integrity of the preliminary segmentation results. Through multi-scale feature fusion, structures of different scales and sizes in the image can be processed simultaneously, especially the detection ability of the fine lung structure is significantly enhanced. Through the attention mechanism, it can focus more on the key areas and important feature channels in the image, thereby further improving the accuracy of segmentation, so that the model can better identify and segment the fine lung structure; by considering the spatial relationship and contextual information between pixels through the conditional random field model, the segmentation boundary can be effectively optimized to make it smoother and more accurate, and the accuracy and coherence of the segmentation can be improved. The adjusted segmentation results are further processed through morphological operations to eliminate unnecessary impurity data, so that the segmentation results are smoother and more accurate; by obtaining anatomical prior images and screening the type of standard segmentation results according to the anatomical prior images, different types of anatomical structures such as airways and blood vessels can be effectively identified and classified. The image segmentation report generated according to the screening results provides detailed statistical information and quantitative analysis of the segmented area, providing a reliable reference for clinicians.
[0008] In one example, the present application may be further configured as follows: performing preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimizing the preliminary segmentation result through multi-scale feature fusion and attention mechanism, specifically including: Using a convolutional neural network with a UNet structure to perform image segmentation on the lung detection image to obtain the preliminary segmentation result; Introducing a feature pyramid network into the convolutional neural network to perform multi-scale feature fusion; Through the self-attention mechanism, the detection ability of small lung structures is enhanced, and through the attention mechanism, the selective attention to different feature channels is enhanced.
[0009] By adopting the above technical solution, the lung detection image is segmented by using the convolutional neural network with UNet structure, giving full play to the advantages of UNet in medical image segmentation, and introducing the feature pyramid network for multi-scale feature fusion, so that the model can effectively process structures of different scales, especially the small structure of the lung; through the application of self-attention mechanism and channel attention mechanism, the model's attention to important features is further enhanced, and the refinement and accuracy of the segmentation results are improved.
[0010] In one example, the present application may be further configured as follows: the convolutional neural network of the UNet structure specifically includes: A symmetrical encoder and decoder structure is adopted, wherein the encoder gradually downsamples the input image to extract features, and the decoder part gradually upsamples to restore the resolution; A skip connection is established between the encoder and the decoder to fuse features at different levels and improve segmentation accuracy.
[0011] By adopting the above technical solution and through the symmetrical encoder and decoder structure, the model can extract and restore features layer by layer, ensuring the segmentation results have high resolution and accuracy; by fusing different levels of features between the encoder and decoder through jump connections, the segmentation accuracy is improved, allowing the segmentation model to better capture the details and edge information in the image.
[0012] In one example, the present application may be further configured as follows: the optimized segmentation result is adjusted by using the conditional random field and the morphological operation in sequence to obtain a standard segmentation result, specifically including: Using a conditional random field model to fine-tune the boundary of the optimized segmentation result, and applying spatial context information of the conditional random field model to improve the accuracy of the segmentation result, thereby obtaining the adjusted segmentation result; The impurity data in the adjusted segmentation result is removed by using morphological operation to obtain the standard segmentation result.
[0013] By adopting the above technical solution, the boundary of the optimized segmentation result is finely adjusted through the conditional random field model, and the spatial context information is effectively used to improve the accuracy and consistency of the segmentation result. The conditional random field model optimizes the boundary of the segmentation result by iterative calculation and maximizing the joint probability between labels, making it more accurate and smooth; through morphological operations such as dilation and erosion, adjacent segmentation areas are connected and small noise areas are removed, further improving the consistency and accuracy of the segmentation result.
[0014] In one example, the present application may be further configured as follows: the use of morphological operations to remove impurity data in the adjusted segmentation result specifically includes: Dilation is used to connect adjacent segmented regions and fill internal holes. Erosion is performed to remove small noisy areas and shrink segmentation boundaries.
[0015] By adopting the above technical solution, through the dilation and erosion steps in the morphological operation, the adjacent segmented areas are effectively connected and the internal holes are filled, so that the segmentation result is more complete and coherent. At the same time, the erosion operation helps to remove small noise areas and shrink the segmentation boundaries, making the final segmentation result smoother and more accurate.
[0016] In one example, the present application may be further configured as follows: the acquiring of the anatomical prior image, screening of the standard segmentation results by type according to the anatomical prior image, and generating an image segmentation report according to the screening results, specifically including: The standard segmentation results are screened by type in combination with the prior knowledge image to obtain airway information and blood vessel information corresponding to the standard segmentation results; The image segmentation report is generated according to the airway information and the blood vessel information.
[0017] By adopting the above technical solution, the standard segmentation results are screened by type through anatomical prior images, and the anatomical knowledge is effectively used to improve the accuracy of the segmentation results. By identifying and classifying airway information and vascular information, a detailed image segmentation report can be generated, providing valuable reference for clinicians.
[0018] The second object of the invention is achieved by the following technical solutions: A medical image segmentation device, the medical image segmentation device comprising: A segmentation optimization module is used to obtain a lung detection image, perform preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result; A segmentation adjustment module, used to adjust the optimized segmentation result by using conditional random fields and morphological operations in sequence to obtain a standard segmentation result; The report generation module is used to obtain an anatomical prior image, perform type screening on the standard segmentation results according to the anatomical prior image, and generate an image segmentation report according to the screening results.
[0019] By adopting the above technical solution, by using the preset convolutional neural network to perform preliminary segmentation of the lung detection image, the advantages of the deep learning model in feature extraction and image segmentation can be fully utilized to ensure the accuracy and detail integrity of the preliminary segmentation results. Through multi-scale feature fusion, structures of different scales and sizes in the image can be processed simultaneously, especially the detection ability of the fine lung structure is significantly enhanced. Through the attention mechanism, it can focus more on the key areas and important feature channels in the image, thereby further improving the accuracy of segmentation, so that the model can better identify and segment the fine lung structure; by considering the spatial relationship and contextual information between pixels through the conditional random field model, the segmentation boundary can be effectively optimized to make it smoother and more accurate, and the accuracy and coherence of the segmentation can be improved. The adjusted segmentation results are further processed through morphological operations to eliminate unnecessary impurity data, so that the segmentation results are smoother and more accurate; by obtaining anatomical prior images and screening the type of standard segmentation results according to the anatomical prior images, different types of anatomical structures such as airways and blood vessels can be effectively identified and classified. The image segmentation report generated according to the screening results provides detailed statistical information and quantitative analysis of the segmented area, providing a reliable reference for clinicians.
[0020] The third objective of the present application is achieved through the following technical solutions: A computer device comprises 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 above-mentioned medical image segmentation method when executing the computer program.
[0021] The fourth objective of the present application is achieved through the following technical solutions: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned medical image segmentation method are implemented.
[0022] In summary, this application includes the following beneficial technical effects: 1. By using the preset convolutional neural network to perform preliminary segmentation of lung detection images, the advantages of deep learning models in feature extraction and image segmentation can be fully utilized to ensure the accuracy and detail integrity of the preliminary segmentation results. Through multi-scale feature fusion, structures of different scales and sizes in the image can be processed simultaneously, especially the detection ability of small lung structures is significantly enhanced. Through the attention mechanism, it can focus more on the key areas and important feature channels in the image, thereby further improving the accuracy of segmentation and enabling the model to better identify and segment the small structures of the lungs. By considering the spatial relationship and contextual information between pixels through the conditional random field model, the segmentation boundary can be effectively optimized to make it smoother and more accurate, and the accuracy and coherence of the segmentation can be improved. The adjusted segmentation results are further processed through morphological operations to remove unnecessary impurity data, making the segmentation results smoother and more accurate. By obtaining anatomical prior images and screening the type of standard segmentation results based on the anatomical prior images, different types of anatomical structures such as airways and blood vessels can be effectively identified and classified. The image segmentation report generated based on the screening results provides detailed statistical information and quantitative analysis of the segmented area, providing a reliable reference for clinicians. 2. By using the convolutional neural network with UNet structure to segment the lung detection image, the advantages of UNet in medical image segmentation are fully utilized, and the feature pyramid network is introduced to perform multi-scale feature fusion, so that the model can effectively process structures of different scales, especially the small structures of the lungs; through the application of self-attention mechanism and channel attention mechanism, the model's attention to important features is further enhanced, and the precision and accuracy of the segmentation results are improved; 3. The conditional random field model is used to fine-tune the boundaries of the optimized segmentation results, and the spatial context information is effectively used to improve the accuracy and consistency of the segmentation results. The conditional random field model optimizes the boundaries of the segmentation results by iterative calculation and maximizing the joint probability between labels, making them more accurate and smooth; through morphological operations such as dilation and erosion, adjacent segmentation areas are connected and small noise areas are removed, further improving the consistency and accuracy of the segmentation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of a medical image segmentation method in one embodiment of the present application; Figure 2 is a flowchart for implementing step S10 in the medical image segmentation method in one embodiment of the present application; Figure 3 is a flowchart for implementing step S11 in the medical image segmentation method in one embodiment of the present application; Figure 4 is a flowchart for implementing step S20 in the medical image segmentation method in one embodiment of the present application; Figure 5 is a flowchart for implementing step S22 in the medical image segmentation method in one embodiment of the present application; Figure 6 is a flowchart for implementing step S30 in the medical image segmentation method in one embodiment of the present application; Figure 7 is a principle block diagram of a medical image segmentation device in one embodiment of the present application; Figure 8 It is a schematic diagram of a device in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The present application is further described in detail below in conjunction with the accompanying drawings.
[0025] In one embodiment, if Figure 1 As shown, the present application discloses a medical image segmentation method, which specifically includes the following steps: S10: Acquire a lung detection image, use a preset convolutional neural network to perform preliminary segmentation on the lung detection image, obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result.
[0026] Specifically, after obtaining the lung detection image, the preset convolutional neural network is used to extract features from the input lung image through multi-layer convolution, pooling and activation function operations. These features are processed and abstracted layer by layer to perform preliminary segmentation on the lung detection image to obtain a preliminary segmentation result. Subsequently, features are extracted at different levels of the convolutional neural network through multi-scale feature fusion, and these features are fused to make full use of information at each scale, and different importance weights are assigned to the feature map according to the attention mechanism, so that the model can pay more attention to important areas and ignore irrelevant background noise, thereby improving the segmentation accuracy and obtaining an optimized segmentation result.
[0027] S20: Using conditional random fields and morphological operations in turn to adjust the optimized segmentation results to obtain standard segmentation results.
[0028] Specifically, the conditional random field technology is used to smooth the segmentation results by considering the dependencies between pixels, further eliminating noise and improving the continuity and accuracy of the segmentation boundaries. Morphological operations include erosion, dilation, opening and closing operations, which can remove small noise areas and fill holes, making the segmentation results more consistent with the actual morphology of the anatomical structure, and finally obtaining a standard segmentation result.
[0029] S30: Acquire an anatomical prior image, perform type screening on standard segmentation results according to the anatomical prior image, and generate an image segmentation report according to the screening results.
[0030] Specifically, an anatomical prior image is obtained, which provides additional information about the anatomical structure. This information is used to perform type screening on the standard segmentation results, and the airways and blood vessels therein are classified to obtain the corresponding screening results. Subsequently, an image segmentation report is generated based on the screening results. The report contains detailed segmentation results and anatomical structure information, providing a reliable basis for medical diagnosis and treatment.
[0031] In one embodiment, if Figure 2 As shown, in step S10, the lung detection image is preliminarily segmented using a preset convolutional neural network to obtain a preliminary segmentation result, and then the preliminary segmentation result is optimized through multi-scale feature fusion and attention mechanism, specifically including: S11: A convolutional neural network with a UNet structure is used to segment the lung detection image and obtain preliminary segmentation results.
[0032] Specifically, the convolutional neural network with the UNet structure consists of symmetrical encoder and decoder parts. The encoder part gradually downsamples the input image and extracts features at different levels through multi-layer convolution and pooling operations, while the decoder part gradually upsamples and restores the image resolution through deconvolution and upsampling operations while retaining high-level features. In this way, the preliminary segmentation results can better capture the important features in the image.
[0033] S12: Introducing feature pyramid network into convolutional neural network for multi-scale feature fusion.
[0034] Specifically, the feature pyramid network extracts feature maps on different convolutional layers to generate multi-scale feature pyramids, and enhances the network's detection ability for structures of different sizes and scales, especially small lung structures, by fusing features at different scales.
[0035] S13: Through the self-attention mechanism, the detection ability of small lung structures is enhanced, and through the attention mechanism, the selective attention to different feature channels is enhanced.
[0036] Specifically, the self-attention mechanism calculates the correlation between different positions in the feature map to enhance the network's attention to important areas or structures. For example, by enhancing the learning of tubular and cylindrical structures, the network's detection accuracy for blood vessels and airways is improved. Ignoring irrelevant information, the self-attention mechanism generates attention weights and adjusts the feature map according to these weights, thereby improving the detection accuracy of small structures. It also calculates the correlation of each feature channel and adjusts the channel weights to enhance selective attention to key features, further optimizing the initial segmentation results.
[0037] In one embodiment, if Figure 3As shown, in step S11, the convolutional neural network of the UNet structure specifically includes: S111: A symmetrical encoder and decoder structure is adopted. The encoder gradually downsamples the input image to extract features, and the decoder part gradually upsamples to restore the resolution.
[0038] Specifically, the encoder part extracts progressive feature maps from the input image through multi-layer convolution and pooling operations. The convolution operation of each layer increases the complexity of the image features, while the pooling operation reduces the size of the feature map. The decoder part gradually restores the resolution of the feature map through upsampling and deconvolution operations. At the same time, the feature map of the corresponding layer in the encoder is passed to the decoder layer through jump connections to fuse features at different levels and improve the accuracy of the final segmentation result.
[0039] S112: Establish a skip connection between the encoder and the decoder to fuse features at different levels and improve segmentation accuracy.
[0040] Specifically, the skip connection passes the feature map in the encoder directly to the corresponding layer of the decoder. Through this connection method, the decoder can simultaneously utilize low-level high-resolution features and high-level semantic features, thereby improving the refinement and accuracy of the segmentation results and better capturing the fine structures and edge information in the image.
[0041] In one embodiment, if Figure 4 As shown, in step S20, the optimized segmentation result is adjusted by using the conditional random field and morphological operation in sequence to obtain a standard segmentation result, which specifically includes: S21: Use the conditional random field model to fine-tune the boundary of the optimized segmentation result, and apply the spatial context information of the conditional random field model to improve the accuracy of the segmentation result, so as to obtain an adjusted segmentation result.
[0042] Specifically, the conditional random field model optimizes the boundaries of the segmentation results by considering the spatial relationship and contextual information between pixels. The model fine-tunes the boundaries of the segmentation results by iteratively calculating and maximizing the joint probability between labels, thereby improving the accuracy and consistency of the segmentation results.
[0043] S22: Using morphological operations to remove impurity data in the adjusted segmentation result to obtain a standard segmentation result.
[0044] Specifically, morphological operations include basic operations such as dilation and erosion. Morphological operations are used to remove unnecessary impurity data, further optimize the segmentation results, and obtain standard segmentation results.
[0045] In one embodiment, if Figure 5As shown, in step S22, morphological operations are used to remove impurity data in the adjusted segmentation results, specifically including: S221: Connect adjacent segmented regions through dilation operation and fill internal small holes.
[0046] Specifically, the dilation operation expands the segmentation area by adding pixels at the edge of the segmentation result, connects adjacent segmentation areas, and fills small holes inside the segmentation area, thereby improving the integrity and coherence of the segmentation result.
[0047] S222: Remove small noise areas through erosion operation and shrink the segmentation boundary.
[0048] Specifically, the erosion operation removes pixels at the edge of the segmentation result, shrinks the segmentation area, removes small noise areas in the segmentation result, and makes the segmentation boundary smoother and more accurate. This operation helps to remove impurity data in the segmentation result and further improve the quality of the segmentation result.
[0049] In one embodiment, if Figure 6 As shown, in step S30, the anatomical prior image is obtained, the standard segmentation results are screened according to the anatomical prior image, and an image segmentation report is generated according to the screening results, which specifically includes: S31: Perform type screening on the standard segmentation results in combination with the prior knowledge image to obtain airway information and blood vessel information corresponding to the standard segmentation results.
[0050] Specifically, by utilizing the prior knowledge images in the anatomical knowledge base, the standard segmentation results are matched and screened, and different types of anatomical structures such as airways and blood vessels are identified and classified. The prior knowledge images provide a standard lung anatomical structure reference, which helps to improve the accuracy and consistency of the segmentation results.
[0051] S32: Generate an image segmentation report based on the airway information and blood vessel information.
[0052] Specifically, based on the screened airway information and vascular information, quantitative analysis is performed to calculate indicators such as the volume, surface area, length, and number of branches of each segmented area, and a detailed image segmentation report is generated.
[0053] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0054] In one embodiment, a medical image segmentation device is provided, which corresponds one-to-one to the medical image segmentation method in the above embodiment. Figure 7As shown, the medical image segmentation device includes a segmentation optimization module, a segmentation adjustment module, and a report generation module. The detailed description of each functional module is as follows: The segmentation optimization module is used to obtain a lung detection image, perform preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result; A segmentation adjustment module is used to adjust the optimized segmentation result by using conditional random fields and morphological operations in sequence to obtain a standard segmentation result; The report generation module is used to obtain anatomical prior images, perform type screening on standard segmentation results according to the anatomical prior images, and generate an image segmentation report according to the screening results.
[0055] Optionally, the segmentation optimization module specifically includes: The preliminary segmentation submodule is used to perform image segmentation on the lung detection image using a convolutional neural network with a UNet structure to obtain preliminary segmentation results; The first optimization submodule is used to introduce a feature pyramid network into the convolutional neural network to perform multi-scale feature fusion; The second optimization submodule is used to enhance the detection capability of fine lung structures through the self-attention mechanism and to enhance the selective attention to different feature channels through the attention mechanism.
[0056] Optionally, the preliminary segmentation submodule specifically includes: A structure selection unit for adopting a symmetrical encoder and decoder structure, where the encoder gradually downsamples the input image to extract features and the decoder part gradually upsamples to restore the resolution; The skip establishment unit is used to establish a skip connection between the encoder and the decoder to fuse features at different levels and improve segmentation accuracy.
[0057] Optionally, the segmentation adjustment module specifically includes: The first adjustment submodule is used to finely adjust the boundary of the optimized segmentation result by using the conditional random field model, and to improve the accuracy of the segmentation result by applying the spatial context information of the conditional random field model to obtain an adjusted segmentation result; The second adjustment submodule is used to remove impurity data in the adjusted segmentation result by using morphological operations to obtain a standard segmentation result.
[0058] Optionally, the second adjustment submodule specifically includes: An expansion unit, used for connecting adjacent segmented areas and filling internal small holes through an expansion operation; The erosion unit is used to remove small noise areas and shrink the segmentation boundaries through erosion operations.
[0059] Optionally, the report generation module specifically includes: The segmentation and screening submodule is used to screen the types of standard segmentation results in combination with the prior knowledge image to obtain the airway information and blood vessel information corresponding to the standard segmentation results; The report generation submodule is used to generate an image segmentation report based on airway information and blood vessel information.
[0060] The specific definition of the medical image segmentation device can be found in the definition of the medical image segmentation method above, which will not be repeated here. Each module in the above-mentioned medical image segmentation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0061] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a medical image segmentation method is implemented.
[0062] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: Acquire a lung detection image, perform preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result; The optimized segmentation result is adjusted by using conditional random fields and morphological operations in sequence to obtain a standard segmentation result; An anatomical prior image is acquired, the standard segmentation result is screened by type according to the anatomical prior image, and an image segmentation report is generated according to the screening result.
[0063] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Acquire a lung detection image, perform preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result; The optimized segmentation result is adjusted by using conditional random fields and morphological operations in sequence to obtain a standard segmentation result; An anatomical prior image is acquired, the standard segmentation result is screened by type according to the anatomical prior image, and an image segmentation report is generated according to the screening result.
[0064] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0065] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0066] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A medical image segmentation method, It is characterized in that The medical image segmentation method comprises: Acquire a lung detection image, perform preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result; The optimized segmentation result is adjusted by using conditional random fields and morphological operations in sequence to obtain a standard segmentation result; An anatomical prior image is acquired, the standard segmentation result is screened by type according to the anatomical prior image, and an image segmentation report is generated according to the screening result.
2. The medical image segmentation method according to claim 1, It is characterized in that The method of using a preset convolutional neural network to preliminarily segment the lung detection image to obtain a preliminary segmentation result, and then optimizing the preliminary segmentation result through multi-scale feature fusion and attention mechanism, specifically includes: Using a convolutional neural network with a UNet structure to perform image segmentation on the lung detection image to obtain the preliminary segmentation result; Introducing a feature pyramid network into the convolutional neural network to perform multi-scale feature fusion; Through the self-attention mechanism, the detection ability of small lung structures is enhanced, and through the attention mechanism, the selective attention to different feature channels is enhanced.
3. The medical image segmentation method according to claim 2, It is characterized in that The convolutional neural network of the UNet structure specifically includes: A symmetrical encoder and decoder structure is adopted, wherein the encoder gradually downsamples the input image to extract features, and the decoder part gradually upsamples to restore the resolution; A skip connection is established between the encoder and the decoder to fuse features at different levels and improve segmentation accuracy.
4. The medical image segmentation method according to claim 1, It is characterized in that The optimized segmentation result is adjusted by using the conditional random field and the morphological operation in sequence to obtain the standard segmentation result, specifically including: Using a conditional random field model to fine-tune the boundary of the optimized segmentation result, and applying spatial context information of the conditional random field model to improve the accuracy of the segmentation result, thereby obtaining the adjusted segmentation result; The impurity data in the adjusted segmentation result is removed by using morphological operation to obtain the standard segmentation result.
5. The medical image segmentation method according to claim 4, It is characterized in that The adopting of morphological operation to remove impurity data in the adjusted segmentation result specifically includes: Dilation is used to connect adjacent segmented regions and fill internal holes. Erosion is performed to remove small noisy areas and shrink segmentation boundaries.
6. The medical image segmentation method according to claim 1, It is characterized in that The obtaining of the anatomical prior image, screening the type of the standard segmentation result according to the anatomical prior image, and generating an image segmentation report according to the screening result specifically includes: The standard segmentation results are screened by type in combination with the prior knowledge image to obtain airway information and blood vessel information corresponding to the standard segmentation results; The image segmentation report is generated according to the airway information and the blood vessel information.
7. A medical image segmentation device, It is characterized in that The medical image segmentation device comprises: A segmentation optimization module is used to obtain a lung detection image, perform preliminary segmentation on the lung detection image using a preset convolutional neural network to obtain a preliminary segmentation result, and then optimize the preliminary segmentation result through multi-scale feature fusion and attention mechanism to obtain an optimized segmentation result; A segmentation adjustment module, used to adjust the optimized segmentation result by using conditional random fields and morphological operations in sequence to obtain a standard segmentation result; The report generation module is used to obtain an anatomical prior image, perform type screening on the standard segmentation results according to the anatomical prior image, and generate an image segmentation report according to the screening results.
8. The medical image segmentation device according to claim 7, It is characterized in that The segmentation optimization module specifically includes: A preliminary segmentation submodule, used for performing image segmentation on the lung detection image by using a convolutional neural network with a UNet structure to obtain the preliminary segmentation result; A first optimization submodule is used to introduce a feature pyramid network into the convolutional neural network to perform multi-scale feature fusion; The second optimization submodule is used to enhance the detection capability of fine lung structures through the self-attention mechanism and to enhance the selective attention to different feature channels through the attention mechanism.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the medical image segmentation method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the medical image segmentation method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Lung lobe segmentation method based on 3D full convolutional neural network and multi-task learning
CN112734755A
Image semantic segmentation method based on convolutional neural network
CN113192087A
Method and device for segmenting pulmonary parenchyma and pulmonary blood vessel in CT (Computed Tomography) image
CN116051589A
Focus feature recognition and segmentation method and system based on full neural network
CN116563285A
