Method and device for detecting red and swollen airway mucosa, medium and program product

By segmenting and predicting redness and swelling in airway imaging data, combined with bi-branch feature extraction and cross-branch attention fusion, the subjectivity and inconsistency of airway mucosal redness and swelling detection in existing technologies are solved, achieving more accurate and reliable airway mucosal redness and swelling detection.

CN121482001APending Publication Date: 2026-02-06BEIJING CHAOYANG HOSPITAL CAPITAL MEDICAL UNIVERSITY
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511674561.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Current technologies rely on doctors' subjective assessments to detect airway mucosal redness and swelling. This is easily affected by factors such as uneven lighting, shooting angle, and mucus adhesion. The lack of objective and quantifiable evaluation criteria leads to poor diagnostic accuracy and consistency, especially in the early or mild stages of inflammation.

Method used

By segmenting and predicting redness and swelling in airway imaging data, a pre-trained airway segmentation model is used to perform morphological dilation and erosion operations. Combined with bi-branch feature extraction and cross-branch attention fusion, the color and texture features of the redness and swelling area are captured. The receptive field is dynamically adjusted to segment lesions, and the gradient-sensitive loss function is used to optimize the model.

Benefits of technology

It significantly improves the accuracy and robustness of airway mucosal redness and swelling detection, enabling more granular assessment of disease severity, ensuring that model output aligns with clinical evaluation criteria, reducing false positive rates, and improving diagnostic reliability and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121482001A_ABST
    Figure CN121482001A_ABST
Patent Text Reader

Abstract

The invention discloses a detection method and device for red and swollen airway mucosa, a medium and a program product, relates to the field of intelligent medical treatment, and aims to solve the problem of performance bottleneck caused by high false positive rate, easiness in misclassification of non-mucosa regions, algorithm dependence on RGB (Red, Green, Blue) space or single feature extraction and fixed receptive field in the prior art. The core of the method is that firstly, a mucous membrane area mask is accurately generated through a pre-trained airway segmentation model in combination with morphological operation so as to effectively inhibit interference of non-mucous membrane areas such as cartilage rings; further, in the feature extraction stage, convolution analysis is focused on red and swollen sensitive R and G channels, and blood vessel blurring and local texture features representing a focus are fused, so that collaborative modeling of chromaticity shift and an organization structure is realized; and finally, lesion statistics is introduced, so that the model can adaptively capture lesions with different scales, clinical indexes such as the number and the area of the lesions directly participate in model training, and end-to-end joint optimization is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent medical treatment, and more particularly, to a method, device, medium and program product for detecting airway mucosa redness. BACKGROUND

[0002] Airway mucosa redness is a key clinical sign shared by many respiratory diseases such as chronic bronchitis, bronchial asthma, airway infection and early tumor lesions. The range, degree and color change of the redness directly reflect the local inflammation level, histopathological state and disease progression stage, and are an important visual basis for clinical decision-making. At present, in clinical practice, doctors mainly rely on visual assessment and subjective grading of mucosa state through airway image data. However, this method has significant limitations, which seriously restricts the accuracy and consistency of diagnosis. First, airway image data is easily disturbed by complex factors such as uneven cavity illumination, shooting angle and distance, mucosa surface mucus adhesion and reflection, resulting in distortion of color and texture information; second, the determination of "redness" is heavily dependent on the personal experience of physicians, and there may be significant differences in the evaluation results between different observers or even the same observer at different times, lacking objective and quantifiable evaluation criteria; finally, in the early stage of the disease or when the inflammation is mild, the mucosa redness often presents small range, fuzzy boundary and subtle color gradient with the surrounding normal tissue. This early signal that is difficult to accurately distinguish with the naked eye is easily overlooked in subjective assessment, thereby increasing the risk of inconsistent determination, missed diagnosis or misdiagnosis. SUMMARY

[0003] The method of the present application can predict whether a patient has airway mucosa redness by airway segmentation and redness segmentation of airway image data, and determine the degree of airway mucosa redness in patients with airway mucosa redness by calculating the average severity of connected domains, which can more finely determine the degree of disease in patients.

[0004] The present application discloses an airway image segmentation method, comprising:

[0005] S1: acquiring airway image data;

[0006] S2: inputting the airway image data into a pre-trained airway segmentation model to obtain a first airway segmentation image; performing a morphological dilation operation and an erosion operation on the first airway segmentation image to obtain a mucosa region mask and a mucosa boundary region; and performing element-wise multiplication on the mucosa region mask and the airway image data to obtain a mucosa main body region;

[0007] S3: fusing the mucosa main body region and the mucosa boundary region to generate an airway segmentation image.

[0008] Further, the mucosa region mask is obtained by performing a morphological dilation operation and an erosion operation on the first airway segmentation image, and includes:

[0009] S21: performing a morphological dilation operation on the first airway segmentation image to expand the region to obtain an expanded feature;

[0010] S22: obtaining a center line by skeleton extraction from the airway segmentation image;

[0011] S23: generating a mucosa region mask by subtracting the center line from the expanded feature through an erosion operation.

[0012] Further, the formula for inputting the airway image data into the pre-trained airway segmentation model to obtain the first airway segmentation image is: , wherein, represents the first airway segmentation image, which is a binary mask format, and is used to identify the airway region; represents the airway image data; represents the pre-trained airway segmentation model, which is used to extract the airway structure from the image.

[0013] Further, the formula for obtaining the mucosa region mask is: , wherein, represents the mucosa region mask, which is a binary mask format, and is used to define the region of interest; represents a morphological dilation operation, specifically using a 5x5 circular structural element, which is used to expand the airway segmentation region; represents a morphological erosion operation, which is used to subtract the skeleton region from the expanded region; represents a morphological skeleton extraction operation, which is used to obtain the center line of the airway segmentation region to identify the non-mucosa structure.

[0014] Further, the formula for performing element-wise multiplication of the mucosa region mask and the airway image data to obtain the mucosa main region is:

[0015] , wherein, represents the mucosa region mask a full 1 matrix with the same dimension; represents the expanded region of the airway segmentation boundary, specifically extracting the boundary region of the first airway segmentation image to achieve; is a boundary enhancement coefficient, and the preferred value is , which is used to control the weight of the airway boundary region in the image of interest region; represents the mucosa main region, which is a three-channel RGB image, and only contains the mucosa region and part of the airway boundary region, and the non-mucosa region such as cartilage ring is effectively suppressed.

[0016] This invention also discloses a method for constructing an airway mucosal redness and swelling detection model, comprising:

[0017] S31: Obtain airway imaging dataset and labels;

[0018] S32: The airway image dataset is segmented using the airway image segmentation method described above to obtain an airway segmentation image;

[0019] S33: Perform bi-branch feature extraction on the airway segmentation image to obtain an airway feature map;

[0020] Furthermore, the dual-branch feature extraction includes:

[0021] S301: Calculate the difference between the R and G channels in the airway segmentation image and perform a convolution operation on the difference to obtain chromaticity invariant spatial features;

[0022] Furthermore, the formula for calculating the difference between the R and G channels in the airway segmentation image and performing a convolution operation on the difference to obtain the chromaticity-invariant spatial features is as follows: ,in, It represents the chromaticity invariant spatial features, characterizes the chromaticity shift in the swollen area, and is a single-channel floating-point feature map; This represents a 3×3 convolution operation; The red channels represent the main area of ​​the mucosa; Green channels indicating the main mucosal region; This represents the mean of the red channel, calculated by statistically analyzing the entire mucosal body area. The red channel pixel values ​​are calculated; This represents the average value of the green channel, calculated by statistically analyzing the entire mucosal body area. The green channel pixel values ​​are calculated. The standard deviation of the red channel is represented by statistics from the entire mucosal body region. The red channel pixel values ​​are calculated; The standard deviation of the green channel is represented by statistical analysis of the entire mucosal body area. The green channel pixel values ​​are calculated.

[0023] further, and By respectively from the main mucosal region The red and green channels were extracted from the three channels to obtain the data for the main mucosal region. For RGB images, directly take the first channel. The second channel is .

[0024] S302: By converting the airway segmentation image into a brightness channel, local feature extraction is performed using a local binary mode operator, and the spatial gradient of the airway image data is combined with the residual block for depth encoding to capture the vascular blurring and texture of the swollen area to obtain local texture features.

[0025] Furthermore, the specific formula for S302 is as follows:

[0026] ,in, Indicates based on airway imaging data The gradient saliency feature extraction function extracts gradient saliency features as single-channel floating-point feature maps, and the calculation method is expressed as follows: ; For weight fusion, the preferred value is This is used to balance the contributions of local binary pattern features and gradient significance features; It represents local texture features and characterizes the texture changes in the swollen area. It is a multi-channel floating-point feature map that contains texture abstraction representations at different scales after being encoded by residual blocks. This represents a residual block, specifically containing consecutive 3×3 convolutional layers, each followed by... An activation function is then used, followed by a residual concatenation with the input of the residual block for deep feature encoding. This represents a local binary pattern operator, specifically employing a calculation method with a neighborhood of 8 and a radius of 1, used to extract local texture features; This represents the brightness channel of the main mucosal region.

