Method for carrying out lung lobe region segmentation on SPECTV / Q image by using deep learning model

The U-Net model, which utilizes multi-scale feature extraction and morphological operations, addresses the issue of insufficient mask morphological accuracy caused by single threshold processing, achieving high-precision lung lobe region segmentation and improving the morphological optimization and structural integrity of the segmentation results.

CN120953302AInactive Publication Date: 2025-11-14JILIN UNIVERSITY

Patent Information

Application Number
CN202511477565.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2025-11-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional deep learning models based on the U-Net architecture struggle to adaptively eliminate noise in SPECTV/Q image lung lobe region segmentation using a single thresholding strategy, affecting the morphological accuracy of the mask.

Method used

The U-Net model, which uses multi-scale feature extraction, is combined with threshold masking and morphological operations to generate a binary mask and remove background noise, thereby generating a binary lung lobe mask, and finally performing lung lobe region segmentation.

Benefits of technology

It significantly enhances the accuracy and robustness of lung lobe segmentation, providing a reliable technical basis for quantitative analysis of lung function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953302A_ABST
    Figure CN120953302A_ABST
Patent Text Reader

Abstract

The invention discloses a method for performing lung lobe region segmentation on an SPECTV / Q image by using a deep learning model, and relates to the technical field of medical image processing, and the method comprises the steps: obtaining SPECTV / Q image data, and generating a to-be-segmented image; performing multi-scale feature extraction on the to-be-segmented image to generate a shallow feature map and a deep feature map; performing threshold masking on the lung lobe segmentation probability graph to generate a binary mask; performing morphological operation based on the binary mask, and performing background noise elimination to generate a binary lung lobe mask; according to the method, the to-be-segmented image is input into the U-Net model, convolution and maximum pooling operations are executed by using the coding path to gradually extract the multi-scale feature map, the precision and robustness of lung lobe region segmentation are significantly enhanced, and the segmentation accuracy and robustness of the lung lobe region are improved. And a reliable technical basis is provided for quantitative analysis of lung functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and in particular to a method for lung lobe region segmentation in SPECTV / Q images using a deep learning model. Background Technology

[0002] Lung lobe segmentation using deep learning models on SPECTV / Q (V / Q is ventilation-perfusion ratio) images plays a crucial role in nuclear medicine image analysis. It provides a key quantitative analysis method for the clinical diagnosis and functional assessment of lung diseases such as pulmonary embolism and chronic obstructive pulmonary disease. This technique typically employs a deep learning model based on the U-Net architecture. Through its encoding path, it extracts multi-scale features from the input image, generating shallow and deep feature maps at different levels. Then, using the decoding path, it fuses multi-scale features through transposed convolution and skip connections to restore spatial resolution, ultimately outputting a high-precision lung lobe segmentation probability map, laying the foundation for subsequent quantitative analysis.

[0003] In the field of lung lobe region segmentation using deep learning models for SPECTV / Q images, traditional segmentation methods have certain limitations in subsequent processing. For example, in the process of generating the final binary mask from the segmentation probability map, a single global thresholding strategy is difficult to adaptively eliminate noise of all categories, and may retain some discrete artifacts or ignore weak real signals, affecting the morphological accuracy of the mask. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a method for lung lobe region segmentation of SPECTV / Q images using a deep learning model to solve the problem of insufficient mask morphological accuracy caused by single threshold segmentation.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a method for lung lobe region segmentation in SPECTV / Q images using a deep learning model, comprising: Acquire SPECTV / Q image data and generate the image to be segmented; Multi-scale feature extraction is performed on the image to be segmented to generate shallow feature maps and deep feature maps; The image to be segmented is input into the U-Net model, which includes an encoding path and a decoding path. The encoding path extracts multi-scale features step by step through convolution and max pooling operations. The decoding path fuses shallow and deep feature maps through transposed convolution and skip connections to restore spatial resolution and generate a lung lobe segmentation probability map. The lung lobe segmentation probability map is thresholded to generate a binary mask; Morphological operations are performed based on the binary mask, and background noise is eliminated to generate a binary lung lobe mask. The binary lung lobe mask is used to segment the lung lobe region and generate segmentation results.

[0007] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The steps for acquiring SPECTV / Q image data and generating the image to be segmented are as follows. The acquired SPECT V / Q image data is a single-channel functional imaging image, generating the original SPECT V / Q image; The original SPECT V / Q image is subjected to size normalization processing to generate standard SPECT V / Q image data; The grayscale values ​​in the standard SPECTV / Q image data are linearly scaled and mapped to the [0,1] interval to generate the image to be segmented.

