Pneumoconiosis lung field segmentation and region division method and system and storage medium

By pre-treating and feature extraction of chest radiographs, combining the dual attention mechanism and spatial index structure, the problem of difficulty in utilizing lung texture characteristics in the prior art is solved, and a higher precision and automated lung field segmentation and region division are achieved.

CN119992090APending Publication Date: 2025-05-13TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510088854.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-13

Smart Images

  • Figure CN119992090A_ABST
    Figure CN119992090A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical image processing, in particular to a pneumoconiosis lung field segmentation and region division method and system and a storage medium, and the method comprises the steps: employing a preprocessing method for an input chest radiograph, and obtaining a preprocessed chest radiograph; performing convolution processing, down-sampling and double attention processing on the preprocessed chest radiograph to obtain an encoder feature map, then performing up-sampling to obtain a decoder feature map, fusing the features of the encoder feature map and the decoder feature map, and performing pooling processing to obtain a mask image; extracting a lung field area in the mask image, and respectively positioning a rib diaphragm angle and a lung tip; the adjacent key points are positioned, the adjacent key point of the left lung is positioned as the left lung diaphragm, and the adjacent key point of the right lung is positioned as the right lung heart diaphragm angle; a right lung heart diaphragm angle, a right rib diaphragm angle, a left lung diaphragm and a left rib diaphragm angle are used for positioning the positions of a right lung diaphragm apex and a left lung diaphragm apex; the lung field area is divided into three areas. The method pays attention to texture feature extraction of pneumoconiosis, can partition according to focus adaptability, and is accurate in lung field region division.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to a method, system and storage medium for segmenting and dividing lung fields of pneumoconiosis patients. Background Art

[0002] Pneumoconiosis is a lung fibrosis disease caused by long-term inhalation of industrial dust. The characteristics of this disease cause the lung tissue to show specific texture and morphological changes on chest X-rays. However, these changes are often similar to the imaging manifestations of other diseases such as pneumonia and tuberculosis, which increases the difficulty of segmentation and regional division.

[0003] Traditional lung zoning strategies in the diagnosis of pneumoconiosis are significantly lacking in careful consideration of lung texture features, especially the failure to accurately partition based on the lung texture features and fine structures unique to pneumoconiosis. Such traditional zoning methods do not include the changes in lung texture caused by pneumoconiosis in the zoning basis, and therefore are difficult to serve as an effective benchmark for lung diagnosis of pneumoconiosis. In addition, the current lung zoning methods have many inconveniences in the selection and identification of zoning basis, resulting in insufficient accuracy in lung regional division. Specifically, these zoning methods fail to make full use of the unique manifestations of pneumoconiosis in lung imaging, such as the diffuse distribution of fibrosis, thickening and disorder of lung texture, and other key features, to perform more detailed and accurate regional divisions. Therefore, when the existing lung zoning methods are applied to the diagnosis of pneumoconiosis, the reliability and effectiveness of their zoning results are limited to a certain extent. Summary of the invention

[0004] The invention provides a method, system and storage medium for segmenting lung fields and dividing regions of pneumoconiosis.

[0005] The technical solution of the present invention is as follows:

[0006] A method for segmenting and dividing lung fields for pneumoconiosis, the specific steps comprising:

[0007] S1, scaling and pixel value normalization of the input chest X-ray using a bilinear interpolation method, and then performing histogram equalization processing to obtain a preprocessed chest X-ray;

[0008] S2, convolution processing is performed on the preprocessed chest radiograph to generate an initial feature map, followed by downsampling through a pooling layer to generate a next-level feature map, and then a double attention process is performed to obtain an encoder feature map with multi-scale features, followed by upsampling to obtain a decoder feature map, and the detail features of the encoder feature map are fused to the semantic features of the decoder feature map to obtain a spliced ​​feature map, and pooling is performed to obtain a mask image;