[0027] S303: By splicing chromaticity-invariant spatial features and local texture features along the channel dimension, an airway feature map with fused multi-scale features is obtained.

[0028] S34: Perform lesion segmentation on the airway feature map to obtain a predicted segmentation map;

[0029] Furthermore, the lesion segmentation is performed by dynamically adjusting the receptive field, including: performing global average pooling, global max pooling, and global standard deviation pooling calculations in parallel on the airway feature map, and then concatenating the parallel output results to obtain a global descriptive vector; calculating the dynamic cavity rate based on the global descriptive vector to obtain the dynamic receptive field, and performing lesion segmentation based on the dynamic receptive field to obtain a predicted segmentation map.

[0030] Furthermore, the specific formula for calculating the global description vector is as follows: ,in, Represents a global description vector, which is in vector format and contains information on the mean, maximum, and standard deviation of the features, representing the global statistical information of the fused features; This represents a global average pooling operation that compresses the spatial dimension to 1×1 while retaining the channel dimension. This represents global max pooling, which compresses the spatial dimension to 1×1 while preserving the channel dimension. This indicates global standard deviation pooling, which compresses the spatial dimension to 1×1 while retaining the channel dimension.

[0031] Furthermore, the dynamic hole rate calculation is as follows: a dynamic hole weight matrix is ​​constructed, an activation function is used to map the global description vector to the dynamic hole weight matrix, and the matrix is ​​scaled to a preset minimum and maximum hole rate to obtain the dynamic hole rate.

[0032] Furthermore, the step of concatenating chroma-invariant spatial features and local texture features along the channel dimension to obtain an airway feature map with fused multi-scale features includes concatenating chroma-invariant spatial features and local texture features along the channel dimension to obtain a concatenation result, inputting the concatenation result into a channel attention module to adaptively adjust the weights of each channel to obtain channel attention features, inputting the concatenation result into a cross-branch attention fusion module to integrate chroma and texture information to obtain cross-branch attention fusion features, and adding the channel attention features and the cross-branch attention fusion features to output an airway feature map with fused multi-scale features.

[0033] Furthermore, the process of performing dilated convolution on the airway feature map to obtain dilated fused features includes performing dilated convolution on the airway feature map using a dynamic dilated rate to fuse multi-scale features and obtain dilated fused features.

[0034] Furthermore, the cross-branch attention fusion module is used to integrate chroma and texture information to obtain cross-branch attention fusion features by inputting the splicing results into the cross-branch attention fusion module: cross-attention calculation is performed on the splicing results to obtain the first branch result and the second branch result, and then the first branch result and the second branch result are added together to obtain the cross-branch attention fusion features.

[0035] S35: Compare the predicted segmentation map with the label, iteratively optimize the loss function, and obtain the airway mucosal redness and swelling detection model.

[0036] Furthermore, the airway mucosal redness and swelling detection model calculates boundary segmentation loss using a gradient-sensitive loss function, including: calculating pixel-level gradient weights based on the airway segmentation image; calculating the difference between the predicted segmentation image and the classification label of whether or not there is redness and swelling, and combining the pixel-level gradient weights to obtain the gradient-sensitive loss; and iteratively optimizing lesion boundary segmentation based on the gradient-sensitive loss.

[0037] Furthermore, the formula for calculating pixel-level gradient weights based on the airway segmentation image is as follows: ,in, Represents pixel-level gradient weights, used to adjust the importance of different regions in the loss function; This represents the weight enhancement coefficient, with a preferred value of [value missing]. This is used to control the magnitude of weight enhancement in areas with complex textures; express Gradient operators are used to calculate the spatial gradient of an image. Indicates the main mucosal region in the first... At 1 pixel gradient, through The operator calculates the result; Indicates the main mucosal region in the first... The grayscale value at each pixel is obtained by measuring the main area of ​​the mucous membrane. Obtained by converting to grayscale; Use pixel indexes to iterate through all pixel positions in the image; This represents the weight decay control parameter, with a preferred value of [value to be filled in]. It is used to adjust the decay rate of the weights as they change with the gradient.

[0038] Furthermore, the loss function of the detection model also includes Dice loss and area consistency loss, and the loss of the model is calculated through Dice loss, gradient sensitivity loss and area consistency loss.

[0039] Furthermore, the calculation of the labels of the predicted segmentation map and the real segmentation map... The gradient-sensitive loss derived from the norm difference is specifically achieved by calculating the difference between the labels of the predicted segmentation map and the ground truth segmentation map. Norm difference; based on the airway segmentation image, an exponential function is used to assign higher weights to textured regions with drastic gradient changes, strengthening the learning of boundary regions, and obtaining pixel-level gradient weights; the pixel-level gradient weights are multiplied by the norm difference. The gradient-sensitive loss is obtained from the norm difference.

[0040] Furthermore, the specific formula for calculating the gradient-sensitive loss is as follows: ,in, This represents gradient-sensitive loss, used to constrain the boundary accuracy of the segmentation results; Indicates the total number of pixels; Indicates the predicted segmentation map at the th The value at each pixel, with a range of [value]. Predicting segmentation maps through direct indexing In the The value at the position of each pixel is obtained; The true segmentation map represents the first segment. The value at each pixel is preferably 0 or 1; Indicates the predicted segmentation map at the th Gradient at each pixel; The true segmentation map represents the first segment. Gradient at each pixel; This represents the L1 norm.

[0041] Furthermore, the specific formula for calculating the loss of the model is as follows: ,in, This represents the total loss function, used as the final optimization objective during model training; This represents the area consistency loss, constraining the overall area difference between the predicted and actual regions, and is calculated as follows: ; express Loss, used to measure the overlap between predicted and true segmented regions, is based on the predicted segmentation map in the _____. The value at pixel i is different from the value at pixel j in the true segmentation image. The value at each pixel is calculated.

[0042] This invention also discloses a method for assessing airway redness and swelling lesions, comprising:

[0043] S71: Acquire mixed airway image data, and input the mixed airway image data into the airway mucosal redness and swelling detection model constructed by the method described above to obtain a predicted redness and swelling map;

[0044] Furthermore, the acquisition of the mixed airway image data is achieved by first combining a normal mucosal image with a randomly generated lesion shape mask, applying Gaussian blur to the masked area and merging it with the unmasked area to generate a basic redness and swelling composite image; then applying hue and saturation shifts to the basic redness and swelling composite image in the HSV color space and using random perturbation to obtain mixed airway image data, thereby simulating an increase in red hue and saturation in the redness and swelling area, enhancing the realism of the composite data, and thus simulating the texture blurring effect of the redness and swelling area.

[0045] S72: By summing the pixel values ​​in the N connected regions of the predicted redness map and adjusting the area weights through an activation function in combination with the differences in the R and B channels, the areas of the N connected regions are obtained, where N is a natural integer.

[0046] Furthermore, the calculation process for the area of ​​the connected components specifically involves: summing the pixel values ​​within each connected component of the predicted hematoma image, and combining this with the differences between the R and B channels... The activation function adjusts the area weights, thus obtaining the area of ​​the connected component. The specific calculation formula is as follows: ,in, Indicates the first The area of ​​each connected region is used to quantify the size of the lesion; Indicates the main mucosal region in the first... The red channel value at each pixel; express Activation function; The area correction factor is preferably set to [value missing]. This is used to adjust the area weight based on the difference between the red and blue channels; Indicates the main mucosal region in the first... The blue channel value at each pixel; This represents a connected component index, indicating an independent lesion region.

[0047] Furthermore, connected components can be implemented using a conventional connected component labeling algorithm, specifically by modifying the binarized data. Implement 8-connected region analysis.

[0048] S73: The average severity of the connected components is obtained by calculating the average of the normalized values ​​of the prediction confidence of pixels in the N connected components and the differences between the R and B channels.

[0049] Furthermore, the formula for calculating the average severity of the connected components is as follows: ,in, Indicates the first The average severity of each connected component is used to assess the degree of redness and swelling. The image representing the region of interest is in the 1st... The green channel value at each pixel; Denotes a minimal constant, with the preferred value being [value to be filled in]. This is used to prevent division by zero errors.

[0050] S74: By comparing the area of ​​each of the N connected components with the average severity of the connected components and the corresponding threshold, the number of connected components that meet the conditions is counted using an exponential function to obtain the predicted number of lesions.