[0008] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The steps for performing multi-scale feature extraction on the image to be segmented to generate shallow and deep feature maps are as follows. The image to be segmented is processed through multiple 3×3 convolutional layers and 2×2 max pooling layers in the encoding path of the U-Net model; Local features are extracted from the image to be segmented by a series of 3×3 convolution operations. Each convolution is followed by a ReLU activation function to generate the first-level feature map. Perform a 2×2 max pooling operation with a stride of 2 on the first-level feature map to generate the second-level feature map; The second-level feature map is subjected to a combination of convolution and max pooling operations, the number of channels is increased layer by layer and downsampling is performed step by step to generate the third-level and fourth-level feature maps; The first-level feature map and the second-level feature map are used as shallow feature maps, and the fourth-level feature map is used as a deep feature map.

[0009] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The image to be segmented is then input into the U-Net model.

[0010] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The U-Net model includes an encoding path and a decoding path, and the steps are as follows. The encoding path consists of multiple consecutive downsampling modules, each of which sequentially performs two 3×3 convolution operations, one ReLU activation operation, and one 2×2 max pooling operation with a stride of 2. The decoding path consists of multiple upsampling modules, each of which sequentially performs a 2×2 transposed convolution operation, a skip connection operation, and two 3×3 convolution operations.

[0011] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The encoding path extracts multi-scale features step by step through convolution and max pooling operations, as follows: The encoding path extracts spatial features from the input image by performing a 3×3 convolution operation and ReLU activation function processing. The encoding path uses a 2×2 window and a stride of 2 for max pooling to downsample the feature map after convolution and activation. The encoding path extracts and outputs multi-scale feature maps step by step by repeatedly performing convolution and activation processing and max pooling downsampling operations.

[0012] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The decoding path fuses shallow and deep feature maps through transposed convolution and skip connections to restore spatial resolution and generate a lung lobe segmentation probability map. The steps are as follows. The decoding path processes the deep feature map output by the encoding path; The decoding path upsamples the deep feature map by performing a transposed convolution operation with a stride of 2×2 and a transposed convolution kernel of 2, thereby generating an upsampled feature map. The decoding path uses a skip connection operation to concatenate and fuse shallow feature maps of the same scale as the upsampled feature map in the encoding path along the channel dimension with the upsampled feature map, so as to combine high-resolution details and deep semantic information. The decoding path refines the fused feature map by performing a 3×3 convolution operation and ReLU activation function, and finally maps the number of channels to the number of segmentation categories through a 1×1 convolution operation to generate a lung lobe segmentation probability map.

[0013] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The lung lobe segmentation probability map is thresholded to generate a binary mask, as follows: The lung lobe segmentation probability map is binarized using a preset grayscale threshold, which is a fixed value between 0 and 1, to distinguish the lung lobe region from the background region. For each pixel in the lung lobe segmentation probability map, if the probability value of the pixel in the lung lobe segmentation probability map is greater than or equal to the grayscale threshold, the grayscale value of the corresponding pixel is set to 1 in the generated binary mask; otherwise, it is set to 0. Finally, a binary mask with the same size as the lung lobe segmentation probability map is generated.

[0014] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The steps for performing morphological operations based on the binary mask and eliminating background noise to generate a binary lung lobe mask are as follows: Perform a morphological opening operation on the binary mask to eliminate small noise points; The result of the opening operation is subjected to a morphological closing operation to connect the tiny breaks in the lobar region and fill the internal cavities. Based on the morphological operation, a binary lung lobe mask with the same size as the binary mask is generated.

[0015] As a preferred embodiment of the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as described in this invention, wherein: The binary lung lobe mask is used to segment the lung lobe region and generate segmentation results. The steps are as follows. The binary lung lobe mask is spatially aligned with the original SPECT V / Q image so that the pixel coordinates of the binary lung lobe mask correspond one-to-one with the pixel coordinates of the original SPECT V / Q image. The region with a pixel value of 1 in the binary lung lobe mask is used as the foreground, and the corresponding pixel region is extracted from the original SPECT V / Q image. Set the pixel values ​​of the corresponding background regions in the original SPECT V / Q image to 0 or set them to transparent; The segmentation result retains only the pixels identified as lung lobe regions by the binary lung lobe mask, thus generating the lung lobe region segmentation result.

[0016] The beneficial effects of this invention are as follows: This invention eliminates noise points by performing morphological opening operations based on binary masks, and connects broken regions and fills internal voids through morphological closing operations, thereby achieving morphological optimization and structural integrity improvement of the segmentation results. This method significantly enhances the accuracy and robustness of lung lobe region segmentation, providing a reliable technical basis for quantitative analysis of lung function. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating a method for lung lobe region segmentation using a deep learning model on SPECTV / Q images.

[0019] Figure 2 This is a classic architecture diagram of the U-Net model.

[0020] Figure 3 Example 1 of a binary graph after morphological processing.