[0009] S3, detecting the connected domains in the mask image, extracting the two connected domains with the largest areas as regions of interest, locating the regions of interest as the lung field region, establishing a first rectangular coordinate system with the center point of the mask image as the origin, respectively obtaining the minimum and maximum values ​​of the ordinates of the contour of the lung field region, and locating the corresponding positions as the costophrenic angle and the apex of the lung, respectively;

[0010] S4. Based on the contour of the lung field area, a spatial index structure containing multiple subtrees is constructed. The costophrenic angle is used as the initial seed point. Based on the distance between the node and the longitudinal axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located. The adjacent key points of the left lung are located as the left lung diaphragm, and the adjacent key points of the right lung are located as the right lung cardiophrenic angle.

[0011] S5. The line connecting the right cardiophrenic angle and the right costophrenic angle is divided into three equal parts, and the dividing point close to the right cardiophrenic angle is the position of the right diaphragm top; the line connecting the left diaphragm and the left costophrenic angle is divided into two equal parts, and the dividing point is the position of the left diaphragm top; the apex and diaphragm top of the same lung field area are mapped to the vertical axis of the first rectangular coordinate system, and the line segment between the mapping points is divided into three equal parts. The straight line where the dividing point is located is parallel to the horizontal axis of the first rectangular coordinate system, and the corresponding lung field area is divided into three areas.

[0012] In S4, based on the distance between the node and the vertical axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located, which specifically includes constructing a second rectangular coordinate system for subtree division; selecting a subtree to start searching; judging the straight-line Euclidean distance from the current node to the initial seed point and the distance from the current node to the vertical axis of the first coordinate system in the subtree to determine the subtree to be searched, and finding the node closest to the vertical axis of the first coordinate system in the subtree to be searched.

[0013] The specific steps for constructing the second rectangular coordinate system for subtree partitioning are:

[0014] The point corresponding to the average value of the costophrenic angle coordinates and the lung apex coordinates of each lung field area is taken as the origin, and the second rectangular coordinate system of each lung field area is established. The area of ​​the left lung on the vertical axis of the second rectangular coordinate system is the left subtree, and the area of ​​the right lung is the right subtree; the costophrenic angle is used as the initial seed point, and the midpoint of the edge feature points of two adjacent lung field areas is used as the node.

[0015] The specific steps for selecting the subtree to start searching are:

[0016] A bottom-up search is performed from the initial seed point of a side subtree in a lung field area to query the relationship between the next node and the vertical axis of the second rectangular coordinate system; if the node is located in the left lung of the vertical axis of the second rectangular coordinate system, the left subtree is searched first; if the node is located in the right lung of the vertical axis of the second rectangular coordinate system, the right subtree is searched first.

[0017] In the subtree, the straight-line Euclidean distance from the current node to the initial seed point is calculated, and the size of the distance from the current node to the vertical axis of the first coordinate system is used to determine the subtree to be searched, and the node closest to the vertical axis of the first coordinate system is found in the subtree to be searched. The specific steps are:

[0018] In the same lung field area, the relationship between the straight-line Euclidean distance from the current node to the initial seed point and the distance from the current node to the vertical axis of the first coordinate system is determined. If the distance from the current node to the vertical axis of the first coordinate system is not greater than the Euclidean distance from the current node to the initial seed point, the current node is retained as a retained point. From the retained points located below the horizontal axis of the second rectangular coordinate system, the retained points closest to the vertical axis of the first rectangular coordinate system are selected. If the selected retained points are not unique, the points closest to the initial seed point are selected as adjacent key points.

[0019] After S4, it also includes:

[0020] Repeat the operation of S4, and after iterating a preset number of times, determine whether the right lung cardiophrenic angle and the left lung diaphragm are the same node after each iteration. If they are not the same node, select the node that is positioned as the right lung cardiophrenic angle or the left lung diaphragm the most times during the preset number of iterations as the right lung cardiophrenic angle or the left lung diaphragm.