[0051] Furthermore, the formula for calculating the predicted number of lesions is as follows: ,in, This indicates the number of lesions, used in clinical assessments of disease severity and distribution. This indicates an indicator function that takes the value 1 when the condition is true and 0 otherwise. The total number of connected components is obtained through connected component analysis. This represents the minimum lesion area threshold, which is the preferred setting. Pixels are used to filter out noise in small areas. Indicates the severity threshold, preferably set as follows: It is used to filter out pseudo-lesions with insignificant color.

[0052] The present invention also discloses a device for detecting airway mucosal redness and swelling, the device comprising: a memory and a processor;

[0053] The memory is used to store program instructions;

[0054] The processor is used to call program instructions, and when the program instructions are executed, to implement the steps of the airway image segmentation method, and / or to implement the steps of the method for constructing the airway mucosal redness and swelling detection model, and / or to implement the steps of the method for evaluating the airway redness and swelling lesions.

[0055] This application also discloses a computer-readable storage medium including a computer program that, when executed by a processor, implements steps of an airway image segmentation method, and / or steps of a method for constructing an airway mucosal redness and swelling detection model, and / or steps of an evaluation method for the airway redness and swelling lesions.

[0056] This application also discloses a computer program product, including a computer program that, when executed by a processor, implements steps of an airway image segmentation method, and / or steps of a method for constructing an airway mucosal redness and swelling detection model, and / or steps of an evaluation method for the said airway redness and swelling lesions.

[0057] Advantages of this invention:

[0058] 1. To address the problem that existing segmentation models often misidentify non-mucosal areas such as cartilage rings and bronchial lumen boundaries as lesions, leading to high false positive rates and poor clinical applicability, this invention inputs airway imaging data into a pre-trained airway segmentation model for processing. Morphological dilation and erosion operations are then performed to obtain mucosal region masks and mucosal boundary regions. Finally, the airway segmentation data, mucosal region masks, and mucosal boundary regions are fused to obtain the airway segmentation image. This invention effectively suppresses interference from non-mucosal regions, focusing the model's attention on actual mucosal lesions, thereby significantly improving the accuracy of segmentation results and the reliability of clinical diagnosis.

[0059] 2. Existing redness and swelling detection algorithms mostly rely on RGB space or single feature extraction methods, which are sensitive to changes in lighting and cannot simultaneously capture chromaticity and texture information, making it difficult to cope with the diverse manifestations of redness and swelling lesions. This invention achieves collaborative modeling of chromaticity and texture in redness and swelling areas by performing channel convolution on the R and G channels related to redness and swelling in the segmented airway image and fusing local texture features of blurred blood vessels and texture in the redness and swelling area. This invention significantly improves the detection accuracy and model robustness for different types of airway mucosal redness and swelling.

[0060] 3. Addressing the core challenges of conventional segmentation networks—namely, their fixed receptive fields, difficulty in accommodating lesions of different scales, and the disconnect between model optimization and clinical assessment caused by independent statistical post-processing—this invention employs an end-to-end training approach to adaptively capture erythematous lesions of varying scales. It ensures that the outputs (e.g., lesion area, severity) directly align with clinical assessment criteria, significantly improving the clinical applicability and statistical consistency of the results. (See attached figures.)

[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0062] Figure 1 This is a schematic flowchart of the airway image segmentation method provided in the embodiments of the present invention;

[0063] Figure 2 This is a schematic flowchart of the method for constructing the airway mucosal redness and swelling detection model provided in the embodiments of the present invention;

[0064] Figure 3 This is a schematic diagram illustrating the impact of the multi-scale feature fusion strategy provided in this embodiment of the invention on the detection performance of different types of lesions;

[0065] Figure 4 This is a schematic flowchart of the method for assessing airway redness and swelling lesions provided in the embodiments of the present invention;

[0066] Figure 5 This is a schematic diagram of the Dice coefficient parameter experiment provided in an embodiment of the present invention;

[0067] Figure 6 This is a schematic diagram of the boundary F1 score provided in an embodiment of the present invention;

[0068] Figure 7 This is a schematic diagram showing the comparison of false positive rates provided in an embodiment of the present invention;

[0069] Figure 8 This is a schematic diagram illustrating the effect of synthetic data augmentation provided in this embodiment of the invention on the confidence distribution of redness and swelling severity classification;

[0070] Figure 9 This is a schematic diagram of a detection and calculation device for airway mucosal redness and swelling provided in an embodiment of the present invention. Detailed Implementation

[0071] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0072] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be performed in the order they appear herein, or they may be performed in parallel. The operation numbers, such as S1, S2, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel.

[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0074] Figure 1 This is a schematic flowchart of the airway image segmentation method provided in an embodiment of the present invention, specifically including the following steps:

[0075] S1: Acquire airway imaging data;

[0076] Optionally, the airway imaging data acquisition device includes one or more of the following: airway endoscope, airway tube with visualization function, bronchial tube, laryngeal mask airway, bronchial occluder; and / or the airway imaging data is annotated by two or more doctors; the doctors include one or more of the following departments: respiratory medicine, anesthesiology, thoracic medicine;

[0077] S2: Input the airway image data into a pre-trained airway segmentation model to obtain a first airway segmentation image; perform morphological dilation and erosion operations on the first airway segmentation image to obtain a mucosal region mask and a mucosal boundary region; perform element-wise multiplication of the mucosal region mask with the airway image data to obtain the main mucosal region.

[0078] In one embodiment, the mucosal region mask is obtained by performing morphological dilation and erosion operations on the first airway segmentation image, including:

[0079] S21: Perform morphological dilation on the first airway segmentation image to expand the region and obtain expanded features;

[0080] S22: Obtain the centerline of the airway segmentation image through skeleton extraction;

[0081] S23: A mucosal region mask is generated by subtracting the centerline from the extended feature through an erosion operation.

[0082] In one embodiment, the formula for inputting the airway image data into a pre-trained airway segmentation model to obtain a first airway segmentation image is: ,in, This represents the first airway segmentation image, which is a binary mask format used to identify airway regions; This represents airway imaging data; This represents a pre-trained airway segmentation model used to extract airway structures from images.

[0083] In one specific embodiment, the pre-trained airway segmentation model is trained on a large public airway segmentation dataset using supervised learning. Expert-annotated airway region masks are used as labels. During training, the model optimizes the segmentation accuracy metric, the Dice coefficient, to ensure that it can accurately identify the bronchial tree structure.

[0084] Optionally, the pre-trained airway segmentation model is trained using one or more of the following: HRNet, SAM, DINOv2, Mask2Former, Swin Transformer, SegFormer, Deeplabv3+, UNet, GC-Net.

[0085] Preferably, the HRNet model is used as the pre-trained airway segmentation model. This model is a neural network architecture that maintains high-resolution feature extraction. Through parallel multi-resolution sub-networks and repeated cross-resolution fusion, it avoids the loss of spatial information caused by downsampling and can effectively capture fine anatomical structures such as cartilage rings and mucosal folds in airway image data processing.

[0086] In one specific embodiment, the formula for obtaining the mucosal region mask is as follows:

[0087] ,in, This represents a mucosal region mask, a binary mask format used to define the region of interest. This indicates a morphological expansion operation, specifically using a 5×5 circular structural element to expand the airway segmentation region; This indicates a morphological erosion operation used to subtract the skeletal region from the swollen region; This indicates a morphological skeleton extraction operation used to obtain the centerline of the airway segmentation region to identify non-mucosal structures.

[0088] In one specific embodiment, the morphological skeleton extraction operation is implemented through iterative erosion and opening operations, specifically through the first airway segmentation image in binary mask format. Perform iterative erosion until the region disappears. Each iteration retains the difference between the erosion result and the original opening operation result, and finally obtains a center line with a width of one pixel.

[0089] In one embodiment, the formula for obtaining the main mucosal region by element-wise multiplication of the mucosal region mask and the airway image data is as follows:

[0090] ,in, Represents a mask for mucosal regions A matrix of all ones with the same dimension; The inflated region representing the airway segmentation boundary, specifically for the first airway segmentation image. This is achieved by extracting the boundary region. The boundary enhancement coefficient is preferred, with the value being [value to be filled in]. This is used to control the weight of the airway boundary region in the region of interest image; The image represents the main mucosal region and is a three-channel RGB image. It only contains the mucosal region and part of the airway boundary region, while non-mucosal regions such as cartilage rings are effectively suppressed.

[0091] In one specific embodiment The term characterizes the segmented image of the first airway. Boundary regions are extracted using morphological boundary detection. Specifically, the structuring element is first used... The erosion operation on a rectangle yields the erosion mask image. Then through Calculate the boundary, and finally apply a structuring element to the boundary. The circular expansion operation extends the boundary area to ensure coverage of lesions that cross the boundary.

[0092] In one specific embodiment, during the acquisition of the region of interest image, by including the boundary region with an appropriate weight in the region of interest, it is possible to avoid lesion omission due to over-segmentation and maintain the rationality of the anatomical structure.