[0021] Figure 4 Example 2 of a binary graph after morphological processing.

[0022] Figure 5 Example 3 is a binary graph after morphological processing.

[0023] Figure 6 This is a flowchart of binary mask generation and morphological optimization.

[0024] Figure 7 This is a flowchart of the feature extraction and segmentation process for the U-Net model. Detailed Implementation

[0025] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0026] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0027] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0028] Reference Figures 1-4 This is one embodiment of the present invention, which provides a method for lung lobe region segmentation of SPECTV / Q images using a deep learning model, including the following steps: S1. Obtain SPECTV / Q image data and generate the image to be segmented; The acquired SPECT V / Q image data is a single-channel functional imaging image, generating the original SPECT V / Q image; Specifically, SPECT V / Q functional imaging data, stored in single-channel grayscale format, is acquired and obtained through medical imaging equipment. This SPECT V / Q functional imaging data represents the intensity of ventilation or perfusion physiological function of lung tissue in the form of single-channel grayscale images. The SPECT V / Q functional imaging data obtained by medical imaging equipment without any processing is defined as the raw SPECT V / Q image.

[0029] The original SPECT V / Q images are size-normalized to generate standard SPECT V / Q image data; Specifically, the original SPECT V / Q images are normalized to ensure that all images to be processed are the same size, providing a high-quality and highly consistent data foundation for subsequent image fusion, region segmentation, and feature extraction. After the size normalization process is completed, standard SPECT V / Q image data is generated.

[0030] The gray values ​​in the standard SPECTV / Q image data are linearly scaled and mapped to the [0, 1] interval to generate the image to be segmented.

[0031] Specifically, the grayscale values ​​in the standard SPECTV / Q image data are linearly scaled, mapping the grayscale value of each pixel from the original numerical range to the interval between zero and one. This mapping process strictly follows a linear proportional relationship, so that the processed standard SPECTV / Q image data meets the standardization requirements of the deep learning model for the numerical range of input data. Finally, all pixel values ​​of the generated image to be segmented are in the interval [0,1], which serves as the direct input to the U-Net model.

[0032] S2. Perform multi-scale feature extraction on the image to be segmented to generate shallow feature maps and deep feature maps; The image to be segmented is processed through multiple 3×3 convolutional layers and 2×2 max pooling layers in the encoding path of the U-Net model; Specifically, the encoding path contains multiple sequentially connected 3×3 convolutional layers and 2×2 max pooling layers. First, the 3×3 convolutional layers extract local features of the image to be segmented. Then, the 2×2 max pooling layers reduce the spatial dimension of the image to be segmented after convolution. By combining the continuously stacked 3×3 convolutional layers and 2×2 max pooling layers, the pixel information of the image to be segmented is gradually abstracted and transformed to generate the output result after the encoding path is processed.

[0033] Local features are extracted from the image to be segmented by continuous 3×3 convolution operations. Each convolution is followed by a ReLU activation function to generate the first-level feature map. Specifically, the convolution operation is performed on the image to be segmented in a sliding window manner. The feature response is calculated by linearly combining the convolution kernel weights with the local region of the image to be segmented. After each 3×3 convolution operation, the ReLU activation function is immediately applied to process the result. The values ​​less than zero in the output of the convolution operation are set to zero, and positive values ​​are retained to introduce non-linear feature expression capabilities. Through multiple consecutive 3×3 convolution operations and ReLU activation function processing, the edge, texture and local structural features of the image to be segmented are gradually extracted and enhanced, and finally the first-level feature map is generated.

[0034] Perform a 2×2 max pooling operation with a stride of 2 on the first-level feature map to generate the second-level feature map; Specifically, the first-level feature map generated by continuous 3×3 convolution operations and ReLU activation function is used as input. First, a 2×2 window and a max pooling operation with a stride of 2 are used to downsample the first-level feature map. The 2×2 window and the max pooling operation with a stride of 2 slide on the first-level feature map with a stride of 2 pixels. Each time, the maximum value in the 2×2 region is extracted as the output representative of the 2×2 sliding window region. The downsampling process of the max pooling operation reduces the spatial size of the first-level feature map to half of the original size, while retaining the most significant feature response. The max pooling operation effectively enhances the feature translation invariance and reduces the computational complexity, finally generating the second-level feature map.

[0035] The second-level feature map is subjected to a combination of convolution and max pooling operations, and the number of channels is increased layer by layer and downsampled step by step to generate the third-level and fourth-level feature maps. Specifically, the second-level feature map generated by the previous steps is used as input. Deep feature extraction is performed on the second-level feature map by performing two consecutive 3×3 convolution operations and ReLU activation function processing. After each convolution operation, the number of channels in the output feature map is increased to enhance the feature expression capability. After the convolution feature extraction is completed, a 2×2 max pooling operation with a stride of 2 is used to downsample the convolution-processed second-level feature map. By repeatedly performing the convolution operation to increase the number of channels and the max pooling downsampling operation, the number of channels in the output feature map is increased layer by layer and the spatial resolution of the feature map is gradually reduced. Finally, the third-level feature map and the fourth-level feature map with more channels and smaller spatial size are generated in sequence.