[0021] Detail features include boundary features and texture features in the encoder feature map.

[0022] Semantic features include morphological structure features and position features in the decoder feature map.

[0023] A pneumoconiosis lung field segmentation and region division system, comprising:

[0024] Preprocessing module: The input chest X-ray is scaled and pixel value normalized using bilinear interpolation method, and then histogram equalization is performed to obtain a preprocessed chest X-ray;

[0025] Feature extraction module: The pre-processed chest radiograph is convolved to generate an initial feature map, which is then downsampled through a pooling layer to generate a next-level feature map. The encoder feature map with multi-scale features is then obtained through dual attention processing, which is then upsampled to obtain a decoder feature map. The detailed features of the encoder feature map are fused to the semantic features of the decoder feature map to obtain a spliced ​​feature map, which is then pooled to obtain a mask image.

[0026] Positioning module: detect the connected domains in the mask image, extract the two connected domains with the largest area as the region of interest, locate the region of interest as the lung field area, establish the first rectangular coordinate system with the center point of the mask image as the origin, obtain the minimum and maximum values ​​of the ordinate of the lung field area contour, and locate the corresponding positions as the costophrenic angle and the apex of the lung;

[0027] Key point positioning module: Based on the contour of the lung field area, a spatial index structure containing multiple subtrees is constructed. The costophrenic angle is used as the initial seed point. Based on the distance between the node and the longitudinal axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located. The adjacent key points of the left lung are located as the left lung diaphragm, and the adjacent key points of the right lung are located as the right lung cardiophrenic angle.

[0028] Regional segmentation module: the line connecting the right cardiophrenic angle and the right costophrenic angle is divided into three equal parts, and the dividing point close to the right cardiophrenic angle is the position of the right diaphragm top; the line connecting the left diaphragm and the left costophrenic angle is divided into two equal parts, and the dividing point is the position of the left diaphragm top; the apex and diaphragm top of the same lung field area are mapped to the vertical axis of the first rectangular coordinate system, the line segment between the mapping points is divided into three equal parts, and the straight line where the dividing point is located is parallel to the horizontal axis of the first rectangular coordinate system, and the corresponding lung field area is divided into three areas.

[0029] A storage medium for pneumoconiosis lung field segmentation and regional division, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute any one of the pneumoconiosis lung field segmentation and regional division methods.

[0030] Beneficial effects:

[0031] The method of the present invention focuses on the extraction of lung texture features when extracting features. Texture features provide detailed information and accurate positioning, while semantic features help capture large-scale lung structures. In this way, the present invention can better handle multi-scale features, thereby improving segmentation accuracy, effectively retaining lung structure details and context information, and ensuring segmentation accuracy and robustness.

[0032] The method of the present invention uses the costophrenic angle as the initial seed point, gradually expands the search, and accurately locates the right cardiophrenic angle and the diaphragm position of the left lung, ensuring accurate identification of key anatomical points. The method is simple and easy to use, and the straight line connection and segmentation based on the key points are easy to program and automate, achieving standardization of the division process, reducing the influence of subjective factors on the division results, and helping to locate lesions and evaluate the distribution of diseases in the lungs, especially for more accurate analysis of regional lesions such as pneumoconiosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In the attached picture:

[0034] Figure 1 This is a schematic diagram of the pre-processed chest radiograph;

[0035] Figure 2 is the mask image;

[0036] Figure 3 It is a schematic diagram of the lung field area;

[0037] Figure 4 This is a schematic diagram of the positioning points.

[0038] The nodes represented by the reference numerals in the figure are:

[0039] 1. Apex of the right lung; 2. Apex of the left lung; 3. Diaphragm of the left lung; 4. Cardiodiaphragmatic angle of the right lung; 5. Costophrenic angle of the right lung; 6. Costophrenic angle of the left lung. DETAILED DESCRIPTION