[0093] In one specific embodiment, the boundary enhancement coefficient can balance the importance of the mucosal body and the boundary region. When set... When it is large, such as setting it to At and above, the model pays more attention to subtle lesions in the boundary region of cross-border redness and swelling, avoiding segmentation omissions. When smaller, such as setting For mucosal tissues and below, priority should be given to ensuring the integrity of the main mucosal region and suppressing interference from non-mucosal structures.

[0094] S3: The main mucosal region and the mucosal boundary region are fused to generate an airway segmentation image.

[0095] Figure 2 This is a schematic flowchart of the method for constructing an airway mucosal redness and swelling detection model provided in an embodiment of the present invention, including:

[0096] S31: Obtain airway imaging dataset and labels;

[0097] S32: The airway image dataset is segmented using the airway image segmentation method described above to obtain an airway segmentation image;

[0098] S33: Perform bi-branch feature extraction on the airway segmentation image to obtain an airway feature map;

[0099] In one embodiment, the dual-branch feature extraction includes:

[0100] S301: Calculate the difference between the R and G channels in the airway segmentation image and perform a convolution operation on the difference to obtain chromaticity invariant spatial features;

[0101] In a specific embodiment, the formula for calculating the difference between the R and G channels in the airway segmentation image and performing a convolution operation on the difference to obtain chromaticity-invariant spatial features is as follows:

[0102] ,in, It represents the chromaticity invariant spatial features, characterizes the chromaticity shift in the swollen area, and is a single-channel floating-point feature map; This represents a 3×3 convolution operation; The red channels represent the main area of ​​the mucosa; Green channels indicating the main mucosal region; This represents the mean of the red channel, calculated by statistically analyzing the entire mucosal body area. The red channel pixel values ​​are calculated; This represents the average value of the green channel, calculated by statistically analyzing the entire mucosal body area. The green channel pixel values ​​are calculated. The standard deviation of the red channel is represented by statistics from the entire mucosal body region. The red channel pixel values ​​are calculated; The standard deviation of the green channel is represented by statistical analysis of the entire mucosal body area. The green channel pixel values ​​are calculated.

[0103] In one specific embodiment and By respectively from the main mucosal region The red and green channels were extracted from the three channels to obtain the data for the main mucosal region. For RGB images, directly take the first channel. The second channel is .

[0104] S302: By converting the airway segmentation image into a brightness channel, local feature extraction is performed using a local binary mode operator, and the spatial gradient of the airway image data is combined with the residual block for depth encoding to capture the vascular blurring and texture of the swollen area to obtain local texture features.

[0105] In one embodiment, the specific formula for S302 is:

[0106] ,in, Indicates based on airway imaging data The gradient saliency feature extraction function extracts gradient saliency features as single-channel floating-point feature maps, and the calculation method is expressed as follows: ; For weight fusion, the preferred value is This is used to balance the contributions of local binary pattern features and gradient significance features; It represents local texture features and characterizes the texture changes in the swollen area. It is a multi-channel floating-point feature map that contains texture abstraction representations at different scales after being encoded by residual blocks. This represents a residual block, specifically containing consecutive 3×3 convolutional layers, each followed by... An activation function is then used, followed by a residual concatenation with the input of the residual block for deep feature encoding. This represents a local binary pattern operator, specifically employing a calculation method with a neighborhood of 8 and a radius of 1, used to extract local texture features; This represents the brightness channel of the main mucosal region.

[0107] In one specific embodiment, a dual-branch feature extraction method is used to specialize the chromaticity and texture features of the swollen area. The chromaticity-invariant spatial feature extraction branch specifically captures the characteristic increase in redness value in the swollen area, while the local texture feature extraction branch focuses on microstructural changes such as blurred blood vessels. Furthermore, the chromaticity-invariant spatial feature extraction branch... During the calculation process, The normalized difference between the red and green channels can not only eliminate the influence of illumination changes, but also amplify the unique chromaticity shift of the swollen area. Based on color statistical normalization, the chromaticity information is preserved while the brightness interference is effectively suppressed, making the model more sensitive to lesions of different degrees.

[0108] In one specific embodiment By the mucosal main area The luminance channel is obtained by converting from the RGB color space to the YUV color space. Then, color information is removed, retaining only the luminance variations. , Indicates the brightness channel value. Indicates the red channel value. Indicates the green channel value. This represents the blue channel value, and the corresponding coefficient is the optimal coefficient selected through the parameter optimization process.

[0109] In one specific embodiment, a multi-scale texture representation capability is constructed by combining a conventional local binary pattern operator with a deep residual network. The local binary pattern operator can capture local texture patterns, while the residual block learns more complex texture features through a deep convolutional network. The fusion of conventional features and deep learning features has complementary advantages in texture analysis of airway image data: local binary patterns are sensitive to local texture changes, while deep features can capture more abstract semantic information.

[0110] In one specific embodiment, in the inflamed area, due to blurred blood vessels and surface inhomogeneity, the gradient amplitude can still retain subtle texture variations after reflection suppression. This study combines gradient and airway imaging data to highlight texture variations and quantify the salience of local structures.

[0111] In one specific embodiment, when the fusion weights When it is higher, such as when it is set to At and above, the model relies more on gradient information to capture texture degradation caused by redness and swelling. At a lower level, such as when set to For textures of 1 and below, the focus is on analyzing conventional texture patterns.

[0112] Figure 3This diagram illustrates the impact of the multi-scale feature fusion strategy provided in this invention on the detection performance of different types of lesions. By analyzing the impact of different feature fusion strategies on the detection performance of various airway mucosal lesions, the adaptability of the proposed multi-scale chromatic-texture fusion encoder in processing different types of erythematous lesions is verified. The experiment covers five typical types of airway mucosal lesions, including small punctate erosions, large patchy hyperemia, vascular fuzziness dominated by texture features, gradient regions with blurred boundaries, and complex mixed lesions. Five feature configuration schemes are compared, including using chromaticity-invariant spatial features alone, using local texture features alone, simple feature splicing fusion, a fusion method using channel attention, and the cross-branch attention fusion mechanism proposed in this invention. The experimental results show that single feature configurations exhibit significant differences in performance across different types of lesions. Chromatic features perform well in patchy hyperemia detection but have limited effectiveness in vascular fuzziness detection, while texture features show the opposite trend. The simple splicing method integrates the advantages of both features to some extent, but it is still insufficient in complex scenarios such as gradient boundaries. Channel attention methods improve overall performance through adaptive weight adjustment, but there is still room for improvement in mixed lesion detection. The method of this invention achieves optimal detection performance across all lesion types, particularly in the two most challenging lesion types: blurred blood vessels and gradient boundaries. This fully demonstrates the effectiveness of the bi-branch feature extraction architecture combined with the cross-branch attention fusion mechanism designed in this invention, which can dynamically adjust the contribution weights of chromaticity and texture features to achieve accurate detection of various lesions.

[0113] S303: By splicing chromaticity-invariant spatial features and local texture features along the channel dimension, an airway feature map with fused multi-scale features is obtained.

[0114] In one embodiment, the specific formula for S303 is: ,in, This represents the cross-branch attention fusion module, which is specifically implemented through a cross-attention mechanism to integrate the cross-dimensional dependencies between two branches; The cross-branch fusion coefficient has an optimal value of [value missing]. This is used to control the weights of cross-branch attention fusion features in the airway feature map; The airway feature map is a multi-channel feature map that simultaneously encodes chromaticity shift and texture variation information. This represents the channel attention module, which is used to adaptively adjust the feature weights of each channel; This indicates a channel dimension splicing operation.

[0115] In one specific embodiment, the channel attention module performs global average pooling on the input features, then learns the importance weights of each channel through two fully connected layers, and finally multiplies the weights with the original features channel by channel.

[0116] In a specific embodiment, the dual-branch feature fusion fully considers the intrinsic relationship between chromaticity features and texture features. Through the channel attention module, the model can adaptively adjust the importance weights of different feature channels, strengthen chromaticity features in areas with obvious chromaticity, and strengthen texture features in areas with significant texture changes. The data-driven feature fusion strategy enables the encoder to dynamically adjust the feature representation according to the characteristics of the input image, thereby maintaining stable feature extraction performance in diverse airway image data.

[0117] In one specific embodiment The range of values ​​is When the cross-branch fusion coefficient When it is large, such as setting it to Above these levels, the model enhances the interaction between chroma and texture features, improving sensitivity to chroma-texture covariance regions such as redness boundaries. When smaller, such as setting For levels 1 and below, mainstream fusion is performed using the channel attention module.

[0118] S34: Perform lesion segmentation on the airway feature map to obtain a predicted segmentation map;