[0036] The first and second level feature maps are used as shallow feature maps, and the fourth level feature map is used as a deep feature map.

[0037] Specifically, in the encoding path processing of the U-Net model, the first-level feature map is generated by the initial convolution and activation operations, preserving the high spatial resolution and rich edge texture details of the image to be segmented. The second-level feature map is generated after the first max pooling downsampling, which reduces the spatial size but still contains significant local feature structures. The first-level and second-level feature maps are classified as shallow feature maps because they both carry a large amount of spatial detail information. The fourth-level feature map is generated after multiple convolution and pooling operations, and has highly abstract semantic features and the smallest spatial size. The fourth-level feature map is classified as a deep feature map because it contains high-level semantic information. The shallow and deep feature maps together provide multi-scale input for the skip connections and feature fusion of the decoding path.

[0038] S3. Input the image to be segmented into the U-Net model. The U-Net model includes an encoding path and a decoding path. The encoding path extracts multi-scale features step by step through convolution and max pooling operations. The decoding path fuses shallow feature maps and deep feature maps through transposed convolution and skip connections to restore spatial resolution and generate a lung lobe segmentation probability map. The encoding path consists of multiple consecutive downsampling modules. Each downsampling module sequentially performs two 3×3 convolution operations, one ReLU activation operation, and one 2×2 max pooling operation with a stride of 2. Specifically, a ReLU activation operation is performed immediately after each 3×3 convolution operation. After the convolution and activation operations are completed, a 2×2 max pooling operation with a stride of 2 is performed. The max pooling operation uses a sliding window with a stride of 2 pixels to downsample the feature map. By repeatedly executing the combination of the two 3×3 convolution operations and the ReLU activation operation, as well as the 2×2 max pooling operation with a stride of 2, each downsampling module gradually reduces the spatial resolution of the feature map and increases the number of feature channels. Multiple consecutive downsampling modules work together to achieve multi-scale feature extraction and spatial dimension reduction of the encoding path.

[0039] The decoding path consists of multiple upsampling modules, each of which sequentially performs a 2×2 transposed convolution operation, a skip connection operation, and two 3×3 convolution operations. Specifically, each upsampling module sequentially performs a 2×2 transposed convolution operation to upsample the deep feature map of the input upsampling module to increase spatial resolution. It then performs a skip connection operation to concatenate and fuse the shallow feature map of the same scale in the encoding path with the feature map of the upsampled output after transposed convolution along the channel dimension. Finally, it performs two consecutive 3×3 convolution operations to refine the features and integrate semantic information in the fused feature map. By repeatedly executing the 2×2 transposed convolution operation, the skip connection operation, and the two 3×3 convolution operations, each upsampling module gradually restores the spatial resolution of the upsampled output feature map and reduces the number of feature channels. Multiple consecutive upsampling modules work together to achieve the feature fusion and spatial resolution restoration function of the decoding path.

[0040] The encoding path extracts spatial features from the input image by performing a 3×3 convolution operation and ReLU activation function processing; Specifically, firstly, a linear combination calculation of 3×3 convolution kernel weights and local image regions is performed on the input image using a sliding window to generate an initial feature response map. Then, the ReLU activation function is applied to the convolution output, setting all negative values ​​in the initial feature response map to zero while retaining positive values, thus introducing nonlinear transformation capability. By continuously and repeatedly performing the combination of 3×3 convolution operation and ReLU activation function processing, the edge, texture, and local structural features of the input image are gradually extracted and enhanced. This structural feature extraction process forms the basic operation unit of the encoding path, providing nonlinearly activated feature input for subsequent max pooling downsampling.

[0041] The encoding path uses a 2×2 window and a stride of 2 for max pooling to downsample the feature map after convolution and activation. Specifically, a 2×2 sampling window is first slid across the feature map after convolution and activation processing with a fixed stride of 2 pixels. The maximum value of the four pixels within the sampling window is extracted from the multi-scale feature map each time as the output representative of the 2×2 sampling window region. The max pooling downsampling operation reduces the spatial size (height and width) of the feature map to half of the original size, while retaining the most significant feature response of each local region. The max pooling downsampling process effectively enhances the translation invariance of the feature representation, reduces the spatial dimension of the downsampled feature map to reduce computational complexity, and provides an input feature map with a larger receptive field for subsequent convolution operations.