[0040] The technical solution of the present invention is as follows:

[0041] A method for segmenting and dividing lung fields for pneumoconiosis, the specific steps comprising:

[0042] S1. The input chest X-ray is scaled and pixel value normalized using bilinear interpolation method, and then histogram equalization is performed to obtain a preprocessed chest X-ray, such as Figure 1 .

[0043] In the experimental application, this step resizes the image to 512 × 512 pixels. This size matches the input layer size of the algorithm and supports the multi-layer downsampling and upsampling process of the network.

[0044] During the specific adjustment process, the bilinear interpolation method is used to scale the input image to ensure that the key features of the lung area are not lost due to size changes and to meet the requirements of computer network input.

[0045] Normalizing pixel values ​​ensures that the input data has a consistent dynamic range and resolution. Histogram equalization is used to enhance the contrast between the lung area and other body tissues, thereby significantly improving the distinction between the lungs and surrounding structures, providing clearer input for subsequent steps.

[0046] S2. Perform convolution processing on the preprocessed chest radiograph to generate the initial feature map, then perform downsampling through the pooling layer to generate the next level feature map, and then perform double attention processing to obtain the encoder feature map with multi-scale features, and then perform upsampling to obtain the decoder feature map. The detailed features of the encoder feature map are fused to the semantic features of the decoder feature map to obtain the spliced ​​feature map, and the pooling process is performed to obtain the mask image. Figure 2 .

[0047] The convolution layer performs initial feature extraction on the preprocessed chest X-ray to obtain the initial feature map. The pooling layer downsamples the feature enhancement map to obtain the next-level feature map. The attention mechanism performs feature enhancement on the next-level feature map to obtain an encoder feature map of multi-scale features, which is transmitted to the upsampling network for upsampling to generate a decoding feature map.

[0048] The downsampling process reduces the preprocessed chest X-ray to 256×256, 128×128, 64×64, and 32×32 in turn, and gradually restores it to 512×512 through the corresponding upsampling layers. Each upsampling layer fuses the features of the corresponding downsampling layer through jump connections to retain multi-scale features and improve partitioning accuracy.

[0049] For the preprocessed chest X-ray, multi-scale features are extracted by downsampling layer by layer, including detail features at the high-resolution stage and semantic features at the low-resolution stage.

[0050] Detailed features include boundary features and texture features of the encoder feature map, which help with precise positioning.

[0051] Semantic features include morphological structural features and positional features of the decoder feature map, which helps capture large-scale lung structures.

[0052] In this way, multi-scale features can be better processed, thereby improving the accuracy of partitioning. In this step, a feature-connected network combined with an attention mechanism is used to accurately segment the lung area, remove interference factors that are not related to pneumoconiosis diagnosis, and provide high-quality data support for intelligent diagnosis.

[0053] S3, detect the connected domains in the mask image, extract the two connected domains with the largest area as the regions of interest, refer to Figure 3 , the region of interest is located as the lung field area, and the first rectangular coordinate system with the center point of the mask image as the origin is established. The minimum and maximum values ​​of the ordinate of the contour of the lung field area are obtained respectively, and the corresponding positions are located as the costophrenic angle and the apex of the lung.

[0054] The region growing method can be used to detect connected domains. This method is simple and efficient and does not occupy later network resources.

[0055] The left lung field area is the left lung field area, the right lung field area is the right lung field area, the position of the minimum value point of the ordinate of each lung field area contour is the costophrenic angle position of the left lung field area or the right lung field area, and the position of the maximum value point of the ordinate of each lung field area contour is the apex position of the left lung field area or the right lung field area. Figure 3 , the direction from minimum to maximum is from bottom to top.

[0056] S4. Based on the contour of the lung field area, a spatial index structure containing multiple subtrees is constructed. The costophrenic angle is used as the initial seed point. Based on the distance between the node and the longitudinal axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located. The adjacent key points of the left lung are located as the left lung diaphragm, and the adjacent key points of the right lung are located as the right lung cardiophrenic angle.