[0119] In one embodiment, the lesion segmentation is performed by dynamically adjusting the receptive field, including: performing global average pooling, global max pooling, and global standard deviation pooling calculations on the airway feature map in parallel, and then concatenating the parallel output results to obtain a global descriptive vector; calculating the dynamic cavity rate based on the global descriptive vector to obtain a dynamic receptive field, and performing lesion segmentation based on the dynamic receptive field to obtain a predicted segmentation map.

[0120] In a specific embodiment, the formula for calculating the global description vector is as follows: ,in, Represents a global description vector, which is in vector format and contains information on the mean, maximum, and standard deviation of the features, representing the global statistical information of the fused features; This represents a global average pooling operation that compresses the spatial dimension to 1×1 while retaining the channel dimension. This represents global max pooling, which compresses the spatial dimension to 1×1 while preserving the channel dimension. This indicates global standard deviation pooling, which compresses the spatial dimension to 1×1 while retaining the channel dimension.

[0121] In one specific embodiment, the global description vector The construction of the model fully considers the comprehensive representation of features. By jointly using global average pooling, max pooling, and standard deviation pooling, the global description vector is made more comprehensive. Meanwhile, the central tendency, extreme values, and dispersion of the coding features provide a rich information basis for dynamic hole rate calculation, and the multi-statistic fusion method can ensure the accuracy and stability of dynamic receptive field adjustment.

[0122] In one embodiment, the dynamic hole rate calculation is as follows: construct a dynamic hole weight matrix, use an activation function to map the global description vector to the dynamic hole weight matrix, and scale it to between a preset minimum and maximum hole rate to obtain the dynamic hole rate.

[0123] In a specific embodiment, the formula for calculating the void ratio is as follows: ,in, This represents the dynamic dilation rate, used to control the receptive field size of dilated convolution; This indicates a round-down operation; Indicates the minimum void ratio; Indicates the maximum void ratio; express Activation function, mapping input to interval; The dynamic dilated weight matrix is ​​a trainable parameter with dimension 1. ; Airway feature map The number of channels.

[0124] In one embodiment, based on the statistical distribution of the size of erythematous lesions in airway imaging data, a preferred value is... as well as , The small receptive fields that characterize small cavitation rates correspond to punctate erosions. A large receptive field is characterized by a high cavity rate corresponding to patchy congestion.

[0125] In one specific embodiment, the erythematous lesions in the airway imaging data exhibit significant scale diversity, ranging from minute punctate erosions to extensive patchy hyperemia, and dynamic cavity rate. Through global description vector Dynamic computation overcomes the limitations of fixed receptive fields in conventional multi-scale segmentation methods, achieving truly adaptive multi-scale segmentation.

[0126] In one specific embodiment, a learnable dynamic hole weight matrix is ​​used. Mapping global feature statistics to the void ratio space allows the model to automatically adjust the receptive field size based on the feature distribution of the input image. This enables the network to use a smaller void ratio to capture details when processing images with predominantly small lesions, and a larger void ratio to obtain contextual information when processing images with extensive congestion.

[0127] In one embodiment, the step of concatenating chroma-invariant spatial features and local texture features along the channel dimension to obtain an airway feature map with fused multi-scale features includes concatenating chroma-invariant spatial features and local texture features along the channel dimension to obtain a concatenation result, inputting the concatenation result into a channel attention module to adaptively adjust the weights of each channel to obtain channel attention features, inputting the concatenation result into a cross-branch attention fusion module to integrate chroma and texture information to obtain cross-branch attention fusion features, and adding the channel attention features and the cross-branch attention fusion features to output an airway feature map with fused multi-scale features.

[0128] In one embodiment, performing dilated convolution processing on the airway feature map to obtain dilated fused features includes performing dilated convolution processing on the airway feature map using a dynamic dilated rate to fuse multi-scale features and obtain dilated fused features.

[0129] In one embodiment, inputting the splicing result into the cross-branch attention fusion module to integrate chroma and texture information to obtain the cross-branch attention fusion feature specifically involves: performing cross-attention calculation on the splicing result to obtain a first branch result and a second branch result, and then adding the first branch result and the second branch result to obtain the cross-branch attention fusion feature.

[0130] In one embodiment, the formula for obtaining the predicted segmentation map is specifically as follows: ,in, This represents the predicted segmentation map, a single-channel probability map. Each pixel value represents the probability that the location contains a red or swollen lesion, with values ​​ranging from [value range missing]. ; The weights for skip connections range from 1 to 2. The preferred setting is Used to fuse chroma-texture interaction features; This represents a 1×1 convolution operation; This indicates a dilated convolution operation, specifically using a dynamic dilation rate. Control the size of the receptive field.

[0131] In one specific embodiment, based on the characteristic that color shift and texture blurring of redness and swelling often co-occur in airway imaging data, The element-wise multiplication of chroma and texture features highlights the areas where they change synergistically, such as the area at the center of redness and swelling. This allows the segmentation head to further focus on the chroma-texture synergistic region based on the dynamic receptive field, improving the segmentation accuracy of gradient boundaries.

[0132] S35: Compare the predicted segmentation map with the label, iteratively optimize the loss function, and obtain the airway mucosal redness and swelling detection model.

[0133] Furthermore, the airway mucosal redness and swelling detection model calculates boundary segmentation loss using a gradient-sensitive loss function, including: calculating pixel-level gradient weights based on the airway segmentation image; calculating the difference between the predicted segmentation image and the classification label of whether or not there is redness and swelling, and combining the pixel-level gradient weights to obtain the gradient-sensitive loss; and iteratively optimizing lesion boundary segmentation based on the gradient-sensitive loss.

[0134] Furthermore, the formula for calculating pixel-level gradient weights based on the airway segmentation image is as follows: ,in, Represents pixel-level gradient weights, used to adjust the importance of different regions in the loss function; This represents the weight enhancement coefficient, with a preferred value of [value missing]. This is used to control the magnitude of weight enhancement in areas with complex textures; express Gradient operators are used to calculate the spatial gradient of an image. Indicates the main mucosal region in the first... At 1 pixel gradient, through The operator calculates the result; Indicates the main mucosal region in the first... The grayscale value at each pixel is obtained by measuring the main area of ​​the mucous membrane. Obtained by converting to grayscale; Use pixel indexes to iterate through all pixel positions in the image; This represents the weight decay control parameter, with a preferred value of [value to be filled in]. It is used to adjust the decay rate of the weights as they change with the gradient.

[0135] In a specific embodiment, it should be noted that pixel-level gradient weights By indirectly estimating boundary importance through gradient information of the input image, it can still provide effective guidance in the early stages of training when the true boundary is unknown. The weighting mechanism based on the intrinsic features of the image makes the model naturally tend to learn boundary-sensitive representations during training.

[0136] In one specific embodiment This approach smooths feature interactions through convolution, avoiding noise amplification. It couples the intermediate output of the feature encoder with the segmentation head, enabling the model to not only rely on the contextual information of dilated convolution but also enhance the consistency of local features. In clinical practice, this allows for more accurate capture of the transition areas between punctate erosions and patchy hyperemia.

[0137] In one specific embodiment, the loss function of the detection model further includes Dice loss and area consistency loss, and the loss of the model is calculated through Dice loss, gradient sensitivity loss and area consistency loss.

[0138] In one specific embodiment, the calculation of the labels of the predicted segmentation map and the ground truth segmentation map... The gradient-sensitive loss derived from the norm difference is specifically achieved by calculating the difference between the labels of the predicted segmentation map and the ground truth segmentation map. Norm difference; based on the airway segmentation image, an exponential function is used to assign higher weights to textured regions with drastic gradient changes, strengthening the learning of boundary regions, and obtaining pixel-level gradient weights; the pixel-level gradient weights are multiplied by the norm difference. The gradient-sensitive loss is obtained from the norm difference.

[0139] In a specific embodiment, the formula for calculating the gradient-sensitive loss is as follows: ,in, This represents gradient-sensitive loss, used to constrain the boundary accuracy of the segmentation results; Indicates the total number of pixels; Indicates the predicted segmentation map at the th The value at each pixel, with a range of [value]. Predicting segmentation maps through direct indexing In the The value at the position of each pixel is obtained; The true segmentation map represents the first segment. The value at each pixel is preferably 0 or 1; Indicates the predicted segmentation map at the th Gradient at each pixel; The true segmentation map represents the first segment. Gradient at each pixel; This represents the L1 norm.

[0140] In a specific implementation, gradient-sensitive loss Taking full account of the consistency between the predicted results and the true labels in the gradient space, through comparison... Item and Due to the differences in terms, the model is constrained not only to ensure accurate pixel-level classification, but also to maintain the morphological characteristics of the boundary. Since the boundary of redness and swelling often exhibits a gradual transition, simple pixel-level loss is difficult to capture such subtle changes. Therefore, the constraint of gradient space is particularly important in the segmentation of redness and swelling lesions.