[0042] The encoding path extracts and outputs multi-scale feature maps step by step by repeatedly performing the convolution and activation processes and max pooling downsampling operations. Specifically, the input image to be segmented is first subjected to a 3×3 convolution operation and ReLU activation function to extract spatial features, generating a first-level feature map. Then, a 2×2 max pooling operation with a stride of 2 is used to downsample the first-level feature map, generating a second-level feature map with half the spatial size. Two more 3×3 convolution operations and ReLU activation function processes are repeated on the second-level feature map to extract deeper features, increasing the number of feature channels. A 2×2 max pooling operation with a stride of 2 is then used to downsample the convolution-activated second-level feature map, generating a third-level feature map with half the spatial size again. Two more 3×3 convolution operations and ReLU activation function processes are then performed on the third-level feature map. Finally, a 2×2 max pooling operation with a stride of 2 is used to generate a fourth-level feature map with the smallest spatial size and the most channels. By continuously repeating this combination of operations, the encoding path outputs multi-scale feature maps containing different spatial resolutions and semantic levels.

[0043] The decoding path processes the deep feature map output by the encoding path; Specifically, firstly, a 2×2 transposed convolution operation is performed on the fourth-level feature map to upsample it and increase the spatial resolution. Then, a skip connection operation is used to concatenate and fuse the shallow feature maps of the same scale in the encoding path with the upsampled output feature map along the channel dimension. Next, two consecutive 3×3 convolution operations and ReLU activation function processing are performed on the fused feature map concatenated by skip connections to refine the features and integrate semantic information. The processing flow generates a feature map after preliminary processing by the decoding path, which provides input for the subsequent upsampling module.

[0044] The decoding path upsamples the deep feature map by performing a transposed convolution operation with a stride of 2×2 and a transposed convolution kernel, generating an upsampled feature map. Specifically, a fixed 2×2 transposed convolution kernel is used on the deep feature map, and transposed convolution is performed with a stride of 2 pixels. By calculating the weights of the transposed convolution kernel and the local regions of the deep feature map in a linear combination, a feature response map with higher spatial resolution is generated. The transposed convolution operation expands the spatial size (height and width) of the deep feature map to twice the original size, while preserving the semantic information integrity of the upsampled feature map. This upsampling process effectively restores the spatial detail information of the feature map after transposed convolution, reduces the relative proportion of the number of feature channels, and provides an input upsampled feature map with higher spatial resolution for subsequent skip connection operations.

[0045] The decoding path uses a skip connection operation to concatenate and fuse shallow feature maps of the same scale as the upsampled feature maps in the encoding path along the channel dimension with the upsampled feature maps, so as to combine high-resolution details and deep semantic information. Specifically, firstly, a shallow feature map with the same spatial size as the current upsampled feature map is selected from the encoding path. Then, the shallow feature map and the upsampled feature map are concatenated along the channel dimension to form a fused feature map with an increased number of channels. This concatenation operation preserves the high spatial resolution detail information of the shallow feature map while fusing the deep semantic abstraction information carried by the upsampled output feature map. By concatenating along the channel dimension, the advantages of different levels of features are complemented, enhancing the integrity and diversity of feature representation and providing fused feature input containing both detail and semantic information for subsequent convolution operations.

[0046] The decoding path refines the features of the fused feature map by performing a 3×3 convolution operation and ReLU activation function. Finally, a 1×1 convolution operation maps the number of channels to the number of segmentation categories to generate a lung lobe segmentation probability map.

[0047] Specifically, firstly, two consecutive 3×3 convolution operations are performed on the fused feature map generated by skip connections. After each 3×3 convolution operation, ReLU activation function processing is performed. Deep features are extracted by linearly combining the convolution kernel weights with the local regions of the fused feature map. ReLU activation function processing sets negative values ​​to zero and retains positive values, introducing non-linear transformation capability. This combination of consecutive 3×3 convolution and ReLU activation function processing operations enhances the semantic consistency of feature representation and optimizes spatial feature distribution. Finally, a 1×1 convolution operation is used to map the number of channels of the convolution and activation processed feature map to the number of categories corresponding to the segmentation task. The 1×1 convolution kernel performs linear transformation and dimensionality reduction of the channel dimension to generate a lung lobe segmentation probability map containing the category probability distribution for each pixel.

[0048] S4. Threshold mask the lung lobe segmentation probability map to generate a binary mask; The lung lobe segmentation probability map is binarized using a preset grayscale threshold, which is a fixed value between 0 and 1, to distinguish the lung lobe region from the background region. Specifically, firstly, the probability value of each pixel in the lung lobe segmentation probability map is read, and the probability value is compared with a preset grayscale threshold. If the probability value of a pixel is greater than or equal to the preset grayscale threshold, the pixel is determined to belong to the lung lobe region, and the corresponding pixel value is set to 1 in the output. If the probability value of a pixel is less than the preset grayscale threshold, the pixel is determined to belong to the background region, and the corresponding pixel value is set to 0 in the output. Global binarization is completed by traversing all pixels in the lung lobe segmentation probability map, and the lung lobe region and the background region are distinguished.