[0057] Based on the distance between the node and the vertical axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located, specifically including constructing a second rectangular coordinate system for subtree division; selecting a subtree to start searching; judging the straight-line Euclidean distance from the current node to the initial seed point in the subtree and the distance from the current node to the vertical axis of the first coordinate system to determine the subtree to be searched, and finding the node closest to the vertical axis of the first coordinate system in the subtree to be searched.

[0058] The point corresponding to the average value of the costophrenic angle coordinates and the lung apex coordinates of each lung field area is taken as the origin, and the second rectangular coordinate system of each lung field area is established. The area of ​​the left lung on the vertical axis of the second rectangular coordinate system is the left subtree, and the area of ​​the right lung is the right subtree; the costophrenic angle is used as the initial seed point, and the midpoint of the edge feature points of two adjacent lung field areas is used as the node.

[0059] A bottom-up search is performed from the initial seed point of a side subtree in a lung field area to query the relationship between the next node and the vertical axis of the second rectangular coordinate system; if the node is located in the left lung of the vertical axis of the second rectangular coordinate system, the left subtree is searched first; if the node is located in the right lung of the vertical axis of the second rectangular coordinate system, the right subtree is searched first.

[0060] In the same lung field area, the linear Euclidean distance from the current node to the initial seed point and the distance from the current node to the vertical axis of the first coordinate system are determined. If the distance from the current node to the vertical axis of the first coordinate system is not greater than the Euclidean distance from the current node to the initial seed point, the current node is retained as a reserved point. From the reserved points located below the horizontal axis of the second rectangular coordinate system, the reserved points closest to the vertical axis of the first rectangular coordinate system are selected. If the selected reserved points are not unique, the points closest to the initial seed point are selected as adjacent key points, such as Figure 4 shown.

[0061] The horizontal axis of the second rectangular coordinate system divides the left subtree and the right subtree into two small subtrees respectively. The subtree for initial search is selected, and then the small subtrees that meet the above requirements are screened out for further search. When searching the small subtrees, only the small subtrees below the horizontal axis of the second rectangular coordinate system need to be searched, because the right lung cardiodiaphragm angle or the left lung diaphragm only appears in this area, thereby reducing unnecessary searches.

[0062] In order to improve the accuracy of positioning, the operation of S4 is repeated for a preset number of iterations, and it is determined whether the right cardiophrenic angle and the left diaphragm are the same node after each iteration. If they are not the same node, the node that is positioned as the right cardiophrenic angle or the left diaphragm the most times during the preset number of iterations is selected as the right cardiophrenic angle or the left diaphragm.

[0063] During the search process, the relationship between the node and the horizontal axis of the second rectangular coordinate system is used to determine whether each subtree needs further exploration, thereby avoiding unnecessary searches, improving search efficiency, and avoiding the long duration of brute force searches. Due to the balance and recursive structure of the subtree, the query efficiency is much higher than that of direct searches.

[0064] In this step, the method of the present invention is used to quickly query the lung field contour points, accurately locate the key points of the lungs, and ensure the accuracy of the area division.

[0065] S5. The line connecting the right cardiophrenic angle and the right costophrenic angle is divided into three equal parts, and the dividing point close to the right cardiophrenic angle is the position of the right diaphragm top; the line connecting the left diaphragm and the left costophrenic angle is divided into two equal parts, and the dividing point is the position of the left diaphragm top; the apex and diaphragm top of the same lung field area are mapped to the vertical axis of the first rectangular coordinate system, and the line segment between the mapping points is divided into three equal parts. The straight line where the dividing point is located is parallel to the horizontal axis of the first rectangular coordinate system, and the corresponding lung field area is divided into three areas.