[0141] In one embodiment, the specific formula for calculating the loss of the model is as follows: ,in, This represents the total loss function, used as the final optimization objective during model training; This represents the area consistency loss, constraining the overall area difference between the predicted and actual regions, and is calculated as follows: ; express Loss, used to measure the overlap between predicted and true segmented regions, is based on the predicted segmentation map in the _____. The value at pixel i is different from the value at pixel j in the true segmentation image. The values ​​at each pixel are calculated; the corresponding coefficients are the optimal coefficients selected through the parameter optimization process.

[0142] In one specific embodiment, the loss function employs different weight allocations to balance boundary blurring and area importance in bronchoscopic images. Dominant region overlap optimization, Refine the boundaries, As a regularization term to prevent area bias, the complementary design approach enhances segmentation stability in gradually transitioning red and swollen regions through multi-objective constraints, an effect that cannot be easily achieved by conventional single loss.

[0143] In a specific embodiment, ablation experiments on the loss function are conducted to verify the necessity of the gradient-sensitive loss function through ablation studies. Four loss combinations are compared: 1) Dice loss only; 2) Dice + gradient-sensitive loss; 3) Dice + area consistency loss; 4) complete loss (this technique). Three key metrics are evaluated on a fixed test set: Dice coefficient (overall segmentation accuracy), see [link to relevant documentation]. Figure 5 See Boundary F1 score (boundary segmentation quality) Figure 6 See also the false positive rate (false detection rate). Figure 7 Box plots show the distribution of 40 experiments for each combination. The boxes represent interquartile ranges, the midline represents the median, and the whiskers represent 1.5 times the interquartile range. Experimental results show that the complete loss combination (this technique) performs best in all three metrics: the median Dice coefficient is the highest and most concentrated; the boundary F1 score is significantly improved, indicating that gradient constraints effectively improve the segmentation of gradient boundaries; the false positive rate is the lowest and the number of outliers is the fewest, proving that area consistency loss reduces false detections. Comparison group 2 (Dice + gradient-sensitive loss) is significantly better than group 1 (Dice only) in terms of boundary F1 score, indicating that the image gradient-based weight allocation strengthens boundary learning. Its core mechanism is to increase the loss weight in boundary regions with drastic gradient changes through pixel-level gradient weights, allowing the model to focus on learning blurred boundary features. In addition, the complete loss is not a simple superposition, but achieves synergistic optimization through weight balancing. Dice loss dominates region overlap, gradient loss refines boundaries, and area loss prevents bias. This multi-objective optimization is particularly crucial under the gradient characteristics of erythematous lesions. Experiments have shown that the gradient-sensitive loss function of this technology solves the segmentation problem of blurred and gradual transitions of redness and swelling in bronchoscopic images by coupling image gradient features with segmentation boundary optimization, which is a core innovation to improve clinical applicability.

[0144] Figure 4 This is a schematic flowchart of the method for assessing airway redness and swelling lesions provided in this embodiment of the invention, including:

[0145] S71: Acquire mixed airway image data, and input the mixed airway image data into the airway mucosal redness and swelling detection model constructed by the method described above to obtain a predicted redness and swelling map;

[0146] In one embodiment, the mixed airway image data is obtained by first combining a normal mucosal image with a randomly generated lesion shape mask, applying Gaussian blur to the masked area and merging it with the unmasked area to generate a basic red and swollen composite image; then applying hue and saturation shifts to the basic red and swollen composite image in the HSV color space and using random perturbation to obtain mixed airway image data, thereby simulating an increase in red hue and saturation in the red and swollen area, enhancing the realism of the composite data, and thus simulating the texture blurring effect of the red and swollen area.

[0147] In one embodiment, the basic redness and swelling composite image is generated by combining a normal mucosal image with a randomly generated lesion shape mask, applying Gaussian blur to the masked area, and merging it with the unmasked area. The specific formula is as follows: ,in, The base redness and swelling composite image is an RGB three-channel image that has simulated redness and swelling texture features, but the chromaticity features have not yet fully simulated real redness and swelling. The image represents a normal mucosa, and the base image used for synthesis is a bronchoscopic image acquired clinically without redness or swelling. This represents a randomly generated lesion shape mask, produced by a random shape generation algorithm, simulating red and swollen areas of different shapes, such as round, elliptical, or irregular shapes, used to define the location and extent of the red and swollen areas; This represents the convolution operation; Represents a randomly generated lesion shape mask. A matrix of all ones with the same dimension; This represents the Gaussian blur kernel, which is generated by a two-dimensional Gaussian function. The standard deviation of the Gaussian blur kernel is preferably set to 1.5 to simulate the texture blurring effect of swollen areas.

[0148] In one specific embodiment, randomly generated The model simulates the common morphological distribution of redness and swelling, such as circles and patches. The location is based on random sampling from prior clinical data. Although the location is random, by controlling shape parameters such as eccentricity and area and spatial distribution, the model can effectively cover the diversity of real lesions and enhance its generalization ability.

[0149] In one specific embodiment The term indicates that a Gaussian blur is applied to a normal mucosal image to simulate the texture blurring effect of swollen areas. This method achieves region-specific Gaussian blurring to simulate texture changes unique to swollen areas, such as blurred blood vessels and increased surface roughness. The texture synthesis method based on a physical model can more realistically reproduce the visual features of swollen lesions compared to simple color transformation.

[0150] In one specific embodiment Need and By using the same imaging conditions and anatomical locations, such as the same bronchoscopy equipment, illumination parameters, and bronchial tree hierarchy, it is possible to ensure that the synthetic data distribution is consistent with the real data and avoid domain shift. In specific implementation, Images can be selected from disease-free images of the same patient or population, and confirmed by experts to be normal mucosa.

[0151] In one embodiment, the basic redness and swelling composite image is further applied with hue and saturation shifts in the HSV color space, and mixed airway image data is obtained using random perturbation. The specific formula is as follows: ,in, This represents mixed airway imaging data, which is an RGB three-channel image with color and texture features similar to real redness and swelling images; This represents the hue and saturation offset operations in the HSV color space, specifically achieved by linearly offsetting the hue and saturation in the HSV color space. Indicates the hue reference offset, preferably set as follows: This indicates a shift in hue towards red, used to simulate a swollen, reddish tone; The mean is Standard deviation is Gaussian distributed random numbers, preferably set To control the intensity of hue disturbance; This indicates the saturation reference offset, and is preferably set as follows: This indicates an increase in saturation, used to simulate an increase in the vibrancy of colors in red and swollen areas; This indicates that the mean is 0 and the standard deviation is 0. Gaussian distributed random numbers, preferably set To control the intensity of saturation disturbance.

[0152] In one specific embodiment, the HSV color space is a color model based on hue, saturation, and value.

[0153] In one specific embodiment, the transformation strategy using the HSV color space has significant advantages over direct manipulation of the RGB color space because the HSV color space separates hue, saturation, and brightness, which better aligns with human visual perception characteristics. The hue shift accurately simulates the transformation of swollen areas into red tones, while The increased saturation can reproduce the increased color vibrancy of the inflamed area. The selection of color space and parameter settings are based on statistical analysis of real red and swollen images, which can ensure the authenticity of the synthesized data.

[0154] In one embodiment, mixed airway imaging data is incorporated into the training dataset at a preset ratio to ensure that the model can fully learn the redness and swelling features of different degrees. The preset ratio is preferably 30%, which is obtained through experience.

[0155] In one embodiment, according to and The synthetic data was categorized into three levels—mild, moderate, and severe—based on the degree of deviation. Then, in each training round, 30% of the samples were randomly selected to replace the synthetic data, with different severity levels allocated according to a preset ratio, specifically based on clinical distribution. By randomly mixing the data with real clinical data in each training round, the diversity of severe redness and swelling samples can be increased, while avoiding overfitting of the model to synthetic features.

[0156] In one specific embodiment, a physical-driven redness and swelling synthesis method is used through multi-level color and texture simulation. The phased synthesis process can effectively achieve the controllable generation of redness and swelling lesions.

[0157] Figure 8This diagram illustrates the impact of synthetic data augmentation on the confidence distribution of redness severity classification, as provided in this embodiment of the invention. A kernel density plot visually demonstrates the influence of synthetic data augmentation on the confidence distribution of redness severity classification, verifying the effectiveness of the proposed physical-driven redness synthesis method in improving the model's ability to identify redness lesions of different degrees. The experiment compares the confidence distribution of the model for mild, moderate, and severe redness lesions under two training strategies: no data augmentation and synthetic data augmentation. The kernel density plot shows that without data augmentation, the confidence distributions of the three types of redness overlap significantly and are relatively scattered, indicating that the model's ability to distinguish severity is not high. Particularly in the severe redness category, due to the scarcity of real-world samples, the model exhibits considerable uncertainty. However, after using synthetic data augmentation, the confidence distributions of the three types of redness change significantly, becoming more concentrated with a marked rightward shift in the peak value, indicating an overall improvement in the model's confidence in identifying various types of redness. Furthermore, the overlapping areas between the three distributions are significantly reduced, and the separation is enhanced, indicating that the model has learned the feature differences of different degrees of redness more thoroughly. The distribution of severe redness and swelling improved significantly, changing from a low-confidence, wide distribution to a high-confidence, peaked distribution. This demonstrates that the synthesized data can effectively alleviate the problem of severe sample shortage and verifies that the redness and swelling synthesis method based on the physical model of this invention can realistically simulate the color and texture features of redness and swelling of different degrees, effectively improving the model's ability to identify differences in severity.