[0049] It should be noted that the preset grayscale threshold is defined to precisely delineate the non-black lung area, eliminate background interference, focus on the effective analysis range, and distinguish the lung lobe area from the background area. The value range is usually 0-1.

[0050] For each pixel in the lung lobe segmentation probability map, if the probability value of the pixel in the lung lobe segmentation probability map is greater than or equal to the grayscale threshold, the grayscale value of the corresponding pixel is set to 1 in the generated binary mask; otherwise, it is set to 0. Finally, a binary mask with the same size as the lung lobe segmentation probability map is generated.

[0051] Specifically, a preset grayscale threshold is applied to each pixel in the lung lobe segmentation probability map. If the probability value of a pixel in the lung lobe segmentation probability map is greater than or equal to the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 1 in the generated binary mask; if the probability value of a pixel in the lung lobe segmentation probability map is less than the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 0 in the generated binary mask. Global binarization is completed by traversing all pixels in the lung lobe segmentation probability map, and finally a binary mask with the same size as the lung lobe segmentation probability map is generated. Pixels with a grayscale value of 1 in the binary mask identify the lung lobe region, and pixels with a grayscale value of 0 identify the background region.

[0052] S5. Perform morphological operations based on the binary mask and eliminate background noise to generate a binary lung lobe mask. Perform a morphological opening operation on the binary mask to eliminate small noise points; Specifically, a morphological erosion operation is performed on the binary mask. The erosion operation uses a structuring element to slide on the mask. When the structuring element is completely contained within the foreground region, the center pixel is retained; otherwise, it is set as background. This erosion operation eliminates isolated small noise points and reduces the boundary of the lung lobe region. Subsequently, a morphological dilation operation is performed on the erosion result. The morphological dilation operation uses the same structuring element to slide on the mask. When the structuring element intersects with the foreground region, the area covered by the structuring element is set as foreground. This dilation operation restores the effective range of the eroded lung lobe region and fills the boundary depression. Through the combination of opening operations of erosion followed by dilation, isolated noise points, burrs, and small artifacts with an area smaller than the structuring element in the binary mask are effectively eliminated, while maintaining the shape and area of ​​the main lung lobe region basically unchanged, thus improving the morphological integrity of the segmentation result.

[0053] The result of the opening operation is subjected to a morphological closing operation to connect the tiny breaks in the lung lobe region and fill the internal cavities, ultimately generating a binary lung lobe mask. Specifically, firstly, a morphological dilation operation is performed on the binary mask after the opening operation. The dilation operation uses a structuring element that slides across the mask. When the structuring element intersects with the foreground region, the foreground region is set as the foreground. This dilation operation expands the boundary of the lung lobe region and connects minor breaks in adjacent regions. Then, a morphological erosion operation is performed on the dilation result. The erosion operation uses the same structuring element that slides across the mask. When the structuring element is completely contained within the foreground region, the center pixel is preserved; otherwise, the center pixel is set as the background. This erosion operation restores the original size of the lung lobe region and fills internal voids. Through this combination of dilation and erosion, a closing operation is achieved. This method effectively connects the minute breaks and gaps within the lung lobe region caused by noise or preset grayscale threshold segmentation, simultaneously filling the pore structures formed by tissue variations or segmentation errors within the lung lobe region. At the same time, it maintains the overall outline and main morphological features of the lung lobe region essentially unchanged, ultimately generating a binary lung lobe mask with spatial dimensions completely consistent with the original binary mask. In the binary lung lobe mask, regions with a pixel value of 1 identify the complete denoised lung lobe region, and regions with a pixel value of 0 identify the pure background region. It has the characteristics of high morphological integrity, strong regional connectivity, and low noise interference, providing high-quality binary basic data for subsequent lung lobe segmentation and quantitative analysis.

[0054] S6. The binary lung lobe mask is used to segment the lung lobe region and generate segmentation results.

[0055] Spatially align the binary lung lobe mask with the original SPECT V / Q image so that the pixel coordinates of the binary lung lobe mask correspond one-to-one with the pixel coordinates of the original SPECT V / Q image. Specifically, the binary lung lobe mask is spatially aligned with the original SPECT V / Q image. This alignment operation ensures that the spatial coordinates of each pixel in the binary lung lobe mask completely coincide with the spatial coordinates of the corresponding pixel in the original SPECT V / Q image, achieving a one-to-one correspondence between the pixel coordinates of the binary lung lobe mask and the pixel coordinates of the original SPECT V / Q image. This ensures that the mask pixel value and the image pixel value at each spatial location represent the same anatomical structure. This alignment result guarantees that the lung lobe region contour extracted from the binary lung lobe mask completely overlaps with the anatomical structure in the original SPECT V / Q image, providing a precise spatial consistency basis for subsequent mask-based pixel value extraction and functional analysis.