[0066] The key anatomical landmarks: costophrenic angle, right cardiophrenic angle, and left pulmonary diaphragm are used as positioning references to ensure that the regional division conforms to the anatomical structural characteristics and can better adapt to the physiological differences of different patients.

[0067] The method is simple and easy to operate, and the straight line connection and partitioning based on key points are easy to program and automate, so the standardization of the partitioning process is achieved, and the influence of subjective factors on the partitioning results is reduced.

[0068] Dividing the six regions in a vertically equal manner can accurately capture the lesion characteristics of each lung field area, help locate the lesions and evaluate the distribution of the disease in the lungs, especially for regional lesions such as pneumoconiosis. Regional division can more clearly present the specific parts of the lesions involved, providing a quantitative basis for pneumoconiosis staging, treatment decisions and efficacy evaluation.

[0069] The present invention solves the technical problem of lung field segmentation and regional division of pneumoconiosis by integrating the segmentation algorithm of chest X-ray and the key point positioning algorithm, reduces the manual operation burden of medical personnel, and improves the segmentation accuracy and efficiency. On the chest X-ray data set of pneumoconiosis, compared with the U-Net segmentation method, the Diess similarity coefficient obtained by the method of the present invention is increased by 2.1%, and the intersection-union ratio is increased by 1.6%.

[0070] The following are the specific comparison data:

[0071] U-Net segmentation method: the Dyce similarity coefficient is 94.1%, and the intersection-over-union ratio is 96.5%;

[0072] The method of the present invention has a Dess similarity coefficient of 96.2% and an intersection-union ratio of 98.1%.

[0073] The results show that the method of the present invention has significant advantages in the accuracy of lung field segmentation. At the same time, it also improves the automation level of pneumoconiosis screening, reduces the dependence on professional doctors, enhances the reliability and robustness of the system, and has broad application prospects.

[0074] A pneumoconiosis lung field segmentation and region division system, comprising:

[0075] Preprocessing module: The input chest X-ray is scaled and pixel value normalized using bilinear interpolation method, and then histogram equalization is performed to obtain a preprocessed chest X-ray;

[0076] Feature extraction module: The pre-processed chest radiograph is convolved to generate an initial feature map, which is then downsampled through a pooling layer to generate a next-level feature map. The encoder feature map with multi-scale features is then obtained through dual attention processing, which is then upsampled to obtain a decoder feature map. The detailed features of the encoder feature map are fused to the semantic features of the decoder feature map to obtain a spliced ​​feature map, which is then pooled to obtain a mask image.

[0077] Positioning module: detect the connected domains in the mask image, extract the two connected domains with the largest area as the region of interest, locate the region of interest as the lung field area, establish the first rectangular coordinate system with the center point of the mask image as the origin, obtain the minimum and maximum values ​​of the ordinate of the lung field area contour, and locate the corresponding positions as the costophrenic angle and the apex of the lung;

[0078] Key point positioning module: Based on the contour of the lung field area, a spatial index structure containing multiple subtrees is constructed. The costophrenic angle is used as the initial seed point. Based on the distance between the node and the longitudinal axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located. The adjacent key points of the left lung are located as the left lung diaphragm, and the adjacent key points of the right lung are located as the right lung cardiophrenic angle.

[0079] Regional segmentation module: the line connecting the right cardiophrenic angle and the right costophrenic angle is divided into three equal parts, and the dividing point close to the right cardiophrenic angle is the position of the right diaphragm top; the line connecting the left diaphragm and the left costophrenic angle is divided into two equal parts, and the dividing point is the position of the left diaphragm top; the apex and diaphragm top of the same lung field area are mapped to the vertical axis of the first rectangular coordinate system, the line segment between the mapping points is divided into three equal parts, and the straight line where the dividing point is located is parallel to the horizontal axis of the first rectangular coordinate system, and the corresponding lung field area is divided into three areas.

[0080] A storage medium for pneumoconiosis lung field segmentation and regional division, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute any one of the pneumoconiosis lung field segmentation and regional division methods.