[0158] S72: By summing the pixel values ​​in the N connected regions of the predicted redness map and adjusting the area weights through an activation function in combination with the differences in the R and B channels, the areas of the N connected regions are obtained, where N is a natural integer.

[0159] In one embodiment, the calculation process for the area of ​​the connected components specifically involves: summing the pixel values ​​within each connected component of the predicted hematoma image, and combining this with the differences between the R and B channels. The activation function adjusts the area weights, thus obtaining the area of ​​the connected component. The specific calculation formula is as follows: ,in, Indicates the first The area of ​​each connected region is used to quantify the size of the lesion; Indicates the main mucosal region in the first... The red channel value at each pixel; express Activation function; The area correction factor is preferably set to [value missing]. This is used to adjust the area weight based on the difference between the red and blue channels; Indicates the main mucosal region in the first... The blue channel value at each pixel; This represents a connected component index, indicating an independent lesion region.

[0160] In one specific embodiment, connected components can be implemented using a conventional connected component labeling algorithm, specifically by applying binarized data... Implement 8-connected region analysis.

[0161] In one specific embodiment, the severity of tracheal redness and swelling is related to color intensity; the higher the redness value, the more prominent the lesion. Item, and combined The activation function applies color weighting to the area; when the red channel is significantly higher than the blue channel, the area contribution increases, which better aligns with the clinical visual assessment that "the redder the color, the more severe the lesion," thus making full use of the main mucosal region. This allows area statistics to be based not only on segmentation probability but also on colorimetric features, improving the correlation between the indicators and visual consistency.

[0162] S73: The average severity of the connected components is obtained by calculating the average of the normalized values ​​of the prediction confidence of pixels in the N connected components and the differences between the R and B channels.

[0163] In one specific embodiment, the formula for calculating the average severity of the connected components is as follows: ,in, Indicates the first The average severity of each connected component is used to assess the degree of redness and swelling. The image representing the region of interest is in the 1st... The green channel value at each pixel; Denotes a minimal constant, with the preferred value being [value to be filled in]. This is used to prevent division by zero errors.

[0164] In a specific embodiment, it should be noted that the first Average severity of each connected component Compared to simple probability value averaging, the calculation incorporates the unique R and B channel colorimetric features of redness and swelling, making severity assessment not only based on region size but also considering the severity of color. This multimodal severity assessment method is more in line with clinicians' assessment criteria for redness and swelling lesions.

[0165] S74: By comparing the area of ​​each of the N connected components with the average severity of the connected components and the corresponding threshold, the number of connected components that meet the conditions is counted using an exponential function to obtain the predicted number of lesions.

[0166] In one embodiment, the formula for calculating the predicted number of lesions is as follows: ,in, This indicates the number of lesions, used in clinical assessments of disease severity and distribution. This indicates an indicator function that takes the value 1 when the condition is true and 0 otherwise. The total number of connected components is obtained through connected component analysis. This represents the minimum lesion area threshold, which is the preferred setting. Pixels are used to filter out noise in small areas. Indicates the severity threshold, preferably set as follows: It is used to filter out pseudo-lesions with insignificant color.

[0167] In one specific embodiment, a pass-through estimator bypasses non-differentiable operations during training, allowing the gradient output from the statistical layer to propagate back to the segmentation network, optimizing model parameters. Terms are not differentiable; forward propagation uses primitive functions, and backward propagation uses... The activation function's derivative is approximated; for connected component analysis, differentiable connectivity-preserving operations are used, achieved through differentiable approximations of morphological operations; during model training, a pass-through estimator is used to handle non-differentiable operations in the statistical layers, and the number of lesions is approximated through gradient calculation. ,area and severity The gradient can be backpropagated to the segmentation network, thereby coupling statistical indicators with model training. Through the pass-through estimator, statistical indicators such as the number, area and severity of lesions can be directly involved in model training, realizing task-driven feature learning.

[0168] In one specific embodiment, the connectivity-preserving differentiable approximation allows region statistics to participate in gradient backpropagation, enabling the model to optimize clinically relevant statistical indicators while learning the segmentation task. This end-to-end optimization framework can significantly improve the consistency between segmentation results and clinical assessments.

[0169] In one specific embodiment, the redness and swelling need to have a certain degree of severity. The combined area and severity dual threshold filtering of lesions ensures that the statistically counted lesions meet both size and color requirements, which is more in line with clinical diagnostic criteria. This couples the lesion count with multiple indicators, reduces false positives, and improves statistical reliability.

[0170] In one embodiment, an adaptive moment estimation optimizer is used for parameter updates, with an initial learning rate set to 0.001. A cosine decay scheduling strategy is used to dynamically adjust the learning rate to balance convergence speed and stability. At the start of training, model parameters are randomly initialized. Each training cycle sequentially executes forward propagation, loss calculation, backpropagation, and parameter update steps. During the forward propagation phase, bronchoscopic images from the training set are input and processed sequentially through reflection suppression, region of interest generation, a multi-scale chroma-texture fusion encoder, and a dynamic receptive field lesion segmentation head, outputting a predicted segmentation map. During the loss calculation phase, based on the predicted segmentation map and ground truth annotations, a total loss function is calculated. The model is composed of Dice loss, gradient-sensitive loss, and area consistency loss combined with weights to simultaneously optimize region overlap, boundary accuracy, and area consistency. During the backpropagation stage, gradient flow is propagated through a pass-through estimator to ensure gradient approximation of non-differentiable operations (such as connected component analysis and threshold comparison) in the lesion statistics module that combines multiple indicators, allowing statistical indicators (such as the number of lesions, area, and severity) to participate in parameter optimization. During the parameter update stage, based on the gradients calculated by backpropagation, the optimizer adjusts all trainable parameters in the model (including convolutional kernel weights, dynamic dilation weight matrix, and fully connected layer parameters in the channel attention module) to minimize the total loss function.

[0171] In one specific embodiment, during iterative training, after each training cycle, the model performance is evaluated on the validation set, and changes in metrics such as the Dice coefficient and gradient-sensitive loss are monitored. The criterion for stopping iteration is based on an early stopping strategy for validation set performance. Specifically, when the validation set loss does not decrease within 20 consecutive cycles, training is terminated early, and the model parameters with the lowest validation loss are restored. In addition, the maximum number of training cycles is set to 10,000 to prevent overfitting. After training, the final model parameters are saved for subsequent detection tasks to ensure that the model has stable segmentation accuracy and generalization ability on the test set.

[0172] In one specific embodiment, after model training is complete, the airway mucosal redness and swelling detection task achieves automated analysis of newly acquired bronchoscopic images by loading the trained model parameters. The detection process first preprocesses the input raw bronchoscopic images, including mucosal reflection suppression based on an optical physics model, separating diffuse reflection and specular reflection components through a scattering model to effectively suppress mucus reflection interference and retain key chromaticity features of redness and swelling. Then, a region of interest (ROI) is generated using anatomical constraints. A pre-trained airway segmentation model and morphological operations are used to extract mucosal region masks, and boundary enhancement coefficients are combined to generate a ROI image containing only the main body of the mucosa and part of the boundary region, thus excluding interference from non-mucosal structures (such as cartilage rings). The preprocessed images are input into a constructed airway mucosal redness and swelling detection model. This model extracts color-invariant spatial features and local texture features through a multi-scale color-texture fusion encoder, and adaptively adjusts the receptive field size using a dynamic receptive field lesion segmentation head to generate a predicted segmentation map. Simultaneously, a multi-indicator joint lesion statistics module calculates clinical indicators such as the number, area, and average severity of lesions based on the predicted segmentation map. A differentiable statistical layer ensures the coupling between the indicators and the model output. Finally, the detection results are output in a visual form, including a binary segmentation map superimposed on the original image to highlight the red and swollen areas, and a text report listing detailed lesion statistics to help clinicians quickly assess the severity and distribution of mucosal redness and swelling.

[0173] This invention provides an intelligent retrieval device based on industry intelligence data, comprising: a memory and a processor, such as... Figure 9 As shown:

[0174] Memory is used to store program instructions;