[0056] The region with a pixel value of 1 in the binary lung lobe mask is used as the foreground, and the corresponding pixel region is extracted from the original SPECT V / Q image. Specifically, firstly, based on the spatially aligned binary lung lobe mask, all foreground regions with a pixel value of 1 are located. Then, according to the spatial coordinate mapping of the foreground region of the mask, pixel regions at the same spatial position are accurately extracted from the original SPECT V / Q image. The extraction process retains the complete grayscale value information of the corresponding foreground region in the original SPECT V / Q image, ensuring that the extracted pixel region completely overlaps with the foreground region of the mask in spatial position.

[0057] Set the pixel values ​​of the corresponding background region in the original SPECT V / Q image to 0 or make it transparent; Specifically, firstly, based on the spatially aligned binary lung lobe mask, all background regions with pixel values ​​of 0 are identified. Then, according to the spatial coordinate mapping of the mask background region, the pixel regions at the same spatial location in the original SPECT V / Q image are located. The pixel values ​​of the corresponding background regions in the original SPECT V / Q image are zeroed out, setting the grayscale value to 0, or the background region pixels are adjusted to be completely transparent using the transparency channel setting. This process of zeroing out or making the pixel values ​​of the background region transparent preserves the complete grayscale value information of the corresponding foreground region in the original SPECT V / Q image, ensuring that only the pixel values ​​of the background region are modified while the pixel values ​​of the lung lobe region remain unchanged.

[0058] The segmentation results retain only the pixels identified as lung lobe regions by the binary lung lobe mask, generating the lung lobe region segmentation results.

[0059] Specifically, based on the spatially aligned binary lung lobe mask, each pixel is traversed. When the mask pixel value is 1, the original grayscale value of the corresponding spatial location in the original SPECT V / Q image is retained. When the mask pixel value is 0, the pixel value of the corresponding location in the output segmentation result is set to 0. This does not change the spatial resolution and coordinate mapping relationship of the image, ensuring that the final segmentation result only contains pixel data of the lung lobe region identified by the binary lung lobe mask. Its grayscale value comes entirely from the original SPECT V / Q image, and the pixel values ​​of non-lung lobe regions are all 0, forming a lung lobe region segmentation result with accurate spatial range and complete functional information.

[0060] This embodiment also provides a computer device applicable to the lung lobe region segmentation method of SPECTV / Q images using a deep learning model, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the lung lobe region segmentation method of SPECTV / Q images using a deep learning model as proposed in the above embodiment.

[0061] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0062] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the lung lobe region segmentation method for SPECTV / Q images using a deep learning model as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0063] In summary, this invention achieves morphological optimization and structural integrity improvement of the segmentation results by further performing morphological opening operations based on binary masks to eliminate noise points and by connecting broken regions and filling internal voids through morphological closing operations. This method significantly enhances the accuracy and robustness of lung lobe region segmentation, providing a reliable technical foundation for quantitative analysis of lung function.

[0064] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for lung lobe region segmentation in SPECTV / Q images using a deep learning model, characterized in that: include, Acquire SPECTV / Q image data and generate the image to be segmented; Multi-scale feature extraction is performed on the image to be segmented to generate shallow feature maps and deep feature maps; The image to be segmented is input into the U-Net model, which includes an encoding path and a decoding path. The encoding path extracts multi-scale features step by step through convolution and max pooling operations. The decoding path fuses shallow and deep feature maps through transposed convolution and skip connections to restore spatial resolution and generate a lung lobe segmentation probability map. The lung lobe segmentation probability map is thresholded to generate a binary mask; Morphological operations are performed based on the binary mask, and background noise is eliminated to generate a binary lung lobe mask. The binary lung lobe mask is used to segment the lung lobe region and generate segmentation results.

2. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 1, characterized in that: The steps for acquiring SPECTV / Q image data and generating the image to be segmented are as follows. The acquired SPECT V / Q image data is a single-channel functional imaging image, generating the original SPECT V / Q image; The original SPECT V / Q image is subjected to size normalization processing to generate standard SPECT V / Q image data; The grayscale values ​​in the standard SPECTV / Q image data are linearly scaled and mapped to the [0,1] interval to generate the image to be segmented.

3. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 2, characterized in that: The steps for performing multi-scale feature extraction on the image to be segmented to generate shallow and deep feature maps are as follows. The image to be segmented is processed through multiple 3×3 convolutional layers and 2×2 max pooling layers in the encoding path of the U-Net model; Local features are extracted from the image to be segmented by a series of 3×3 convolution operations. Each convolution is followed by a ReLU activation function to generate the first-level feature map. Perform a 2×2 max pooling operation with a stride of 2 on the first-level feature map to generate the second-level feature map; The second-level feature map is subjected to a combination of convolution and max pooling operations, the number of channels is increased layer by layer and downsampling is performed step by step to generate the third-level and fourth-level feature maps; The first-level feature map and the second-level feature map are used as shallow feature maps, and the fourth-level feature map is used as a deep feature map.

4. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 3, characterized in that: The image to be segmented is then input into the U-Net model.

5. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 4, characterized in that: The U-Net model includes an encoding path and a decoding path, and the steps are as follows. The encoding path consists of multiple consecutive downsampling modules, each of which sequentially performs two 3×3 convolution operations, one ReLU activation operation, and one 2×2 max pooling operation with a stride of 2. The decoding path consists of multiple upsampling modules, each of which sequentially performs a 2×2 transposed convolution operation, a skip connection operation, and two 3×3 convolution operations.

6. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 5, characterized in that: The encoding path extracts multi-scale features step by step through convolution and max pooling operations, as follows: The encoding path extracts spatial features from the input image by performing a 3×3 convolution operation and ReLU activation function processing. The encoding path uses a 2×2 window and a stride of 2 for max pooling to downsample the feature map after convolution and activation. The encoding path extracts and outputs multi-scale feature maps step by step by repeatedly performing convolution and activation processing and max pooling downsampling operations.

7. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 6, characterized in that: The decoding path fuses shallow and deep feature maps through transposed convolution and skip connections to restore spatial resolution and generate a lung lobe segmentation probability map. The steps are as follows. The decoding path processes the deep feature map output by the encoding path; The decoding path upsamples the deep feature map by performing a transposed convolution operation with a stride of 2×2 and a transposed convolution kernel of 2, thereby generating an upsampled feature map. The decoding path uses a skip connection operation to concatenate and fuse shallow feature maps of the same scale as the upsampled feature map in the encoding path along the channel dimension with the upsampled feature map, so as to combine high-resolution details and deep semantic information. The decoding path refines the fused feature map by performing a 3×3 convolution operation and ReLU activation function, and finally maps the number of channels to the number of segmentation categories through a 1×1 convolution operation to generate a lung lobe segmentation probability map.

8. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 7, characterized in that: The lung lobe segmentation probability map is thresholded to generate a binary mask, as follows: The lung lobe segmentation probability map is binarized using a preset grayscale threshold, which is a fixed value between 0 and 1, to distinguish the lung lobe region from the background region. For each pixel in the lung lobe segmentation probability map, if the probability value of the pixel in the lung lobe segmentation probability map is greater than or equal to the grayscale threshold, the grayscale value of the corresponding pixel is set to 1 in the generated binary mask; otherwise, it is set to 0. Finally, a binary mask with the same size as the lung lobe segmentation probability map is generated.

9. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 8, characterized in that: The steps for performing morphological operations based on the binary mask and eliminating background noise to generate a binary lung lobe mask are as follows: Perform a morphological opening operation on the binary mask to eliminate small noise points; The result of the opening operation is subjected to a morphological closing operation to connect the tiny breaks in the lobar region and fill the internal cavities. Based on the morphological operation, a binary lung lobe mask with the same size as the binary mask is generated.

10. The method for lung lobe region segmentation using a deep learning model in SPECTV / Q images as described in claim 9, characterized in that: The binary lung lobe mask is used to segment the lung lobe region and generate segmentation results. The steps are as follows. The binary lung lobe mask is spatially aligned with the original SPECT V / Q image so that the pixel coordinates of the binary lung lobe mask correspond one-to-one with the pixel coordinates of the original SPECT V / Q image. The region with a pixel value of 1 in the binary lung lobe mask is used as the foreground, and the corresponding pixel region is extracted from the original SPECT V / Q image. Set the pixel values ​​of the corresponding background regions in the original SPECT V / Q image to 0 or set them to transparent; The segmentation result retains only the pixels identified as lung lobe regions by the binary lung lobe mask, thus generating the lung lobe region segmentation result.

Citation Information

Patent Citations

  • Lung tissue dissimilation degree judgment method and device

    CN111292309A

  • Medical lung MRI image segmentation method based on adaptive contour model, and MRI equipment

    CN111739052A

  • Fusion convolutional adaptive network skin lesion segmentation method

    CN118072024A

  • Lightweight segmentation method and system for medical image

    CN120339306A

Cited By

  • Image region segmentation detection system based on lightweight shared convolution

    CN121685972A

  • Image region segmentation detection system based on lightweight shared convolution

    CN121685972B