Claims

1. A method for segmenting and dividing lung fields in pneumoconiosis, characterized in that: The specific steps include: S1, scaling and pixel value normalization of the input chest X-ray using a bilinear interpolation method, and then performing histogram equalization processing to obtain a preprocessed chest X-ray; S2, convolution processing is performed on the preprocessed chest radiograph to generate an initial feature map, followed by downsampling through a pooling layer to generate a next-level feature map, and then a double attention process is performed to obtain an encoder feature map with multi-scale features, followed by upsampling to obtain a decoder feature map, and the detail features of the encoder feature map are fused to the semantic features of the decoder feature map to obtain a spliced ​​feature map, and pooling is performed to obtain a mask image; S3, detecting the connected domains in the mask image, extracting the two connected domains with the largest areas as regions of interest, locating the regions of interest as the lung field region, establishing a first rectangular coordinate system with the center point of the mask image as the origin, respectively obtaining the minimum and maximum values ​​of the ordinates of the contour of the lung field region, and locating the corresponding positions as the costophrenic angle and the apex of the lung, respectively; S4. Based on the contour of the lung field area, a spatial index structure containing multiple subtrees is constructed. The costophrenic angle is used as the initial seed point. Based on the distance between the node and the longitudinal axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located. The adjacent key points of the left lung are located as the left lung diaphragm, and the adjacent key points of the right lung are located as the right lung cardiophrenic angle. S5. The line connecting the right cardiophrenic angle and the right costophrenic angle is divided into three equal parts, and the dividing point close to the right cardiophrenic angle is the position of the right diaphragm top; the line connecting the left diaphragm and the left costophrenic angle is divided into two equal parts, and the dividing point is the position of the left diaphragm top; the apex and diaphragm top of the same lung field area are mapped to the vertical axis of the first rectangular coordinate system, and the line segment between the mapping points is divided into three equal parts. The straight line where the dividing point is located is parallel to the horizontal axis of the first rectangular coordinate system, and the corresponding lung field area is divided into three areas.

2. The pneumoconiosis lung field segmentation and region division system according to claim 1, characterized in that: In S4, based on the distance between the node and the longitudinal axis of the first rectangular coordinate system and the distance between the node and the initial seed point, the adjacent key point is located, specifically including constructing a second rectangular coordinate system for subtree division; selecting a subtree to start searching; The straight-line Euclidean distance from the current node to the initial seed point and the distance from the current node to the vertical axis of the first coordinate system are determined in the subtree to determine the subtree to be searched, and the node closest to the vertical axis of the first coordinate system is found in the subtree to be searched.

3. The pneumoconiosis lung field segmentation and region division system according to claim 2, characterized in that: The specific steps for constructing the second rectangular coordinate system for subtree partitioning are: The point corresponding to the average value of the costophrenic angle coordinates and the lung apex coordinates of each lung field area is taken as the origin, and the second rectangular coordinate system of each lung field area is established. The area of ​​the left lung on the vertical axis of the second rectangular coordinate system is the left subtree, and the area of ​​the right lung is the right subtree; the costophrenic angle is used as the initial seed point, and the midpoint of the edge feature points of two adjacent lung field areas is used as the node.

4. The method for segmenting and dividing lung fields of pneumoconiosis according to claim 2, characterized in that: The specific steps for selecting the subtree to start searching are: A bottom-up search is performed from the initial seed point of a side subtree of a lung field region to query the relationship between the next node and the vertical axis of the second rectangular coordinate system; if the node is located in the left lung of the vertical axis of the second rectangular coordinate system, the left subtree is searched first; If the node is located in the right lung of the vertical axis of the second rectangular coordinate system, the right subtree is searched first.