[0175] The processor is used to call program instructions, and when the program instructions are executed, to implement the steps of intelligent processing of noise and entity text in industry intelligence, and / or to implement the steps of constructing an intelligent retrieval model for industry intelligence, and / or to implement the steps of intelligent retrieval and analysis of industry intelligence.

[0176] The present invention provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps of the intelligent processing method for noise and entity text in industry intelligence, and / or the steps of the method for constructing the intelligent retrieval model of industry intelligence, and / or the steps of the method for intelligent retrieval and analysis of industry intelligence.

[0177] This application also discloses a computer program product, including a computer program that, when executed by a processor, implements steps of an airway image segmentation method, and / or steps of a method for constructing an airway mucosal redness and swelling detection model, and / or steps of an evaluation method for the said airway redness and swelling lesions.

[0178] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A method for airway image segmentation, characterized in that, include S1: Acquire airway imaging data; S2: Input the airway image data into a pre-trained airway segmentation model to obtain a first airway segmentation image; perform morphological dilation and erosion operations on the first airway segmentation image to obtain a mucosal region mask and a mucosal boundary region; perform element-wise multiplication of the mucosal region mask with the airway image data to obtain the main mucosal region. S3: The main mucosal region and the mucosal boundary region are fused to generate an airway segmentation image.

2. The airway image segmentation method according to claim 1, characterized in that, The mucosal region mask is obtained by performing morphological dilation and erosion operations on the first airway segmentation image, including: S21: Perform morphological dilation on the first airway segmentation image to expand the region and obtain expanded features; S22: Obtain the centerline of the airway segmentation image through skeleton extraction; S23: A mucosal region mask is generated by subtracting the centerline from the extended feature through an erosion operation; Optionally, the process of generating the mucosal boundary region includes: constructing a structural corrosion matrix, performing corrosion calculations on the first airway segmentation image and the structural corrosion matrix to obtain a corrosion mask; and constructing a dilation matrix, performing dilation calculations on the corrosion mask and the dilation matrix to obtain the mucosal boundary region. Optionally, the airway imaging data acquisition device includes one or more of the following: airway endoscope, airway tube with visualization function, bronchial tube, laryngeal mask airway, bronchial occluder; and / or the airway imaging data is annotated by two or more doctors; the doctors include one or more of the following departments: respiratory medicine, anesthesiology, thoracic medicine; Optionally, the pre-trained airway segmentation model is trained using one or more of the following: HRNet, SAM, DINOv2, Mask2Former, Swin Transformer, SegFormer, Deeplabv3+, UNet, GC-Net.

3. A method for constructing a detection model for airway mucosal redness and swelling, characterized in that, include: S31: Obtain airway imaging dataset and labels; S32: The airway image dataset is segmented using the airway image segmentation method according to any one of claims 1-2 to obtain an airway segmentation image; S33: Perform bi-branch feature extraction on the airway segmentation image to obtain an airway feature map; S34: Perform lesion segmentation on the airway feature map to obtain a predicted segmentation map; S35: Compare the predicted segmentation map with the label, iteratively optimize the loss function, and obtain the airway mucosal redness and swelling detection model; The dual-branch feature extraction includes: S301: Calculate the difference between the R and G channels in the airway segmentation image and perform a convolution operation on the difference to obtain chromaticity invariant spatial features; S302: By converting the airway segmentation image into a brightness channel, local feature extraction is performed using a local binary mode operator, and the spatial gradient of the airway image data is combined with the residual block for depth encoding to capture the vascular blurring and texture of the swollen area to obtain local texture features. S303: By splicing chromaticity-invariant spatial features and local texture features along the channel dimension, an airway feature map with fused multi-scale features is obtained.

4. The method for constructing the airway mucosal redness and swelling detection model according to claim 3, characterized in that, The lesion segmentation is performed by dynamically adjusting the receptive field, including: performing global average pooling, global max pooling, and global standard deviation pooling calculations on the airway feature map in parallel, and then concatenating the parallel output results to obtain a global description vector; calculating the dynamic cavity rate based on the global description vector to obtain the dynamic receptive field, and performing lesion segmentation based on the dynamic receptive field to obtain a predicted segmentation map. The dynamic hole rate calculation is as follows: a dynamic hole weight matrix is ​​constructed, an activation function is used to map the global description vector to the dynamic hole weight matrix, and the vector is scaled to between a preset minimum and maximum hole rate to obtain the dynamic hole rate.

5. The method for constructing the airway mucosal redness and swelling detection model according to claim 3, characterized in that, The method of concatenating chroma-invariant spatial features and local texture features along the channel dimension to obtain an airway feature map with fused multi-scale features includes: concatenating chroma-invariant spatial features and local texture features along the channel dimension to obtain a concatenation result; inputting the concatenation result into a channel attention module to adaptively adjust the weights of each channel to obtain channel attention features; inputting the concatenation result into a cross-branch attention fusion module to integrate chroma and texture information to obtain cross-branch attention fusion features; and adding the channel attention features and the cross-branch attention fusion features to output an airway feature map with fused multi-scale features. The step of performing dilated convolution processing on the fused multi-scale features to obtain dilated fused features includes performing dilated convolution processing on the fused multi-scale features using a dynamic dilation rate to obtain dilated fused features. And / or inputting the splicing result into the cross-branch attention fusion module to integrate chroma and texture information to obtain cross-branch attention fusion features specifically involves: performing cross-attention calculation on the splicing result to obtain a first branch result and a second branch result, and then integrating the first branch result and the second branch result to obtain the cross-branch attention fusion features.

6. The method for constructing the airway mucosal redness and swelling detection model according to claim 3, characterized in that, The airway mucosal redness and swelling detection model calculates boundary segmentation loss using a gradient-sensitive loss function, including: calculating pixel-level gradient weights based on the airway segmentation image; The difference between the predicted segmentation map and the classification label of whether or not there is redness and swelling is calculated and combined with the pixel-level gradient weights to obtain the gradient-sensitive loss; iterative optimization of lesion boundary segmentation is performed based on the gradient-sensitive loss; Optionally, the loss function of the detection model also includes Dice loss and area consistency loss, and the loss of the model is calculated through Dice loss, gradient sensitivity loss and area consistency loss; Optionally, the calculation of the labels of the predicted segmentation map and the real segmentation map... The gradient-sensitive loss derived from the norm difference is specifically achieved by calculating the difference between the labels of the predicted segmentation map and the ground truth segmentation map. Norm difference; based on the airway segmentation image, an exponential function is used to assign higher weights to textured regions with drastic gradient changes, strengthening the learning of boundary regions, and obtaining pixel-level gradient weights; the pixel-level gradient weights are multiplied by the norm difference. The gradient-sensitive loss is obtained from the norm difference.

7. A method for assessing airway redness and swelling lesions, characterized in that, include: S71: Obtain airway image data, and input the airway image data into the airway mucosal redness and swelling detection model constructed by the method of constructing the airway mucosal redness and swelling detection model according to any one of claims 3-6 to obtain a predicted redness and swelling map; S72: By summing the pixel values ​​in the N connected regions of the predicted redness map and adjusting the area weights through an activation function in combination with the differences in the R and B channels, the areas of the N connected regions are obtained, where N is a natural integer. S73: The average severity of the connected components is obtained by calculating the average of the normalized values ​​of the prediction confidence of pixels in the N connected components and the differences between the R and B channels. S74: By comparing the area of ​​each of the N connected components with the average severity of the connected components and the corresponding threshold, the number of connected components that meet the conditions is counted using an exponential function to obtain the predicted number of lesions.

8. A computer device, comprising: Memory and processor; The memory is used to store program instructions; The processor is used to call program instructions, which, when executed, implement the steps of the airway image segmentation method according to any one of claims 1-2, and / or implement the steps of the method for constructing the airway mucosal redness and swelling detection model according to any one of claims 3-6, and / or implement the steps of the method for evaluating airway redness and swelling lesions according to claim 7.

9. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the airway image segmentation method according to any one of claims 1-2, and / or the steps of the method for constructing the airway mucosal redness and swelling detection model according to any one of claims 3-6, and / or the steps of the method for evaluating airway redness and swelling lesions according to claim 7.

10. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the airway image segmentation method according to any one of claims 1-2, and / or the steps of the method for constructing the airway mucosal redness and swelling detection model according to any one of claims 3-6, and / or the steps of the method for evaluating airway redness and swelling lesions according to claim 7.

Citation Information

Patent Citations

  • Preparation method of customized mask for leucoderma UV phototherapy

    CN106362303A

  • Full-self-service fundus photo analysis method, device, storage medium and system

    CN120088252A

  • Circulating tumor cell recognition model training method and system based on deep learning

    CN120107724A

  • Digital imaging method of ear-nose-throat examination endoscope

    CN120616405A

  • Melanoma lesion area segmentation method based on CLIP multi-mode fusion network

    CN120807924A