Image processing system and method for dry eye type differentiation
By performing standardized preprocessing and artifact detection on infrared meibomian gland images, combined with artifact mask-guided meibomian gland segmentation, the problem of unclear meibomian gland contour segmentation in existing technologies has been solved, and accurate grading of MGD severity has been achieved.
Patent Information
- Application Number
- CN202511526513.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-24
AI Technical Summary
Existing infrared meibomian gland image processing technology is subject to interference from uneven lighting, eyelash occlusion, and motion artifacts in clinical applications, resulting in unclear meibomian gland contour segmentation and affecting the accuracy and reliability of MGD severity grading.
By standardizing and preprocessing infrared meibomian gland images, an artifact detection step is introduced to generate an artifact mask. Guided meibomian gland segmentation is then performed based on the artifact mask, and the severity of MGD is graded by combining a decision tree model.
Accurate extraction and quantification of meibomian gland morphology were achieved in complex contexts, improving the robustness and accuracy of MGD severity grading and reducing the impact of artifact interference.
Smart Images

Figure CN120997218B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and more specifically, to an image processing system and method for differentiating types of dry eye syndrome. Background Technology
[0002] Dry eye syndrome has complex etiologies and diverse clinical manifestations, mainly classified into aqueous hypothermic and evaporative dry eye types. Evaporative dry eye syndrome caused by meibomian gland dysfunction (MGD) is the most prevalent. Therefore, accurate assessment of meibomian gland morphology and structure, leading to accurate diagnosis and classification of MGD and effective differentiation of dry eye types, is crucial for guiding personalized clinical treatment plans. Currently, infrared meibomian gland imaging is the "gold standard" technique for clinically assessing meibomian gland morphology. However, traditional diagnostic methods heavily rely on the physician's subjective experience in interpreting images, resulting in low efficiency and diagnostic results susceptible to inter-observer variability, lacking objectivity and reproducibility, and failing to meet the needs of large-scale clinical screening and precision medicine.
[0003] In existing technologies, computer image processing techniques are typically used for automated analysis of infrared meibomian gland images. This involves focusing on image segmentation of the meibomian gland region to extract morphological indicators such as glandular absence rate to aid diagnosis. However, existing technologies face significant challenges in practical applications. During clinical acquisition, the quality of infrared meibomian gland images is often affected by various factors, such as uneven lighting conditions, limited field of vision due to insufficient eyelid eversion, random occlusion by eyelashes, and motion artifacts introduced by poor blinking or fixation. The presence of these complex artifacts significantly reduces the signal-to-noise ratio and contrast of the original image, causing blurred boundaries between the fine structure of the meibomian gland and the background area, and even loss of structural information. This makes it difficult for existing automated segmentation algorithms to accurately identify and delineate the complete meibomian gland contour, leading to significant deviations in the calculation of subsequent morphological quantitative indicators, directly affecting the accuracy and reliability of MGD severity grading.
[0004] Therefore, there is an urgent need for an optimized image processing system and method for differentiating types of dry eye syndrome. Summary of the Invention
[0005] This application is made in order to solve the above-mentioned technical problems.
[0006] According to one aspect of this application, an image processing method for differentiating types of dry eye syndrome is provided, comprising:
[0007] The original infrared meibomian gland images were standardized and preprocessed to obtain preprocessed eyelid region images;
[0008] Artifact detection is performed on the preprocessed eyelid region image to obtain the artifact mask;
[0009] Based on artifact masking, guided meibomian gland segmentation is performed on the preprocessed eyelid region image to obtain the meibomian gland segmentation mask.
[0010] Morphological quantitative analysis was performed based on meibomian gland segmentation mask and preprocessed eyelid region images to obtain MGD quantitative indicators.
[0011] Input the quantitative indicators of MGD into the decision tree to obtain the severity level of MGD.
[0012] According to another aspect of this application, an image processing system for distinguishing types of dry eye syndrome is provided, comprising:
[0013] The image standardization preprocessing module is used to standardize and preprocess the acquired raw infrared meibomian gland images to obtain preprocessed eyelid region images;
[0014] The image artifact detection module is used to detect artifacts in the preprocessed eyelid region image to obtain the artifact mask.
[0015] The guided meibomian gland segmentation module is used to perform guided meibomian gland segmentation on preprocessed eyelid region images based on artifact masks to obtain meibomian gland segmentation masks.
[0016] The morphological quantitative analysis module is used to perform morphological quantitative analysis based on meibomian gland segmentation mask and preprocessed eyelid region images to obtain MGD quantitative indicators.
[0017] The MGD severity grading decision module is used to input MGD quantitative indicators into the decision tree to obtain the severity grading of MGD.
[0018] Compared with existing technologies, this application provides an image processing system and method for differentiating dry eye syndrome (MGD) types. First, it performs standardized preprocessing on the original infrared meibomian gland (MGD) image. Then, it introduces an artifact detection step to actively identify and locate interference areas such as eyelash occlusion and uneven lighting in the image. The perceived artifact information is then used to guide the subsequent meibomian gland segmentation process, thereby achieving accurate extraction of MGD morphology against complex backgrounds. Based on this, the precisely segmented gland morphology is quantified in multiple dimensions, transforming image features into objective numerical indicators. Finally, a decision tree model is used to comprehensively judge these numerical indicators and output a standardized MGD severity grading. This intelligently suppresses interference information caused by image artifacts, thus achieving more robust and accurate MGD severity grading even in poor-quality clinical images. Attached Figure Description
[0019] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0020] Figure 1 This is a flowchart of an image processing method for differentiating types of dry eye syndrome according to an embodiment of this application.
[0021] Figure 2 This is a data flow diagram of an image processing method for differentiating dry eye syndrome types according to an embodiment of this application.
[0022] Figure 3 This is a flowchart of sub-step S1 of an image processing method for distinguishing types of dry eye according to an embodiment of this application.
[0023] Figure 4 This is a flowchart of sub-step S2 of the image processing method for distinguishing types of dry eye according to an embodiment of this application.
[0024] Figure 5 This is a flowchart of sub-step S3 of the image processing method for distinguishing types of dry eye according to an embodiment of this application.
[0025] Figure 6 This is a flowchart of sub-step S34 of the image processing method for distinguishing types of dry eye according to an embodiment of this application.
[0026] Figure 7 This is a flowchart of sub-step S4 of the image processing method for distinguishing types of dry eye according to an embodiment of this application.
[0027] Figure 8 This is a flowchart of sub-step S41 of the image processing method for distinguishing types of dry eye according to an embodiment of this application.
[0028] Figure 9 This is a block diagram of an image processing system for differentiating types of dry eye according to an embodiment of this application. Detailed Implementation
[0029] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0030] To address the problems mentioned above in the background art, this application proposes an image processing method for differentiating types of dry eye syndrome. Figure 1 This is a flowchart of an image processing method for differentiating types of dry eye syndrome according to an embodiment of this application. Figure 2 This is a data flow diagram of an image processing method for differentiating dry eye syndrome types according to embodiments of this application. Figure 1 and Figure 2 As shown, the image processing method for differentiating dry eye syndrome types includes the following steps: S1, performing standardized preprocessing on the acquired raw infrared meibomian gland image to obtain a preprocessed eyelid region image; S2, performing artifact detection on the preprocessed eyelid region image to obtain an artifact mask; S3, performing guided meibomian gland segmentation on the preprocessed eyelid region image based on the artifact mask to obtain a meibomian gland segmentation mask; S4, performing morphological quantitative analysis based on the meibomian gland segmentation mask and the preprocessed eyelid region image to obtain a MGD quantitative index; S5, inputting the MGD quantitative index into a decision tree to obtain a severity classification of MGD.
[0031] In the image processing method described above for differentiating types of dry eye, step S1 involves standardizing the acquired raw infrared meibomian gland image to obtain a preprocessed eyelid region image. It should be understood that during the acquisition process, the raw infrared meibomian gland image may introduce irrelevant background (such as periocular skin and instrument borders), size differences (due to different equipment models or acquisition parameters), and insufficient contrast (fluctuations in infrared light source intensity causing blurring of the gland-background boundary). These problems directly interfere with the accuracy of subsequent artifact detection and meibomian gland segmentation. Therefore, this application further standardizes the raw infrared meibomian gland image to remove irrelevant interference information, unify image specifications, and enhance gland feature recognition. This provides high-quality, consistent input data for the subsequent artifact detection network, avoids subsequent analysis errors caused by differences in image quality, ensures the stability and reliability of the entire image processing flow, and lays the foundation for accurate artifact identification and meibomian gland segmentation.
[0032] In particular, in one specific embodiment, Figure 3 This is a flowchart of sub-step S1 of the image processing method for distinguishing types of dry eye according to an embodiment of this application. Figure 3 As shown, step S1 includes: S11, extracting the region of interest from the original infrared meibomian gland image to obtain an eyelid region image; S12, normalizing the size and enhancing the contrast of the eyelid region image to obtain a preprocessed eyelid region image.
[0033] Specifically, in step S11, the region of interest (ROI) is extracted from the original infrared meibomian gland image to obtain the eyelid region image. It should be understood that the original infrared meibomian gland image contains a large number of regions unrelated to meibomian gland analysis, such as the periocular skin, facial tissues other than the eyelash roots, and the frame of the image acquisition instrument. These irrelevant regions not only increase the computational load of subsequent image processing but may also lead to misidentification in subsequent artifact detection and gland segmentation algorithms due to their similar grayscale features to meibomian glands or artifacts. Therefore, this application further extracts the ROI from the original infrared meibomian gland image to accurately separate the eyelid region containing the meibomian glands and eliminate interference from all irrelevant background regions. This significantly reduces the computational complexity of subsequent processing steps, reduces interference from invalid data to the algorithm, ensures that subsequent artifact detection and gland segmentation are performed only on the effective region, improves the efficiency and accuracy of the entire processing flow, and avoids misleading algorithm judgments due to the grayscale features of irrelevant regions.
[0034] Specifically, in one possible embodiment, step S11 is implemented as follows: First, based on the grayscale distribution characteristics of the infrared meibomian gland image, the grayscale range of the eyelid region is determined (the grayscale value of the meibomian gland region is usually lower than that of the surrounding skin region). Suspected eyelid regions are initially screened using a fixed threshold, and irrelevant regions with grayscale values significantly exceeding this range are removed. Second, the Canny edge detection algorithm is used to extract edges from the initially screened image. Appropriate high and low thresholds are set to obtain clear contour information of the suspected eyelid region, excluding blurry non-eyelid edges. Next, the extracted contour is fitted using the minimum bounding rectangle algorithm to determine the approximate boundary of the eyelid region, ensuring that the boundary completely encloses the entire eyelid. Subsequently, the boundary is fine-tuned based on clinical anatomical features (the eyelid is elongated and located in the central region of the image), excluding contour regions that do not conform to the eyelid shape. Finally, the original image is cropped according to the adjusted boundary to obtain an image containing only the eyelid region, i.e., the eyelid region image.
[0035] Specifically, step S12 involves normalizing the size and enhancing the contrast of the eyelid region image to obtain a preprocessed eyelid region image. It should be understood that due to differences in the resolution of different acquisition devices and the distance between the lens and the eyelid during acquisition, the extracted eyelid region images vary in size. However, the deep learning networks used for artifact detection and gland segmentation require input data of a fixed size. Inconsistent sizes can cause the network to fail to infer properly or reduce inference accuracy. Simultaneously, uneven infrared illumination in the eyelid region image may result in insufficient local contrast, blurring the boundary between the meibomian gland and surrounding tissue, affecting feature extraction. Therefore, this application further normalizes the size and enhances the contrast of the eyelid region image to unify image size specifications and strengthen the morphological features of the meibomian gland. This provides input data of a fixed specification for the subsequent deep learning network, ensuring the stability of network inference, while enhancing the distinction between the gland and the background. This provides a clear feature basis for subsequent artifact detection and gland segmentation, improves overall processing accuracy, and avoids algorithm performance fluctuations caused by image size or contrast issues.
[0036] Specifically, in one possible embodiment, step S12 is implemented as follows: First, size normalization is performed. A fixed image size is preset, such as 512×256 pixels. A bilinear interpolation algorithm is used to scale the eyelid region image. This algorithm calculates the gray values of the surrounding four pixels by weighting them, ensuring image smoothness while accurately preserving the detailed features of the glands and avoiding jagged distortion during scaling. Second, contrast enhancement is performed on the normalized image. An adaptive histogram equalization algorithm is used to divide the image into 8×8 sub-blocks. Histogram equalization is performed on each sub-block separately. By limiting the contrast enhancement within the sub-block, local overexposure or underexposure problems caused by global equalization are avoided. Finally, grayscale calibration is performed on the enhanced image, mapping all pixel values to the standard grayscale range of 0-255 to ensure a uniform grayscale range and eliminate grayscale deviations caused by different devices. The preprocessed eyelid region image is then obtained.
[0037] In the image processing method described above for differentiating types of dry eye, step S2 involves artifact detection on the preprocessed eyelid region image to obtain an artifact mask. It should be understood that since the preprocessed eyelid region image still contains interference such as eyelash occlusion, reflective artifacts, and local motion blur, these artifacts partially overlap with the meibomian gland region in terms of grayscale features. This can cause subsequent meibomian gland segmentation algorithms to misclassify artifacts as glands or background, directly reducing segmentation accuracy. Therefore, this application further performs artifact detection processing on the preprocessed eyelid region image to accurately locate the spatial position and range of various artifacts in the image. This generates mask data representing artifact regions, providing clear prior information on artifact positions for subsequent guided meibomian gland segmentation. This allows the segmentation network to actively suppress the response of artifact regions during feature extraction, avoiding interference from artifacts in gland contour extraction, thereby ensuring the accuracy of the gland segmentation results upon which subsequent morphological quantitative analysis depends.
[0038] In particular, in one specific embodiment, Figure 4 This is a flowchart of sub-step S2 of the image processing method for distinguishing types of dry eye according to an embodiment of this application. Figure 4 As shown, step S2 includes: S21, inputting the preprocessed eyelid region image into a trained lightweight artifact detection network to obtain an artifact probability map; S22, performing binarization segmentation on the artifact probability map based on an artifact threshold to obtain the artifact mask.
[0039] Specifically, in step S21, the preprocessed eyelid region image is input into a trained lightweight artifact detection network to obtain an artifact probability map. It should be understood that due to the diverse types of artifacts within the eyelid region, such as thin strip artifacts of eyelashes and reflective block artifacts, and the existence of grayscale transition areas between some artifacts and glandular boundaries, traditional thresholding methods cannot accurately distinguish artifacts from normal tissue. Lightweight networks, however, possess efficient feature extraction capabilities and low computational cost, making them suitable for real-time clinical processing scenarios. Therefore, this application further inputs the preprocessed eyelid region image into a trained lightweight artifact detection network to obtain the probability value of each pixel belonging to an artifact. This allows for the quantitative characterization of artifact attributes in each pixel of the image, preserving the probability transition information of artifact boundary regions, avoiding over-expansion or omission of artifact regions caused by direct binarization, and providing a continuous probabilistic basis for subsequent accurate generation of artifact masks. Simultaneously, the efficiency of the lightweight network meets the image processing speed requirements of clinical equipment.
[0040] Specifically, in one possible embodiment, step S21 is implemented as follows: First, the specific structure of the lightweight artifact detection network is determined, using MobileNetV2 as the encoder backbone and loading its pre-trained weights on the ImageNet dataset to accelerate convergence and improve performance. The decoder part uses transposed convolutional layers to gradually restore the feature map resolution, and skip connections are set between the encoder and decoder. Second, the network is trained, and the training dataset uses data augmentation techniques such as random flipping, rotation, and brightness adjustment to expand sample diversity. During training, the Adam optimizer is used, with an initial learning rate of 1e-4 and a batch size of 8. The loss function is a pixel-level binary cross-entropy loss function, and the error between the network output probability and the real artifact annotation is continuously minimized through the backpropagation algorithm. Training is performed for approximately 100 epochs, or until the loss on the validation set no longer decreases significantly. Finally, the preprocessed eyelid region image is normalized to the pixel range required by the network input and input into the trained network. The network calculates the probability that each pixel belongs to an artifact through forward propagation and outputs an artifact probability map with the same size as the input image.
[0041] Specifically, in step S22, the artifact probability map is binarized based on an artifact threshold to obtain the artifact mask. It should be understood that since the pixel values in the artifact probability map are continuous probability data, ranging from 0 to 1, they cannot be directly used as spatial prior information for channel stitching with the preprocessed eyelid region image. Subsequent guided meibomian gland segmentation requires clear pixel-level artifact region identifiers, i.e., clearly distinguishable discretized information between artifacts and non-artifacts. Therefore, this application further performs binarization based on an artifact threshold on the artifact probability map to transform continuous probability values into discrete artifact region labels. This generates a structurally clear binary artifact mask, where pixel values clearly distinguish between artifact and non-artifact regions, allowing direct channel fusion with the preprocessed eyelid region image. This provides intuitive and clear artifact location guidance for the subsequent segmentation network, ensuring that the segmentation network accurately avoids artifact regions during processing. Simultaneously, binarization simplifies the data structure, reduces the computational burden on subsequent networks, and ensures the efficiency of the processing flow.
[0042] Specifically, in one possible embodiment, step S22 is implemented as follows: First, the Otsu adaptive thresholding algorithm is used to determine the artifact segmentation threshold. This algorithm automatically selects the threshold that maximizes the inter-class variance by calculating the inter-class variance under different grayscale thresholds in the artifact probability map, effectively avoiding the subjective error of manually setting the threshold and ensuring that the threshold adapts to the artifact distribution characteristics of different images. Second, each pixel value in the artifact probability map is compared with the determined artifact threshold one by one. If the artifact probability value of a pixel is greater than the threshold, the pixel is determined to belong to the artifact region, and its pixel value is set to 1; if the artifact probability value of a pixel is less than or equal to the threshold, the pixel is determined to belong to the non-artifact region, and its pixel value is set to 0, thus obtaining a preliminary binarized image. Finally, morphological closing operations are performed on the preliminary binarized image. A 3×3 rectangular structuring element is selected, and through a dilation-erosion operation, the tiny holes inside the artifact region are filled, while isolated noise points at the image edges are removed, ultimately obtaining an artifact mask with complete boundaries and accurate regions.
[0043] In the image processing method described above for differentiating types of dry eye syndrome, step S3 involves guided meibomian gland segmentation of the preprocessed eyelid region image based on an artifact mask to obtain a meibomian gland segmentation mask. It should be understood that artifacts, such as eyelashes and reflections, still exist in the preprocessed eyelid region image. These artifacts overlap with the meibomian glands in grayscale features. If meibomian gland segmentation is performed directly, the segmentation network may misclassify the artifacts as glands or background, resulting in incomplete gland contour extraction. Therefore, this application further uses an artifact mask as a guide to perform meibomian gland segmentation on the preprocessed eyelid region image, thereby enabling the segmentation network to actively avoid artifact regions during feature extraction. This ensures that the segmentation network focuses only on glandular features in non-artifact regions, accurately outlining the complete contour of the meibomian glands, avoiding interference from artifacts on the gland segmentation results, and thus providing an accurate meibomian gland segmentation mask for subsequent morphological quantitative analysis (such as gland loss rate calculation), ensuring the reliability of MGD severity grading.
[0044] In particular, in one specific embodiment, Figure 5 This is a flowchart of sub-step S3 of the image processing method for distinguishing types of dry eye according to an embodiment of this application. Figure 5 As shown, step S3 includes: S31, concatenating the artifact mask and the preprocessed eyelid region image along the channel dimension to obtain an input tensor; S32, performing multi-scale feature encoding with spatial attention on the input tensor to obtain an encoder feature set and bottleneck layer features; S33, performing feature decoding and fusion based on an attention gating mechanism on the encoder feature set and bottleneck layer features to obtain the final decoder features; S34, performing pixel-level probability prediction on the final decoder features to obtain a meibomian gland segmentation mask.
[0045] Specifically, in step S31, the artifact mask and the preprocessed eyelid region image are concatenated along the channel dimension to obtain the input tensor. It should be understood that since the artifact mask and the preprocessed eyelid region image are independent data carriers, the segmentation network cannot simultaneously obtain image texture features and artifact location information from either data alone, making it difficult for the network to associate artifact locations with glandular features. Therefore, this application further concatenates the artifact mask and the preprocessed eyelid region image along the channel dimension to fuse the image's texture feature data and prior data on artifact locations. This forms a single multi-channel input tensor, enabling the segmentation network to simultaneously acquire two types of key information during a single forward propagation. This provides a data foundation for artifact suppression and glandular feature enhancement during subsequent multi-scale feature encoding, avoiding the problem of the network being unable to collaboratively utilize the two types of information due to data separation, and ensuring the effectiveness of guided segmentation.
[0046] Specifically, in one possible embodiment, step S31 is implemented as follows: First, confirm the size consistency between the artifact mask and the preprocessed eyelid region image, ensuring that their height and width are exactly the same, both being fixed sizes set during the preprocessing stage. Second, determine the channel stitching dimension, using the image height and width as the spatial dimension and the channel as the feature dimension, taking the preprocessed eyelid region image (single-channel grayscale image) as the first channel and the artifact mask (single-channel binary image) as the second channel. Finally, through tensor stitching, fuse the two channel data along the feature dimension to generate an input tensor with a dimension of height × width × 2, where each pixel of this tensor contains the corresponding grayscale value and artifact identification information.
[0047] In a particular, in another possible preferred embodiment, the artifact mask and the preprocessed eyelid region image are concatenated along the channel dimension to obtain the input tensor. This further includes: generating multiple artifact probability maps by performing multiple forward propagations on the preprocessed eyelid region image; calculating the pixel-level variance of the multiple artifact probability maps to obtain an uncertainty map; normalizing the uncertainty map and calculating a confidence map reflecting the model's confidence level based on the normalized uncertainty map; and multiplying the artifact mask element-wise with the confidence map to generate a confidence-weighted artifact guidance map. Specifically, during guided meibomian gland segmentation, the confidence-weighted artifact guidance map is used instead of the artifact mask and concatenated with the preprocessed eyelid region image.
[0048] It's understandable that for artifact masks, a confidence-weighted artifact guidance map can be constructed based on the uncertainty map. In other words, directly concatenating the binary artifact mask as guidance information with the original image is essentially hard guidance, meaning hard decision information—whether a pixel is an artifact or not—is passed to the main segmentation network. This obviously loses uncertainty information. The uncertainty map reflects the cognitive uncertainty of the artifact detection model itself. For example, the model's uncertainty increases significantly at the edges of artifacts, in areas similar to gland textures, or in areas of extremely poor image quality. Forcing these high-uncertainty areas to be classified as 0 or 1 is equivalent to converting a probabilistic judgment that might be an artifact into a deterministic conclusion, which misleads subsequent networks. Furthermore, since hard guidance tells the network to ignore areas with a mask of 1, if the artifact detection model misclassifies in a certain area (e.g., misclassifying a normal but oddly shaped gland as an artifact), the main segmentation network will be unable to correct this error, leading to permanent loss of information.
[0049] Therefore, it is expected that the artifact mask can provide a richer guide graph, while expressing how likely the model is that there is an artifact and how confident the model is in this judgment. This can be achieved by fusing the artifact mask with the uncertainty graph to create a confidence-weighted artifact guide graph, thereby providing more refined and robust prior knowledge for the subsequent main segmentation network.
[0050] Specifically, firstly, regarding the uncertainty map, it is obtained by performing multiple (e.g., 20) forward propagations on the preprocessed eyelid region image using Monte Carlo dropout techniques to generate multiple artifact probability maps. The pixel-level variance of these multiple artifact probability maps is then calculated to obtain the uncertainty map. A larger variance indicates greater uncertainty in the model's judgment of whether a location is an artifact. Therefore, its various elements... Since the variance is at the pixel level and the value range is not fixed, the uncertainty graph needs to be normalized to scale its value range to the [0,1] interval, resulting in a normalized uncertainty graph.
[0051]
[0052] in, These are the original pixel values of the uncertainty map. The minimum pixel value of the uncertainty map. The maximum pixel value in the uncertainty map. This is a normalized uncertainty graph.
[0053] This means that the variance values will be significantly higher at the blurred edges of eyelash shadows, in the bright areas of tear film reflection, or in blurred areas caused by insufficient flipping, intuitively quantifying the model's degree of hesitation. Next, a confidence plot reflecting the model's confidence level is calculated based on the normalized uncertainty plot. Specifically, since confidence is negatively correlated with uncertainty, the confidence plot can be obtained by subtracting the normalized uncertainty value from 1. Its elements The value range is [0,1], which represents the confidence of the model in judging artifacts. That is, the closer the value is to 1, the more confident the model is in judging that pixel (whether it is judged as an artifact or the background); the closer the value is to 0, the less confident it is.
[0054] Then, the artifact mask is multiplied element-wise with the confidence map to generate a confidence-weighted artifact guidance map. For regions that the model is highly confident are artifacts, the value is approximately one, forming a strong suppression signal; for regions that the model is highly confident are background, the value is zero, forming a strong pass signal; for regions that the model considers to be artifacts but is uncertain (such as artifact edges), the value is approximately zero, the suppression signal is greatly weakened, and subsequent networks are allowed to refer to the original image information.
[0055] Therefore, when performing guided meibomian gland segmentation, the confidence-weighted artifact guidance map is used instead of the artifact mask and stitched with the preprocessed eyelid region image. The second channel of the resulting input tensor is no longer a rigid binary mask, but a soft guidance map with richer information and better reflecting the uncertainty of the model, which can guide the main segmentation network to perform more refined and robust segmentation.
[0056] In other words, for high-uncertainty regions such as artifact edges, the artifact guidance map provides soft decision values between 0 and 1. This allows the main segmentation network to partially trust artifact information when processing these regions, while simultaneously making a comprehensive judgment based on the original image texture in the context. This results in more accurate segmentation of gland boundaries adjacent to artifacts, improving the ability to handle artifact boundaries. Furthermore, when the artifact detection model makes small-scale misclassifications, the uncertainty in that region is usually high. In the artifact guidance map, the weight of this misclassified region is relatively low, thus weakening its negative impact on the main segmentation network and making the main segmentation network more robust. Additionally, with a guidance map that provides continuous values instead of a binary image as input, the network's gradients can propagate more smoothly, optimizing feature learning.
[0057] Specifically, step S32 involves performing multi-scale feature encoding with spatial attention on the input tensor to obtain the encoder feature set and bottleneck layer features. It should be understood that because meibomian glands exhibit multi-scale morphology in images (e.g., the main gland is thicker, branch glands are thinner), and artifacts are spatially unevenly distributed, single-scale feature extraction alone cannot fully capture the features of glands with different morphologies, nor can it accurately locate and suppress artifact regions. Therefore, this application further performs multi-scale feature encoding with spatial attention on the input tensor to extract gland features at different scales and strengthen the feature weights of non-artifact regions. This generates an encoder feature set containing multi-scale gland features, while spatial attention suppresses feature responses in artifact regions, ensuring that the encoded feature set is dominated by gland features. The bottleneck layer features, as the deepest abstract features, can capture the global gland distribution pattern, providing global information support for feature fusion and resolution restoration in the subsequent decoding process.
[0058] Specifically, in one possible embodiment, step S32 is implemented as follows: First, the encoder structure is determined, using MobileNetV2 as the backbone network, which includes five downsampling stages. Each stage consists of depthwise separable convolution, batch normalization, and a ReLU activation function. Second, a spatial attention module is inserted after each downsampling stage. This spatial attention module first performs global average pooling and global max pooling operations on the input feature map in the channel dimension to obtain two single-channel feature maps. Then, these two single-channel feature maps are concatenated in the channel dimension to form a dual-channel feature map. Next, a convolutional layer (e.g., using a 7×7 convolutional kernel) is used to convolve this dual-channel feature map to reduce its dimensionality to a single channel. Finally, the convolution result is input into a Sigmoid activation function to generate the final two-dimensional spatial attention weight map. The value of each pixel in the map ranges from 0 to 1, representing the importance of its spatial location. This weight map is then multiplied element-wise with the original input feature map of that stage to achieve adaptive enhancement of important regions (i.e., non-artifact glandular regions) in the feature map. Next, the weighted feature maps after the attention module are incorporated into the encoder feature set. Finally, after five stages of processing, the bottleneck layer features with the lowest dimensionality and highest level of abstraction are obtained, completing the multi-scale feature encoding.
[0059] Specifically, step S33 involves performing attention-gating-guided feature decoding and fusion on the encoder feature set and bottleneck layer features to obtain the final decoder features. It should be understood that since the encoder feature set contains local features at different scales, such as gland edges and fine branches, while the bottleneck layer features are global abstract features, direct decoding can easily lead to the loss of local details and cannot effectively filter artifact residue features. Therefore, this application further employs an attention-gating mechanism to decode and fuse the encoder feature set and bottleneck layer features, thereby filtering effective gland features in the encoder feature set, suppressing artifact residue, and gradually restoring image resolution. In this way, during the decoding process, the weights of the encoder features can be dynamically adjusted through attention gating, retaining only features related to gland segmentation, while fusing global and local features to ensure that the final output decoder features possess both global gland distribution information and fine local contour details, providing a high-quality feature foundation for subsequent pixel-level probability prediction.
[0060] Specifically, in one possible embodiment, step S33 is implemented as follows: First, the decoder structure is determined, comprising five upsampling stages. Second, an attention gating module is inserted before each upsampling stage to utilize the high-level semantic information of the decoder to guide the fusion of encoder features. Specifically, the attention gating module first linearly transforms the features from the decoder upsampling path (as the gating signal) and the features from the encoder skip connection path (as the input) through different convolutional layers (such as 1x1 convolutions) to unify their channel dimensions. Then, the two transformed feature maps are added element-wise to fuse their information. The result of the addition is then input into a ReLU activation function and compressed into a single-channel attention map through a convolutional layer. This attention map is then input into a Sigmoid activation function to generate the final attention coefficients (with a value range of 0 to 1). These coefficients highlight regions relevant to the current segmentation task. Finally, these attention coefficients are element-wise multiplied with the original encoder features to weight the encoder features, effectively suppressing features in irrelevant regions (such as artifact residues) while enhancing features related to glandular structures. Next, the encoder features, after attention-gated filtering, are concatenated with the upsampled decoder features along the channel dimension, and then fused using a convolutional layer. Finally, these five processing stages are completed sequentially to obtain the final decoder features.
[0061] Specifically, in step S34, pixel-level probability prediction is performed on the final decoder features to obtain a meibomian gland segmentation mask. It should be understood that since the final decoder features are high-dimensional feature maps (containing multiple feature channels), they cannot directly represent whether each pixel is a meibomian gland. They need to be converted into pixel-level probability data, and then binarized to obtain a clear gland region identifier. Therefore, this application further performs pixel-level probability prediction on the final decoder features to quantify the probability that each pixel belongs to a meibomian gland, and converts it into a binary segmentation result. In this way, the gland can be accurately distinguished from the background (including artifact regions) through probability prediction, avoiding segmentation ambiguity caused by direct feature mapping. After binarization, a meibomian gland segmentation mask with clear boundaries and accurate regions is obtained, providing clear pixel-level gland region data for subsequent morphological quantitative analysis (such as gland area calculation and tortuosity analysis), ensuring the accuracy of the quantitative indicators.
[0062] In particular, in one specific embodiment, Figure 6 This is a flowchart of sub-step S34 of the image processing method for distinguishing types of dry eye according to an embodiment of this application. Figure 6 As shown, step S34 includes: S341, performing point convolutional encoding on the final decoder features to obtain a logistic regression map; S342, performing probabilistic activation on the logistic regression map to obtain a gland probability map; S343, performing binarization segmentation on the gland probability map based on a gland threshold to obtain the meibomian gland segmentation mask.
[0063] More specifically, step S341 involves performing pointwise convolutional encoding on the final decoder features to obtain a logistic regression map. It should be understood that since the final decoder features originate from the decoder output of the segmentation network, they typically contain multiple feature channels. For example, U-Net-like networks often have 64 or 128 channels in their decoder output. This high channel count results in the feature map lacking direct pixel-level classification significance and failing to adapt to subsequent probabilistic activation functions. Therefore, this application further performs pointwise convolutional encoding on the final decoder features to map multi-channel high-dimensional features into single-channel logistic value feature maps. This simplifies the feature dimension while preserving the key feature differences between glands and the background, ensuring each pixel corresponds to a logistic value that can be used for probability calculation. This lays the foundation for subsequent conversion into probability values through activation functions, while avoiding information redundancy and computational resource waste caused by multi-channel features, thus ensuring the efficiency of pixel-level probability prediction.
[0064] Specifically, in one possible embodiment, step S341 is implemented as follows: First, the core parameters of the point convolution are determined, and a 1×1 convolution kernel, i.e., a point convolution kernel, is selected. This kernel can linearly combine features in only the channel dimension without changing the feature map space size (height, width). Second, the number of output channels of the point convolution layer is set to 1, so that the multi-channel final decoder features are fused into a single-channel feature map after convolution. Finally, the final decoder features are input into the point convolution layer, and a single-channel logistic regression map is output through pixel-by-pixel convolution calculation between the convolution kernel and the feature map. The value of each pixel in this map reflects the original logical judgment basis for the corresponding position belonging to the gland.
[0065] More specifically, step S342 involves probabilistically activating the logistic regression graph to obtain a gland probability map. It should be understood that because the pixel values in the logistic regression graph are unrestricted, potentially positive, negative, or zero, they lack a clear probabilistic meaning and cannot be directly used to determine whether a pixel belongs to a meibomian gland. Furthermore, there is a lack of a unified standard for comparing the values of different pixels. Therefore, this application further performs probabilistic activation on the logistic regression graph to map the unbounded pixel values in the logistic regression graph to probability values in the [0,1] interval. In a specific example of this application, step S342 includes: probabilistically activating the logistic regression graph using the following formula:
[0066]
[0067] in, It is the Sigmoid activation function. For each pixel value in the logistic regression graph, These represent the pixel probability values of the gland probability map. Thus, the linear transformation result is obtained through the Sigmoid activation function. Mapping to the interval (0,1) allows each pixel value to have a clear interpretation of the possibility of belonging to a gland, where 0 indicates that it does not belong to a gland at all, 1 indicates that it belongs to a gland at all, and the intermediate values represent different degrees of probability. This provides a quantifiable and interpretable basis for subsequent threshold-based binarization segmentation, while ensuring that the pixel probabilities between different images are comparable and improving the consistency of the segmentation results.
[0068] More specifically, step S343 involves performing binarization segmentation on the gland probability map based on a gland threshold to obtain the meibomian gland segmentation mask. It should be understood that since the pixel values in the gland probability map are continuous probability data, such as 0.3, 0.7, etc., they only reflect the probability that a pixel belongs to a gland and cannot directly provide a clear spatial division of glands or non-glandular regions. Subsequent morphological quantitative analysis requires discretized gland region identifiers. Therefore, this application further performs binarization segmentation on the gland probability map based on a gland threshold to convert continuous probability values into discrete binary labels, where 1 represents a gland and 0 represents the background. This generates a meibomian gland segmentation mask with clear boundaries and well-defined regions, directly outlining the spatial contour of the glands. This provides accurate regional data for subsequent calculations of quantitative indicators such as gland area, missing rate, and distortion, ensuring the accuracy of morphological analysis results and supporting the reliability of MGD severity grading.
[0069] Specifically, in one possible embodiment, step S343 is implemented as follows: First, a gland segmentation threshold is determined. The Otsu adaptive thresholding algorithm is used to analyze the gland probability map. This algorithm automatically selects the threshold that maximizes the inter-class variance by calculating the inter-class variance under different grayscale thresholds, avoiding the subjective error of manually setting the threshold and ensuring that the threshold adapts to the gland probability distribution characteristics of different images. Second, each pixel value in the gland probability map is compared with the determined segmentation threshold one by one. If the probability value of a pixel is greater than the threshold, it is determined that the pixel belongs to the gland region and its value is set to 1; if the probability value of a pixel is less than or equal to the threshold, it is determined that the pixel belongs to the background region (including artifact regions) and its value is set to 0, thus obtaining a preliminary binarized image. Finally, morphological closing operations are performed on the preliminary binarized image. A 3×3 rectangular structuring element is selected, and through a dilation-erosion operation, the tiny holes inside the gland region are filled, while isolated noise points at the image edges are removed, finally obtaining a meibomian gland segmentation mask with complete boundaries and accurate regions.
[0070] In the aforementioned image processing method for differentiating dry eye syndrome types, step S4 involves performing morphological quantitative analysis based on the meibomian gland segmentation mask and the preprocessed eyelid region image to obtain MGD quantitative indicators. It should be understood that since the meibomian gland segmentation mask only provides a binary spatial division of the gland and background, and the preprocessed eyelid region image only contains ocular surface grayscale texture information, neither can directly output the objective quantitative data required for MGD diagnosis. Clinical diagnosis relies on multi-dimensional numerical indicators (such as the degree of gland absence and morphological characteristics) to avoid subjective errors. Therefore, this application further combines the gland region information from the meibomian gland segmentation mask with the eyelid extent information from the preprocessed eyelid region image to conduct morphological quantitative analysis, thereby transforming the image spatial features into multi-dimensional numerical indicators that can be used for MGD grading. This generates MGD quantitative indicators covering key parameters such as meibomian gland absence rate, gland quantity, and gland distortion, providing comprehensive and objective data support for the subsequent standardized grading results output by the decision tree model. This completely eliminates the limitations of traditional subjective image reading and ensures the consistency and traceability of grading results for different cases.
[0071] In particular, in one specific embodiment, Figure 7 This is a flowchart of sub-step S4 of the image processing method for distinguishing types of dry eye according to an embodiment of this application. Figure 7 As shown, step S4 includes: S41, calculating the meibomian gland loss rate based on the meibomian gland segmentation mask and the preprocessed eyelid region image; S42, performing connected component analysis on the meibomian gland segmentation mask to obtain an independent gland set; S43, performing morphological feature extraction based on the skeleton on the independent gland set to obtain a morphological feature set, wherein the meibomian gland loss rate, the size of the independent gland set, and the morphological feature set constitute the MGD quantification index.
[0072] Specifically, step S41 calculates the meibomian gland loss rate based on the meibomian gland segmentation mask and the preprocessed eyelid region image. It should be understood that the meibomian gland loss rate is a core indicator for diagnosing the severity of meibomian gland dysfunction (MGD), and it needs to be quantified through the ratio of the actual gland area to the overall eyelid area. However, the meibomian gland segmentation mask can only provide a binary spatial region of the gland and cannot define the complete range of the eyelid. Although the preprocessed eyelid region image has removed irrelevant backgrounds, such as periocular skin and instrument borders, it cannot distinguish between the gland and the background. Neither method alone can achieve the loss rate calculation. Therefore, this application further combines the gland region information from the meibomian gland segmentation mask with the eyelid range information from the preprocessed eyelid region image to calculate the meibomian gland loss rate, thereby converting the relative degree of gland loss into objective proportional data. This provides crucial quantitative evidence for subsequent MGD severity grading, ensuring that the indicator fully matches clinical diagnostic standards (such as AritaMeiboscore), enabling horizontal comparison of the degree of deficiency in different patients and different testing scenarios, and completely avoiding assessment differences caused by traditional subjective image interpretation.
[0073] In particular, in one specific embodiment, Figure 8 This is a flowchart of sub-step S41 of the image processing method for distinguishing types of dry eye according to an embodiment of this application. Figure 8 As shown, step S41 includes: S411, calculating the total area of the eyelid based on the preprocessed eyelid region image; S412, calculating the total area of the gland based on the meibomian gland segmentation mask; S413, processing the total area of the eyelid and the total area of the gland to obtain the meibomian gland loss rate.
[0074] More specifically, step S411 calculates the total eyelid area based on the preprocessed eyelid region image. It should be understood that the calculation of the meibomian gland loss rate requires the complete spatial range of the eyelid as a benchmark, i.e., the loss rate calculation requires the ratio of "gland area / eyelid area." However, the original infrared image contains a large amount of irrelevant background, while the preprocessed eyelid region image has been standardized (e.g., region of interest extraction, noise reduction) to accurately preserve the effective eyelid area, making it the only data source that can accurately define the eyelid range. Therefore, this application further calculates the total eyelid area based on the preprocessed eyelid region image to provide reliable benchmark area data for calculating the meibomian gland loss rate. This ensures that the total eyelid area accurately reflects the actual physiological range of the eyelid, avoids interference from irrelevant background areas on the benchmark data, lays the foundation for the accuracy of subsequent loss rate calculations, and ensures uniformity in the statistical standards of eyelid area across different cases, guaranteeing the comparability of the loss rate indicators.
[0075] Specifically, in one possible embodiment, step S411 is implemented as follows: First, the specifications of the preprocessed eyelid region image are confirmed to ensure that the image is of a fixed size, such as 512×256 pixels, and that the grayscale values are normalized to a standard range, such as 0-255. Second, a contour detection algorithm (such as Canny edge detection combined with contour fitting) is used to process the image. First, Gaussian filtering is used to remove minor noise at the image edges, and then the outer contour of the eyelid is extracted using the Canny algorithm to ensure that the contour completely covers the entire eyelid region without breaks or redundant edges. Finally, the number of all pixels inside the outer contour of the eyelid is accumulated using a pixel-level statistical tool. This number is the total area of the eyelid. During the statistical process, the coordinate range of the contour is recorded simultaneously to ensure that only pixels in the effective area of the eyelid are counted.
[0076] More specifically, step S412 calculates the total area of the meibomian glands based on the meibomian gland segmentation mask. It should be understood that the meibomian gland segmentation mask is a binary image obtained through guided segmentation, where areas with a pixel value of 1 clearly correspond to meibomian gland tissue, and areas with a pixel value of 0 correspond to the background (including artifacts, ocular surface stroma, etc.). It is the only data source that can accurately distinguish between glandular and non-glandular tissue. The total area of the glands is the core molecular data for calculating the meibomian gland loss rate, directly determining the accuracy of the loss rate. Therefore, this application further calculates the total area of the glands based on the meibomian gland segmentation mask to obtain the actual area data of meibomian gland tissue within the eyelid. This ensures that the total area of the glands accurately reflects the actual distribution range of the glands, avoids interference from non-glandular areas such as artifacts and background on the area statistics, provides reliable molecular data for subsequent loss rate calculations, and ensures that the final loss rate index truly reflects the degree of glandular atrophy and loss.
[0077] Specifically, in one possible embodiment, step S412 is implemented as follows: First, the meibomian gland segmentation mask is preprocessed morphologically by performing an opening operation (erosion followed by dilation) using a 3×3 rectangular structuring element to remove isolated noise points that may exist in the mask, such as single 1-value pixels caused by artifact residue, thus preventing noise points from being included in the gland area. Second, a pixel-by-pixel scanning tool is used to traverse the entire preprocessed mask, reading the value of each pixel row by row and column by column, recording only pixels with a value of 1. Finally, the total number of pixels with a value of 1 is accumulated, which is the total gland area. During the statistical process, the coordinate distribution of the gland region is simultaneously marked to ensure that only continuous connected gland regions are counted, excluding discrete pixels that are not glands.
[0078] More specifically, step S413 processes the total eyelid area and total gland area to obtain the meibomian gland loss rate. It should be understood that since the total eyelid area and total gland area are only independent absolute values, using them alone cannot reflect the proportion of gland loss relative to the eyelid. However, in clinical diagnosis of the severity of MGD, the loss ratio is the core criterion; for example, a loss rate <1 / 3 indicates mild, 1 / 3-2 / 3 indicates moderate, and >2 / 3 indicates severe. Absolute values alone cannot meet the grading requirements. Therefore, this application further performs specific logical processing on the total eyelid area and total gland area to obtain the meibomian gland loss rate, thereby converting the absolute area data into a proportion indicator with clinical diagnostic significance. In a specific example of this application, step S413 processes the total eyelid area and total gland area using the following formula to obtain the meibomian gland loss rate:
[0079]
[0080] in, The total area of the glands, The total area of the eyelids. The missing meibomian gland rate is used to ensure that the missing rate index fully matches the clinical MGD grading standard, enabling standardized comparison of the degree of missing glands among different patients and different testing devices. This also provides a direct and reliable quantitative input for the subsequent decision tree model to output the severity grading of MGD, ensuring the objectivity and repeatability of the grading results. A higher missing meibomian gland rate generally indicates a higher severity of MGD.
[0081] Specifically, in step S42, connected component analysis is performed on the meibomian gland segmentation mask to obtain a set of independent glands. It should be understood that since the glandular regions in the meibomian gland segmentation mask typically exist as multiple connected regions, corresponding to multiple independent glands within the eyelid, but the segmentation mask does not distinguish and label these independent glands, it is impossible to analyze the morphological characteristics of each gland individually, such as tortuosity and length. However, morphological abnormalities of a single gland are also an important diagnostic basis for MGD. Therefore, this application further performs connected component analysis on the meibomian gland segmentation mask to identify and separate each independent glandular region. This generates a set containing all independent glands, with each set element corresponding to a binary mask for a single gland. This provides a data foundation for subsequent morphological feature extraction (such as skeleton extraction and tortuosity calculation) for individual glands, ensuring that the MGD quantitative indicators can cover the individual morphological information of the glands and improve the comprehensiveness of the diagnosis.
[0082] Specifically, in one possible embodiment, step S42 is implemented as follows: First, the meibomian gland segmentation mask is preprocessed to ensure that the mask is a strictly binary image with pixel values of only 0 or 1. Small noise points in the mask are removed using morphological opening operations to avoid misidentification as independent glands. Second, a connected component analysis algorithm is performed. This algorithm traverses the mask pixel by pixel, identifying adjacent (usually 4-neighborhood or 8-neighborhood) pixels with a value of 1 as the same connected region, and assigning a unique integer label to each connected region. Finally, independent gland masks are generated based on the labels. A separate binary mask is created for each connected region corresponding to a label, retaining only the gland pixels corresponding to that label, with the rest set to 0. All independent gland masks together form an independent gland set.
[0083] Specifically, in step S43, morphological features based on a skeleton are extracted from the independent gland sets to obtain a morphological feature set. The meibomian gland loss rate, the size of the independent gland sets, and the morphological feature set constitute the MGD quantitative index. It should be understood that since the independent gland sets only provide the spatial area of a single gland, they cannot directly reflect the morphological details of the gland, such as the degree of curvature and length. These morphological details are important supplementary evidence for judging the severity of MGD; for example, the more severe the gland distortion, the higher the degree of MGD. Relying solely on the meibomian gland loss rate and the number of glands cannot comprehensively assess the MGD status. Therefore, this application further performs skeleton-based morphological feature extraction on the independent gland sets to obtain multi-dimensional morphological parameters of individual glands. This generates a morphological feature set containing indicators such as gland distortion and average length, which, together with the meibomian gland loss rate and the number of glands (size of the independent gland sets), constitutes the MGD quantitative index, achieving a comprehensive quantitative assessment of MGD from overall absence to individual morphology, ensuring that the grading results better meet clinical diagnostic needs.
[0084] Specifically, in one possible embodiment, step S43 is implemented as follows: First, the skeleton of each independent gland mask in the independent gland set is extracted. The Zhang-Suen thinning algorithm is used to refine the gland region into a single-pixel-width skeleton, which can completely preserve the topological structure of the gland, such as branches and curvature. Second, the endpoints of the skeleton are located. By counting the number of adjacent pixels of the skeleton pixels (only one adjacent pixel is the endpoint), the two farthest endpoints of each gland skeleton are determined. Finally, morphological features are calculated, including gland length (total number of pixels in the skeleton) and tortuosity (ratio of gland length to the straight-line distance between the two endpoints). These features of each gland are recorded as feature vectors. The feature vectors of all glands together form a morphological feature set, which is then integrated with the meibomian gland loss rate and the size of the independent gland set (number of glands) to form a complete MGD quantitative index.
[0085] In the image processing method described above for differentiating types of dry eye syndrome, step S5 involves inputting MGD quantitative indicators into a decision tree to obtain the severity classification of MGD. It should be understood that since MGD quantitative indicators include multi-dimensional data such as meibomian gland absence rate, gland quantity, and average tortuosity, these data need to be comprehensively judged in conjunction with clinical diagnostic rules to correspond to the severity classification of MGD, such as 0-4. Manual integration of multi-dimensional indicators is easily affected by differences in physician experience, leading to highly subjective and inconsistent classification results. Therefore, this application further inputs MGD quantitative indicators into a pre-trained decision tree to automatically integrate and judge multi-dimensional indicators based on fixed clinical diagnostic logic. This transforms the diagnostic experience of clinical experts into reproducible algorithmic rules, achieving standardization and automation of MGD severity classification, completely avoiding subjective errors from manual image reading, ensuring high consistency and traceability of classification results for different patients and different testing scenarios, while improving classification efficiency and meeting the needs of large-scale clinical screening.
[0086] Specifically, in one possible embodiment, step S5 is implemented as follows: First, a decision tree training dataset is constructed by collecting a large number of case data that have been clinically diagnosed with MGD severity grading. Each case dataset contains complete MGD quantitative indicators (meibomian gland absence rate, gland quantity, average tortuosity, etc.) and corresponding expert grading results (0-4 levels). Second, a decision tree model is trained using the C4.5 decision tree algorithm. MGD quantitative indicators are used as input features, and expert grading results are used as target labels. The optimal splitting attribute is selected through information gain ratio, and a decision tree structure is constructed. During training, 10-fold cross-validation is used to optimize model parameters, ensuring that the model's grading accuracy on the validation set reaches the preset clinical standard. Finally, grading prediction is performed by inputting the MGD quantitative indicators of the case to be graded into the trained decision tree. The model judges each node layer by layer. For example, it first determines whether to enter the moderate or severe branch based on the meibomian gland absence rate, and then further refines the grading based on the gland quantity, outputting a unique MGD severity grading result. Simultaneously, a grading basis report is generated, clarifying the contribution of each quantitative indicator to the grading result.
[0087] In summary, the image processing method for differentiating dry eye syndrome (MGD) types based on the embodiments of this application is explained. First, the original infrared meibomian gland image undergoes standardized preprocessing. Then, an artifact detection step is introduced to actively identify and locate interference areas in the image, such as eyelash occlusion and uneven illumination. The perceived artifact information is then used to guide the subsequent meibomian gland segmentation process, thereby achieving accurate extraction of meibomian gland morphology against complex backgrounds. Based on this, the precisely segmented gland morphology is quantified in multiple dimensions, transforming image features into objective numerical indicators. Finally, a decision tree model is used to comprehensively judge these numerical indicators and output a standardized MGD severity grading. This intelligently suppresses interference information caused by image artifacts, thus achieving a more robust and accurate MGD severity grading even in poor-quality clinical images.
[0088] Figure 9 This is a block diagram of an image processing system for differentiating types of dry eye according to an embodiment of this application. Figure 9 As shown, the image processing system 100 for distinguishing dry eye syndrome types according to an embodiment of this application includes: an image standardization preprocessing module 110, used to perform standardization preprocessing on the acquired raw infrared meibomian gland image to obtain a preprocessed eyelid region image; an image artifact perception module 120, used to perform artifact perception on the preprocessed eyelid region image to obtain an artifact mask; a guided meibomian gland segmentation module 130, used to perform guided meibomian gland segmentation on the preprocessed eyelid region image based on the artifact mask to obtain a meibomian gland segmentation mask; a morphological quantification analysis module 140, used to perform morphological quantification analysis based on the meibomian gland segmentation mask and the preprocessed eyelid region image to obtain a MGD quantification index; and an MGD severity grading decision module 150, used to input the MGD quantification index into a decision tree to obtain a MGD severity grading.
[0089] As described above, the image processing system 100 for distinguishing types of dry eye syndrome according to embodiments of this application can be implemented in various wireless terminals, such as servers with image processing algorithms for distinguishing types of dry eye syndrome. In one possible implementation, the image processing system 100 for distinguishing types of dry eye syndrome according to embodiments of this application can be integrated into the wireless terminal as a software module and / or a hardware module. For example, the image processing system 100 for distinguishing types of dry eye syndrome can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the image processing system 100 for distinguishing types of dry eye syndrome can also be one of many hardware modules of the wireless terminal.
[0090] Alternatively, in another example, the image processing system 100 for distinguishing dry eye types and the wireless terminal may also be separate devices, and the image processing system 100 for distinguishing dry eye types may be connected to the wireless terminal via wired and / or wireless networks and transmit interactive information in accordance with an agreed data format.
[0091] Here, those skilled in the art will understand that the specific operations of each step in the image processing system for differentiating dry eye types have been referenced above. Figures 1 to 8 The image processing method used for differentiating dry eye syndrome types is described in detail here, and therefore, its repeated description will be omitted.
Claims
1. An image processing method for differentiating types of dry eye syndrome, characterized in that, include: The original infrared meibomian gland images were standardized and preprocessed to obtain preprocessed eyelid region images; The process of performing artifact detection on a preprocessed eyelid region image to obtain an artifact mask includes: inputting the preprocessed eyelid region image into a trained lightweight artifact detection network to obtain an artifact probability map; and performing binarization segmentation on the artifact probability map based on an artifact threshold to obtain the artifact mask. Based on artifact masking, guided meibomian gland segmentation is performed on the preprocessed eyelid region image to obtain the meibomian gland segmentation mask. This includes: concatenating the artifact mask and the preprocessed eyelid region image along the channel dimension to obtain the input tensor; performing multi-scale feature encoding with spatial attention on the input tensor to obtain the encoder feature set and bottleneck layer features; performing feature decoding and fusion based on attention gating mechanism on the encoder feature set and bottleneck layer features to obtain the final decoder features; and performing pixel-level probability prediction on the final decoder features to obtain the meibomian gland segmentation mask. Morphological quantitative analysis was performed based on meibomian gland segmentation mask and preprocessed eyelid region images to obtain MGD quantitative indicators. Input the quantitative indicators of MGD into the decision tree to obtain the severity level of MGD.
2. The image processing method for differentiating dry eye syndrome types according to claim 1, characterized in that, The acquired raw infrared meibomian gland images were standardized and preprocessed to obtain preprocessed eyelid region images, including: Region of interest extraction was performed on the original infrared meibomian gland image to obtain the eyelid region image; The eyelid region image is normalized in size and enhanced in contrast to obtain a preprocessed eyelid region image.
3. The image processing method for differentiating types of dry eye syndrome according to claim 1, characterized in that, Further includes: Multiple artifact probability maps are generated by performing multiple forward propagations on the preprocessed eyelid region image. Calculate the pixel-level variance of the multiple artifact probability maps to obtain an uncertainty map; The uncertainty graph is normalized, and a confidence graph reflecting the model's confidence level is calculated based on the normalized uncertainty graph. The artifact mask is multiplied element-wise with the confidence map to generate a confidence-weighted artifact guidance map. In the guided meibomian gland segmentation, the confidence-weighted artifact guide map is used instead of the artifact mask and stitched together with the preprocessed eyelid region image.
4. The image processing method for differentiating types of dry eye syndrome according to claim 1, characterized in that, Pixel-level probability prediction is performed on the final decoder features to obtain the meibomian gland segmentation mask, including: The final decoder features are then subjected to pointwise convolutional encoding to obtain a logistic regression map. Probabilistic activation is applied to the logistic regression graph to obtain a gland probability graph; The meibomian gland segmentation mask is obtained by binarizing the gland probability map based on a gland threshold.
5. The image processing method for differentiating dry eye syndrome types according to claim 4, characterized in that, Probabilistic activation of the logistic regression graph to obtain a gland probability graph includes: probabilistic activation of the logistic regression graph using the following formula: in, It is the Sigmoid activation function. For each pixel value in the logistic regression graph, These are the pixel probability values of the gland probability map.
6. The image processing method for differentiating types of dry eye syndrome according to claim 1, characterized in that, Morphological quantification analysis was performed based on meibomian gland segmentation masking and preprocessed eyelid region images to obtain MGD quantification indices, including: The meibomian gland loss rate was calculated based on the meibomian gland segmentation mask and preprocessed eyelid region images. Connectivity component analysis was performed on the meibomian gland segmentation mask to obtain the set of independent glands; The morphological features of independent gland sets are extracted based on the skeleton to obtain a morphological feature set, wherein the meibomian gland loss rate, the size of the independent gland sets and the morphological feature set constitute the MGD quantitative index.
7. The image processing method for differentiating types of dry eye syndrome according to claim 6, characterized in that, Based on meibomian gland segmentation masks and preprocessed eyelid region images, the meibomian gland loss rate is calculated, including: Calculate the total eyelid area based on the preprocessed eyelid region image; Calculate the total area of the glands based on the meibomian gland segmentation mask; The meibomian gland loss rate is obtained by processing the total eyelid area and the total gland area using the following formula: in, The total area of the glands, The total area of the eyelids. The rate of meibomian gland absence.
8. An image processing system for differentiating types of dry eye syndrome, characterized in that, include: The image standardization preprocessing module is used to standardize and preprocess the acquired raw infrared meibomian gland images to obtain preprocessed eyelid region images; An image artifact perception module is used to perceive artifacts in a preprocessed eyelid region image to obtain an artifact mask. The module includes: inputting the preprocessed eyelid region image into a trained lightweight artifact detection network to obtain an artifact probability map; and performing binarization segmentation on the artifact probability map based on an artifact threshold to obtain the artifact mask. A guided meibomian gland segmentation module is used to perform guided meibomian gland segmentation on a preprocessed eyelid region image based on an artifact mask to obtain a meibomian gland segmentation mask. This includes: concatenating the artifact mask and the preprocessed eyelid region image along the channel dimension to obtain an input tensor; performing multi-scale feature encoding with spatial attention on the input tensor to obtain an encoder feature set and bottleneck layer features; performing attention-gated feature decoding and fusion on the encoder feature set and bottleneck layer features to obtain the final decoder features; and performing pixel-level probability prediction on the final decoder features to obtain the meibomian gland segmentation mask. The morphological quantitative analysis module is used to perform morphological quantitative analysis based on meibomian gland segmentation mask and preprocessed eyelid region images to obtain MGD quantitative indicators. The MGD severity grading decision module is used to input MGD quantitative indicators into the decision tree to obtain the severity grading of MGD.
Citation Information
Patent Citations
Meibomian gland segmentation network training method and device based on multiple supervision modes
CN113706564A
Electronic device and controlling method thereof
US20240404010A1