5. The method for segmenting and dividing lung fields of pneumoconiosis according to claim 2, characterized in that: In the subtree, the straight-line Euclidean distance from the current node to the initial seed point is calculated, and the size of the distance from the current node to the vertical axis of the first coordinate system is used to determine the subtree to be searched, and the node closest to the vertical axis of the first coordinate system is found in the subtree to be searched. The specific steps are: In the same lung field area, the relationship between the straight-line Euclidean distance from the current node to the initial seed point and the distance from the current node to the vertical axis of the first coordinate system is determined. If the distance from the current node to the vertical axis of the first coordinate system is not greater than the Euclidean distance from the current node to the initial seed point, the current node is retained as a retained point. From the retained points located below the horizontal axis of the second rectangular coordinate system, the retained points closest to the vertical axis of the first rectangular coordinate system are selected. If the selected retained points are not unique, the points closest to the initial seed point are selected as adjacent key points.

6. The method for segmenting and dividing lung fields of pneumoconiosis according to claim 1, characterized in that: After S4, it also includes: Repeat the operation of S4, and after iterating a preset number of times, determine whether the right lung cardiophrenic angle and the left lung diaphragm are the same node after each iteration. If they are not the same node, select the node that is positioned as the right lung cardiophrenic angle or the left lung diaphragm the most times during the preset number of iterations as the right lung cardiophrenic angle or the left lung diaphragm.

7. The method for segmenting and dividing lung fields for pneumoconiosis according to claim 1, wherein the detail features include boundary features and texture features in an encoder feature map.

8. According to the method for pneumoconiosis lung field segmentation and region division as described in claim 1, the semantic features include morphological structure features and position features in the decoder feature map.

9. A pneumoconiosis lung field segmentation and region division system, characterized in that: include: Preprocessing module: The input chest X-ray is scaled and pixel value normalized using bilinear interpolation method, and then histogram equalization is performed to obtain a preprocessed chest X-ray; Feature extraction module: The pre-processed chest radiograph is convolved to generate an initial feature map, which is then downsampled through a pooling layer to generate a next-level feature map. The encoder feature map with multi-scale features is then obtained through dual attention processing, which is then upsampled to obtain a decoder feature map. The detailed features of the encoder feature map are fused to the semantic features of the decoder feature map to obtain a spliced ​​feature map, which is then pooled to obtain a mask image. Positioning module: detect the connected domains in the mask image, extract the two connected domains with the largest area as the region of interest, locate the region of interest as the lung field area, establish the first rectangular coordinate system with the center point of the mask image as the origin, obtain the minimum and maximum values ​​of the ordinate of the lung field area contour, and locate the corresponding positions as the costophrenic angle and the apex of the lung; Key point positioning module: Based on the contour of the lung field area, a spatial index structure containing multiple subtrees is constructed. The costophrenic angle is used as the initial seed point. Based on the distance between the node and the longitudinal axis of the first rectangular coordinate system and the distance from the initial seed point, the adjacent key points are located. The adjacent key points of the left lung are located as the left lung diaphragm, and the adjacent key points of the right lung are located as the right lung cardiophrenic angle. Regional segmentation module: the line connecting the right cardiophrenic angle and the right costophrenic angle is divided into three equal parts, and the dividing point close to the right cardiophrenic angle is the position of the right diaphragm top; the line connecting the left diaphragm and the left costophrenic angle is divided into two equal parts, and the dividing point is the position of the left diaphragm top; the apex and diaphragm top of the same lung field area are mapped to the vertical axis of the first rectangular coordinate system, the line segment between the mapping points is divided into three equal parts, and the straight line where the dividing point is located is parallel to the horizontal axis of the first rectangular coordinate system, and the corresponding lung field area is divided into three areas.

10. A storage medium for lung field segmentation and regional division for pneumoconiosis, characterized in that: The storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the method for segmenting and dividing the lung field of pneumoconiosis according to any one of claims 1 to 8.

Citation Information

Cited By

  • Equipment identification and quality grade joint evaluation method for substation inspection image

    CN121305453A