Corneal disease diagnosis system, method, and terminal based on an anterior segment photograph
By developing a corneal disease diagnostic model based on the fusion of learnable wavelets and Morse topological features, the accuracy and robustness of corneal disease diagnosis under low-cost anterior segment photography conditions are addressed, and effective identification of abnormalities in the overall morphology and texture frequency of the cornea is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI FIRST PEOPLES HOSPITAL
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies struggle to simultaneously model the overall morphology and structure of the cornea and characterize abnormal texture frequencies under low-cost anterior segment photography conditions, thus limiting the accuracy and robustness of corneal disease diagnosis.
A corneal disease diagnostic model based on the fusion of learnable wavelets and Morse topology features is adopted. The model performs frequency domain decomposition and modulation through a frequency-aware modulation module, global topology response modeling through a topology-aware module, and cross-modal alignment and consistency sensing through a confidence-aware topology and frequency fusion module, thereby achieving accurate diagnosis of corneal diseases.
It improves the accuracy and robustness of corneal disease diagnosis, is suitable for large-scale screening and auxiliary diagnosis, and can effectively identify abnormalities in the overall morphology and texture frequency of the cornea.
Smart Images

Figure CN122135939A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical data processing technology, and in particular to a corneal disease diagnostic system, method, and terminal based on anterior segment photography. Background Technology
[0002] The cornea is the transparent tissue at the very front of the eyeball, located on the outermost layer. While it lacks blood vessels, it is richly supplied with nerve endings. The cornea is composed of multiple layers, including the epithelium, stroma, and endothelium. These layers are arranged in an orderly and regular pattern, and their overall morphological stability and tissue order play a crucial role in maintaining normal refractive function and clear vision. When corneal diseases occur, significant abnormalities often appear in the cornea's morphology, thickness distribution, and tissue arrangement, such as corneal thinning, abnormal curvature, disordered tissue structure, or decreased transparency. These abnormalities are particularly common in diseases such as keratoconus, infectious keratitis, and corneal opacity. If not detected and intervened in time, they can easily lead to decreased vision and even irreversible visual impairment, severely impacting the patient's quality of life.
[0003] Unlike retinal or fundus diseases, corneal diseases often do not manifest as single, well-defined local abnormalities. Instead, they primarily involve the disruption of the overall morphological stability of the cornea and systemic changes in its spatial structure and texture distribution. Pathological changes are characterized by their global, progressive, and multi-scale nature, essentially stemming from a decline in the ordered structure of corneal tissue and abnormal texture frequency distribution patterns. Analysis methods relying solely on local appearance or texture features are insufficient to fully characterize the key discriminative information of corneal diseases. Existing corneal disease identification methods based on end-to-end convolutional neural networks typically focus on automatically extracting local texture or appearance features from raw images. They lack the ability to model global information such as the overall morphological structure, spatial topological stability, and abnormal texture frequency distribution, resulting in limited accuracy and robustness when dealing with corneal diseases that are morphologically similar but have different pathological mechanisms.
[0004] In clinical medical practice, corneal examination and evaluation typically rely on various imaging techniques, including slit-lamp microscopy, corneal tomography, fluorescein-stained anterior segment photography, and conventional anterior segment photography. These imaging methods can reflect the morphology, structure, and surface condition of the cornea from different angles, playing a crucial role in the clinical diagnosis of corneal diseases. Among these, slit-lamp microscopy is currently one of the most commonly used corneal examination methods, enabling direct observation of corneal surface morphology, changes in transparency, and local lesions. However, this examination method largely depends on the experience and judgment of the examining physician, resulting in highly subjective diagnostic results. Furthermore, it is difficult to quantitatively analyze changes in the overall morphology and structure of the cornea, limiting its ability to identify early or minor structural abnormalities. In addition, slit-lamp examination equipment is usually expensive and bulky, requiring sophisticated examination environments and procedures, making it difficult to widely apply in primary healthcare institutions or large-scale screening scenarios. In contrast, anterior segment photography offers advantages such as being non-contact, easy to operate, low-cost, and easily standardized. It can more intuitively present the overall appearance and texture distribution characteristics of the cornea, making it more suitable for initial screening and long-term follow-up of corneal diseases. Although recent studies have attempted to utilize deep learning methods for automated analysis of anterior segment image data, improving diagnostic efficiency and objectivity to some extent, existing methods still struggle to simultaneously model the overall corneal morphology and structure while characterizing abnormal texture frequencies under low-cost anterior segment imaging conditions. This makes them ill-suited to the complex, diverse, and subtly nuanced pathological manifestations of corneal diseases. Therefore, there is an urgent need for an analytical method that can jointly model the overall morphological stability of the cornea and abnormal tissue texture frequency distribution based on low-cost anterior segment imaging images. This would enable accurate and stable identification of corneal diseases, thereby meeting the practical needs of large-scale corneal disease screening and assisted diagnosis. Summary of the Invention
[0005] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a corneal disease diagnosis system, method and terminal based on anterior segment photography, to solve the technical problem that corneal diseases are difficult to accurately identify under existing low-cost imaging conditions.
[0006] To achieve the above and other related objectives, this invention provides a corneal disease diagnosis system based on anterior segment photography. The system includes: an image acquisition module for acquiring anterior segment photographs; and a corneal disease diagnosis module for inputting the anterior segment photographs into a corneal disease diagnosis model based on the fusion of learnable wavelet and Morse topological features from the anterior segment photographs to obtain corneal disease diagnosis results. The corneal disease diagnosis model includes: a frequency-aware modulation module, a topology-aware module, and a confidence-aware topology and frequency fusion module. The frequency-aware modulation module performs learnable frequency domain decomposition and sub-band modulation on the input anterior segment photographs to obtain frequency domain features and frequency domain reliability scores. The topology-aware module globally models the long-range dependencies between topological responses at different scales and locations of the input anterior segment photographs to obtain topological embedding features and topological response scores. The confidence-aware topology and frequency fusion module uses a bidirectional cross-attention mechanism to perform cross-modal alignment, confidence modulation, and consistency-aware gating based on frequency domain features, frequency domain reliability scores, topology embedding features, and topology response scores to obtain corresponding corneal disease diagnosis results.
[0007] In one embodiment of the present invention, the frequency-aware modulation module includes: a frequency domain decomposition submodule, used to perform frequency domain decomposition on the input anterior segment photograph using a learnable Haar wavelet analysis operator to obtain four complementary frequency subbands; a subband-level frequency domain gated modulation submodule, used to perform adaptive weight calibration based on each frequency subband to obtain the gate weight of each subband, and load the gate weight of the extended spatial dimension onto the corresponding frequency subband to obtain each frequency subband after frequency domain gated modulation; and a subband-level multi-scale frequency domain enhancement submodule, used to perform frequency domain enhancement on each frequency subband after frequency domain gated modulation through a multi-scale dilated convolution pyramid; the multi-scale dilated convolution pyramid includes: four subbands with different dilation values. The module employs parallel branches of 3×3 convolutional kernels with a frequency ratio; a frequency domain enhancement and reconstruction submodule, which uses a learnable inverse wavelet synthesis operator to remap each frequency subband after frequency enhancement back to the spatial domain and performs feature fusion to obtain the reconstruction results of each frequency subband after frequency domain enhancement, and splices all enhanced subbands along the channel dimension to obtain frequency domain features; and a frequency domain reliability assessment module, which constructs a frequency domain energy amplitude map based on the frequency domain features, performs convolutional encoding on the frequency domain features and the frequency domain energy amplitude map respectively and fuses them to obtain a pixel-level reliability map, and performs average pooling on the pixel-level reliability map to obtain a frequency domain reliability score.
[0008] In one embodiment of the present invention, the sub-band-level frequency domain gated modulation module performs global average pooling on each frequency sub-band output by the frequency domain decomposition sub-module through a global average pooling layer to extract the channel-level frequency response. Then, it generates the gate weights of each sub-band through two fully connected layers and a nonlinear activation function: the gate weights of each sub-band are extended to the spatial dimension and loaded onto the corresponding sub-band in the form of channel-by-channel multiplication to obtain each frequency sub-band after frequency domain gated modulation.
[0009] In one embodiment of the present invention, the loss function of the frequency-aware modulation module includes a gating regularization term and an energy constraint term; wherein, the energy constraint term is obtained by calculating the sum of the minimum input image energy and the frequency domain sub-band energy for anterior segment photography, and by calculating the difference between the minimum input image energy and the sum of the frequency domain sub-band energy.
[0010] In one embodiment of the present invention, the topology-aware module includes: a grayscale processing submodule for performing grayscale processing on the input anterior segment photograph to obtain a grayscale image; a multi-scale filtering submodule for introducing multiple learnable smoothing scale operators to perform multi-scale filtering on the grayscale image; a local difference response calculation submodule for estimating the background intensity at each scale of the multi-scale filtered image using local means and calculating the local difference response; a gated activation submodule for applying a smooth nonlinear mapping to the local difference response and introducing learnable threshold parameters for gated activation to obtain a multi-scale structural response; a normalization submodule for introducing learnable scale weight parameters for normalization using softmax to fuse the multi-scale structural responses into a unified topology response score; a topology saliency representation submodule for flattening the topology response score into a vector and compressing it into a compact topology vector through linear projection; and a modeling submodule for modeling the compact topology vector using a Mamba encoder to obtain topology embedding features; wherein the Mamba encoder employs a zigzag scanning scheme. In one embodiment of the present invention, the computer is used to perform frequency domain conversion, frequency identification, noise filtering, and inverse transformation reconstruction on the fluorescence signal using a frequency identification and reconstruction algorithm based on Fourier transform to obtain a high signal-to-noise ratio NIR-II fluorescence image.
[0011] In one embodiment of the present invention, the loss function of the topology-aware module includes: a loss term for constraining the sparsity of the persistent graph and an energy regularization term for the topological features.
[0012] In one embodiment of the present invention, the confidence-aware topology and frequency fusion module includes: a cross-modal alignment submodule, used to perform bidirectional alignment based on a bidirectional cross-attention mechanism, according to the input topology embedding features and frequency domain features, concatenating the bidirectional alignment result of the topology embedding features and frequency domain features with the input topology embedding features and frequency domain features, and obtaining the aligned representation of the topology embedding features and frequency domain features through linear mapping; a modal self-stabilizing confidence estimation submodule, used to input the topology embedding features and frequency domain features into a lightweight MLP to obtain the corresponding modal self-stabilizing confidence; and a confidence modulation submodule, used to project the aligned representation of the topology embedding features and frequency domain features onto a unified... The system employs a three-dimensional approach: a topological embedding and an aligned frequency domain reference representation are obtained; based on the topological embedding features, the aligned frequency domain features, the reference representation, and the modal self-stabilization confidence, the system obtains the confidence-modulated topological embedding features and frequency domain features; a consistency-aware gating submodule is used to construct gating coefficients based on the consistency of the topological embedding and the aligned frequency domain reference representation, and to fuse the confidence-modulated topological embedding features and frequency domain features to obtain a fused representation; a classification submodule is used to input the topological embedding features, frequency domain features, and fused representation into three independent classifiers to obtain a first classification result, a second classification result, and a third classification result, and to normalize them using softmax to obtain a first probability distribution, a second probability distribution, and a third probability distribution; and a reliability-aware voting submodule is used to perform reliability-aware voting based on the first probability distribution, the second probability distribution, and the third probability distribution, combined with the frequency domain reliability score and the topological response score, to obtain the corresponding corneal disease diagnosis result.
[0013] In one embodiment of the present invention, the loss function of the confidence-aware topology and frequency fusion module is calculated by simultaneously applying cross-entropy supervision to the three classification branches of topology, frequency domain and fusion representation, which are respectively the loss of the topology embedding feature branch, the loss of the frequency domain feature branch and the loss of the fusion representation branch. The weight of each branch loss is dynamically adjusted by the DWA strategy, and then the loss of each branch is weighted and calculated to obtain the loss function.
[0014] To achieve the above and other related objectives, this invention provides a corneal disease diagnosis method based on anterior segment photography. The method includes: acquiring anterior segment photography; inputting the anterior segment photography into a corneal disease diagnosis model based on the fusion of learnable wavelet and Morse topological features of the anterior segment photography to obtain a corneal disease diagnosis result; the corneal disease diagnosis model includes: a frequency-aware modulation module, a topology-aware module, and a confidence-aware topology and frequency fusion module; wherein, the frequency-aware modulation module is used to perform learnable frequency domain decomposition and sub-band level modulation on the input anterior segment photography to obtain frequency domain features and frequency domain reliability scores; the topology-aware module is used to globally model the long-range dependencies between the topological responses of the input anterior segment photography at different scales and locations to obtain topological embedding features and topological response scores; the confidence-aware topology and frequency fusion module is used to obtain the corresponding corneal disease diagnosis result by performing cross-modal alignment, confidence modulation, and consistency-aware gating based on frequency domain features and frequency domain reliability scores and topological embedding features and topological response scores through a bidirectional cross-attention mechanism.
[0015] To achieve the above and other related objectives, the present invention provides an electronic terminal, comprising: one or more memories and one or more processors; the one or more memories being used to store a computer program; and the one or more processors being connected to the memories and used to run the computer program to execute the corneal disease diagnosis system based on anterior segment photography.
[0016] As described above, this invention provides a corneal disease diagnostic system, method, and terminal based on anterior segment photography, offering the following advantages: This invention utilizes acquired anterior segment photographs, inputting them into a corneal disease diagnostic model based on the fusion of learnable wavelet and Morse topological features to obtain diagnostic results. In the model, a frequency-aware modulation module performs learnable frequency domain decomposition and sub-band modulation on the input image, deriving frequency domain features and reliability scores; a topology-aware module globally models the long-range dependencies of topological responses at different scales and locations of the image, obtaining topological embedding features and response scores. A confidence-aware topology and frequency fusion module uses a bidirectional cross-attention mechanism to align, modulate, and perceive consistency across modalities, yielding diagnostic results. This invention introduces Morse theory modeling into the topological structure branch, constructing stable corneal morphological representations at multiple scales, and efficiently models long-range dependencies using the Mamba model; the frequency domain representation branch highlights discriminative frequency components, suppresses interference, and improves the stability of texture features. Furthermore, a fusion mechanism is designed to achieve adaptive correction and complementarity of heterogeneous features, and a reliability voting strategy is introduced to improve the robustness and credibility of the diagnostic results. Attached Figure Description
[0017] Figure 1The diagram shown is a schematic representation of a corneal disease diagnostic system based on anterior segment photography according to an embodiment of the present invention.
[0018] Figure 2 The diagram shown is a structural schematic of a frequency sensing modulation module according to an embodiment of the present invention.
[0019] Figure 3 The diagram shown is a structural schematic of a topology sensing module according to an embodiment of the present invention.
[0020] Figure 4 The diagram shown is a schematic representation of the overall framework of a corneal disease diagnostic model according to an embodiment of the present invention.
[0021] Figure 5 (a) Shows the hyperparameter variation of the gate regularization term weights of the FMM loss function in one embodiment of the present invention.
[0022] Figure 5 (b) Shows the hyperparameter variation of the weights of the energy constraint term in the FMM loss function according to an embodiment of the present invention.
[0023] Figure 5 (c) Shows a graph of the hyperparameter changes of the weights of the sparsity term used to constrain the persistence graph in the TMM loss function of an embodiment of the present invention.
[0024] Figure 5 (d) shows the hyperparameter variation of the weight of the energy regularization term of the TMM loss function in one embodiment of the present invention.
[0025] Figure 6 The chart shown is a comparison of the performance test results of various modules on a public dataset in one embodiment of the present invention.
[0026] Figure 7 The diagram shows a one-way ANOVA of FMM, TMM, and CTFFM in one embodiment of the present invention.
[0027] Figure 8 The graph shows the t-test analysis of FMM, TMM, and CTFFM in one embodiment of the present invention.
[0028] Figure 9 The diagram shown is a flowchart illustrating a corneal disease diagnosis method based on anterior segment photography according to an embodiment of the present invention.
[0029] Figure 10 The diagram shown is a structural schematic of an electronic terminal according to an embodiment of the present invention. Detailed Implementation
[0030] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0031] It should be noted that in the following description, reference is made to the accompanying drawings, which illustrate several embodiments of the invention. It should be understood that other embodiments may also be used, and changes in mechanical composition, structure, electrical system, and operation may be made without departing from the spirit and scope of the invention. The following detailed description should not be considered limiting, and the scope of the embodiments of the invention is defined only by the claims of the published patents. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. Spatially related terms, such as “upper,” “lower,” “left,” “right,” “below,” “below,” “lower part,” “above,” “upper part,” etc., may be used herein to illustrate the relationship between one element or feature shown in the figures and another element or feature.
[0032] Throughout this specification, when it is said that a part is "connected" to another part, this includes not only "direct connection" but also "indirect connection" by placing other elements in between. Furthermore, when it is said that a part "includes" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather means that other constituent elements may also be included.
[0033] The terms "first," "second," and "third," etc., used herein are for the purpose of describing various parts, components, regions, layers, and / or segments, but are not limiting. These terms are used only to distinguish one part, component, region, layer, or segment from others. Therefore, the "first part," "component," "region," "layer," or "segment" described below may refer to a "second part," "component," "region," "layer," or "segment" without departing from the scope of this invention.
[0034] Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, operation, element, component, item, kind, and / or group, but do not preclude the presence, occurrence, or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition arise only when combinations of elements, functions, or operations are inherently mutually exclusive in some manner.
[0035] This invention provides a corneal disease diagnostic system based on anterior segment photography. The system uses acquired anterior segment photographs as input into a corneal disease diagnostic model based on the fusion of learnable wavelet and Morse topological features to obtain diagnostic results. In the model, a frequency-aware modulation module performs learnable frequency domain decomposition and sub-band modulation on the input image to obtain frequency domain features and a reliability score. A topology-aware module globally models the long-range dependencies of the topological response at different scales and locations of the image, obtaining topological embedding features and response scores. A confidence-aware topology and frequency fusion module uses a bidirectional cross-attention mechanism to align, modulate, and perceive consistency across modalities to obtain diagnostic results. This invention introduces Morse theory modeling into the topological structure branch to construct stable corneal morphological representations at multiple scales, and combines it with the Mamba model to efficiently model long-range dependencies. The frequency domain representation branch highlights discriminative frequency components, suppresses interference, and improves the stability of texture features. Furthermore, a fusion mechanism is designed to achieve adaptive correction and complementarity of heterogeneous features, and a reliability voting strategy is introduced to improve the robustness and credibility of the diagnostic results.
[0036] The present invention will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can readily implement it. The present invention can be embodied in many different forms and is not limited to the embodiments described herein.
[0037] like Figure 1 This diagram illustrates the structure of a corneal disease diagnostic system based on anterior segment photography, as described in an embodiment of the present invention.
[0038] The system includes:
[0039] Image acquisition module 1 is used to capture images of the anterior segment;
[0040] Corneal disease diagnosis module 2 is used to input anterior segment photographs into a corneal disease diagnosis model based on the fusion of learnable wavelet and Morse topological features from anterior segment photographs to obtain corneal disease diagnosis results;
[0041] The corneal disease diagnostic model includes: a frequency-sensing modulation module, a topology-sensing module, and a confidence-sensing topology and frequency fusion module;
[0042] The frequency-aware modulation module is used to perform learnable frequency domain decomposition and sub-band level modulation on the input anterior segment photograph to obtain frequency domain features and frequency domain reliability score.
[0043] The topology-aware module is used to globally model the long-range dependencies between the topological responses of the input anterior segment photograph at different scales and locations to obtain topological embedding features and topological response scores.
[0044] The confidence-aware topology and frequency fusion module is used to obtain the corresponding corneal disease diagnosis results by performing cross-modal alignment, confidence modulation and consistency-aware gating based on frequency domain features, frequency domain reliability scores and topology embedding features and topology response scores through a bidirectional cross-attention mechanism.
[0045] In one embodiment, the core image changes caused by corneal diseases are manifested as dual alterations in frequency distribution characteristics and texture statistics. For example, typical lesions such as corneal opacity, edema, and scarring are usually accompanied by fine-grained changes such as reduced local texture contrast, high-frequency energy attenuation, or abnormal scattering enhancement. These subtle differences are difficult to fully characterize in traditional spatial domain features, but have a more direct and stable representation in the frequency domain. To address this, this solution designs a Frequency-aware Modulation Module (FMM) to explicitly model and adaptively modulate frequency components highly correlated with corneal diseases, thereby enhancing discriminative frequency domain information.
[0046] The Frequency Module (FMM) achieves precise optimization of frequency domain features through five core sub-modules: learnable frequency domain decomposition, subband-level modulation, multi-scale frequency domain enhancement, frequency domain reconstruction, and reliability assessment. Its overall structure is shown in Figure 2, and the detailed design of each sub-module is as follows:
[0047] The frequency domain decomposition submodule is used to perform frequency domain decomposition on the input anterior segment photograph using a learnable Haar wavelet analysis operator, resulting in four complementary frequency sub-bands; the specific process is as follows:
[0048] Given input, anterior segment photography First, a learnable Haar wavelet analysis operator is used to perform frequency domain decomposition on the input, resulting in four complementary frequency sub-bands:
[0049] ; (Formula 1)
[0050] in, Characterizing low-frequency components, primarily depicting the overall brightness distribution and coarse structure of the cornea; and These correspond to mid-frequency texture changes in different directions; This characterizes high-frequency details and local texture anomalies. The wavelet analysis operator is implemented through grouped convolutions with a stride of 2, where each channel independently uses four 2×2 filter kernels to generate the corresponding frequency subband. All filter kernels are initialized with standard Haar wavelet coefficients and updated as learnable parameters during training, thus enabling the frequency domain decomposition process to adaptively fit the actual spectral distribution of the corneal image.
[0051] To further highlight the discriminative channel responses in different frequency sub-bands, the FMM analyzes each frequency sub-band. A separate sub-band level frequency domain gating module is introduced to adaptively recalibrate the original sub-band response before frequency domain enhancement.
[0052] The sub-band-level frequency domain gated modulation submodule is used to perform adaptive weight calibration based on each frequency sub-band, obtain the gate weight of each sub-band, and load the gate weight of the extended spatial dimension onto the corresponding frequency sub-band to obtain each frequency sub-band after frequency domain gated modulation; the specific process is as follows:
[0053] First, perform global average pooling on each subband to extract the channel-level frequency response:
[0054] ; (Formula 2)
[0055] in, This represents global average pooling. Subsequently, channel weights are generated using a gating function consisting of two fully connected layers and a non-linear activation function.
[0056] ; (Formula 3)
[0057] in, and Let represent the ReLU and Sigmoid activation functions, respectively. The resulting gating weights... It is extended to the spatial dimension and loaded onto the corresponding subband features in the form of channel-by-channel multiplication:
[0058] ; (Formula 4)
[0059] in, This indicates a channel-by-channel multiplication operation. This represents the sub-band characteristics after frequency-domain gated modulation, which serves as the input for subsequent sub-band-level multi-scale frequency-domain enhancement modules.
[0060] By introducing this gating mechanism before frequency domain enhancement, FMM can explicitly suppress frequency channels that are irrelevant to the disease or dominated by noise within the subband, while enhancing the frequency response that is highly correlated with corneal lesions, thereby providing a more discriminative frequency domain representation for subsequent multi-scale modeling.
[0061] To avoid excessive biasing of gating weights on a few frequency channels during training, this invention introduces lightweight regularization constraints on the gating weights of all sub-bands:
[0062] ; (Formula 5)
[0063] This constraint serves as an auxiliary regularization term to improve the stability and generalization capability of the frequency domain modulation process.
[0064] The sub-band-level multi-scale frequency domain enhancement submodule addresses the heterogeneous frequency degradation patterns that corneal diseases may exhibit at different spatial scales. This submodule configures a multi-scale dilated convolutional pyramid for each modulated sub-band to achieve multi-scale enhancement of frequency domain features. The multi-scale dilated convolutional pyramid contains four parallel branches: 1×1 convolution, 3×3 convolution (dilation rate 1), 3×3 convolution (dilation rate 2), and 3×3 convolution (dilation rate 4). By capturing local texture anomalies and global frequency distribution degradation features in parallel, it significantly improves the multi-scale expressive power of frequency domain features.
[0065] The frequency domain enhancement and reconstruction submodule is used to employ a learnable inverse wavelet synthesis operator. Each frequency sub-band after frequency enhancement is remapped back to the spatial domain through a 1×1 convolution, and feature fusion is performed to obtain the reconstructed result of each frequency sub-band after frequency domain enhancement. All enhanced sub-bands are then concatenated along the channel dimension to obtain the frequency domain features. ;
[0066] Common issues in anterior segment photography, such as reflections, uneven illumination, and occlusion, can lead to abnormal local spectral responses, significantly reducing the reliability of frequency domain features in some spatial regions. Directly modeling the frequency domain features of all spatial locations identically can easily introduce noise interference, weakening the discriminative ability. The Frequency Memory Model (FMM) further introduces a frequency domain reliability estimation mechanism to assess the credibility of frequency domain information in different spatial regions. The frequency domain reliability assessment module constructs a frequency domain energy amplitude map based on the frequency domain features. It then performs convolutional encoding on both the frequency domain features and the frequency domain energy amplitude map, fusing them to obtain a pixel-level reliability map. Finally, it performs average pooling on the pixel-level reliability map to obtain a frequency domain reliability score. The specific process is as follows:
[0067] First, construct the frequency domain energy amplitude diagram:
[0068] ; (Formula 6)
[0069] in, For numerically stable terms, This represents the frequency domain characteristics of the c-th channel. Subsequently, [the following is discussed]... and Convolutional encoding and fusion are performed to obtain a pixel-level reliability map. :
[0070] ; (Formula 7)
[0071] in, This represents a nonlinear mapping consisting of convolution and ReLU. The value is Sigmoid. Further, average pooling is performed on the pixel-level reliability map to obtain a patch-level frequency domain reliability score:
[0072] ; (Formula 8)
[0073] in, This indicates the patch size (e.g., set to 16). This score is used to characterize the overall reliability of frequency domain information in different spatial regions and serves as the confidence weight for the frequency domain branch in the subsequent cross-branch fusion stage.
[0074] In one embodiment, to prevent excessive amplification or suppression of specific frequency components during the frequency domain modulation process and to maintain the physical rationality of the overall spectral structure, the FMM introduces frequency domain energy consistency constraints during the training phase. (Input image) The minimum input image energy is:
[0075] ; (Formula 9)
[0076] Where H and W are the height and width of the original image. , and This represents the pixel index in the three dimensions of channel, row, and column. The sum of the energies of all sub-bands in the frequency domain is:
[0077] ; (Formula 10)
[0078] Where C represents the number of channels, H / 2 and W / 2 are the spatial dimensions of the wavelet subbands, and b represents the subband index. The frequency domain modulation process is constrained by minimizing the difference between the input image energy and the sum of the frequency domain subband energies.
[0079] ; (Formula 11)
[0080] This constraint, as a weak regularization term, helps maintain the stability of the overall spectral energy distribution, thereby improving the robustness and generalization ability of frequency domain feature learning.
[0081] Based on the above design, a weighted summation method is adopted to combine the gating regularization term with the energy constraint term. The frequency domain branch adopts the overall optimization objective of the frequency domain branch during the training phase:
[0082] ; (Formula 12)
[0083] in, Indicates the gating regularization term. Indicates energy constraint. and These are the weighting coefficients (set to 0.08 and 0.10 respectively).
[0084] In one embodiment, in anterior segment imaging, the pathological changes of corneal diseases are not only reflected in local texture and frequency distribution, but also accompanied by fundamental morphological structure and spatial organization pattern reshaping. For example, there is enhanced or disrupted connectivity in the lesion area, irregular boundary morphology, and the disappearance and reconstruction of ring / sheet structures. These changes represent topological modifications of image intensity, and compared to traditional texture features, they are more robust to local noise disturbances and changes in imaging conditions. Based on this observation, this solution designs a Topology-aware Morse–Mamba Module (TMM) to perform structural modeling of anterior segment images from a topological perspective. This module draws on the core ideas of Morse theory, constructs continuous topological response representations in a differentiable manner, and combines a state-space model (Mamba) to achieve global modeling of the topological structure. Finally, it outputs compact, stable, and highly discriminative topological embedding features, providing crucial complementary structural information for subsequent multi-branch feature fusion.
[0085] TMM (Transform-Modal Model) completes the transformation from image to topological features through grayscale processing, multi-scale filtering, local difference response calculation, gated activation, normalization, topological saliency representation, and global modeling. For example... Figure 3 The detailed design of each submodule is as follows:
[0086] The grayscale processing submodule is used to perform grayscale processing on the input anterior segment photograph to obtain a grayscale image; given an anterior segment image... The input image is converted to grayscale to eliminate color redundancy, which is defined as:
[0087] ; (Formula 13)
[0088] in, Indicates the input image at the th Responses on each channel.
[0089] The multi-scale filtering submodule is used to introduce multiple learnable smoothing scale operators to perform multi-scale filtering on grayscale images. To characterize structural changes at different spatial scales, S learnable smoothing scale operators are introduced to perform multi-scale filtering on grayscale images.
[0090] ; (Formula 14)
[0091] in, This indicates that the learnable smoothing kernel at the s-th scale is implemented by the convolution operator. This represents the convolution operation. This multi-scale representation is used to simulate morphological and structural changes at different spatial resolutions.
[0092] The local differential response calculation submodule is used to estimate the background intensity at each scale of the multi-scale filtered image using local means, and then calculate the local differential response. At each scale, the background intensity is estimated using local means, and then the local differential response is calculated, achieving a continuous approximation of the Morse-type critical structure. The specific process is as follows:
[0093] Background intensity is estimated at each scale using local means, and local difference responses are calculated:
[0094] , ; (Formula 15)
[0095] in, This indicates 3×3 average pooling. Difference term used to approximate local background intensity It can produce significant responses at lesion boundaries, intensity mutation regions, and near local peaks and valleys, thus forming a continuous approximation of the Morse-type critical structure.
[0096] The gated activation submodule is used to apply a smooth nonlinear mapping to the local difference response, introduce a learnable threshold parameter for gated activation, and obtain the multi-scale structural response. The specific steps are as follows:
[0097] Applying a smooth nonlinear mapping to the differential response enhances gradient stability and suppresses outlier magnitudes.
[0098] ; (Formula 16)
[0099] Furthermore, a learnable threshold parameter is introduced. Gated activation mechanism to achieve topological saliency:
[0100] ; (Formula 17)
[0101] in, Control the activation intensity of topological significance, and retain only the regional responses with significant structural abrupt changes.
[0102] The normalization submodule is used to introduce learnable scale weight parameters and normalize them using softmax, fusing multi-scale structural responses into a unified Morse topological response intensity; the specific process includes:
[0103] To adaptively model the importance of topological information at different scales, learnable scale weight parameters are introduced. And normalization is performed using softmax:
[0104] ; (Formula 18)
[0105] Multiscale structural responses are fused into a unified topological response score. :
[0106] ; (Formula 19)
[0107] in, It describes the topological saliency distribution of images in the spatial dimension and can be regarded as a dense Morse topological response map to characterize disease-related structural abnormality regions.
[0108] The topological saliency representation submodule is used to flatten the topological response scores into vectors and compress them into compact topological vectors through linear projection, eliminating inter-sample amplitude differences. The specific process includes:
[0109] To eliminate amplitude differences between samples Flattened into a vector And it is compressed into a compact topological vector through linear projection as a representation of topological saliency:
[0110] ; (Formula 20)
[0111] in, and These represent the dimensionality reduction weights and bias parameters, respectively. For topological feature dimensions.
[0112] The modeling submodule is used to model compact topological vectors using the Mamba encoder to obtain topological embedding features. The specific process includes:
[0113] To further capture global structural dependencies in topological embeddings, a Mamba encoder is introduced. Modeling:
[0114] ; (Formula 21)
[0115] in, The state-space encoder uses a zigzag scanning scheme. The resulting topology-aware feature representation is used for subsequent classification and multi-branch feature fusion.
[0116] In one embodiment, the topology sensing module is optimized using the following joint loss function during the overall training process:
[0117] ; (Formula 22)
[0118] in, This is used to constrain the sparsity of the persistence graph, allowing the model to focus on key structural regions relevant to the disease. This is the energy regularization term for topological features, used to improve training stability; and The corresponding weighting coefficients are 0.06 and 0.15, respectively.
[0119] In one embodiment, in corneal disease diagnosis, different pathological types often present complementary and unstable characterization cues in images: frequency domain features can effectively characterize corneal texture, opacity, and scattering patterns, while topological features focus more on capturing the structural organization, connectivity, and morphological changes of the lesion area. However, affected by factors such as differences in image quality, fluctuations in lesion significance, and local interference, the reliability of these two types of feature cues varies significantly with sample characteristics. To achieve efficient fusion of discriminative features from each branch, this invention proposes a Confidence-Aware Topology-Frequency Fusion Module (CTFFM). Under the premise of freezing the pre-trained frequency domain and topological branch parameters, cross-modal alignment, confidence modulation, and consistency-aware gating are performed to obtain the corresponding corneal disease diagnosis results.
[0120] CTFFM structure as follows Figure 4 As shown, during the fusion stage, the two pre-trained branches only participate in forward inference as feature extractors. Given an input image, the topology branch outputs its topological embedding features. It generates a sample-level topological response score P, and outputs frequency domain features via a frequency domain branch. It also provides a frequency domain reliability score S. Since topological embedding and frequency domain embedding originate from heterogeneous feature spaces, their statistical distribution and semantic focus are significantly different. Direct splicing can easily introduce cross-modal misalignment and information conflict.
[0121] The confidence-aware topology and frequency fusion module specifically includes the following five sub-modules:
[0122] The cross-modal alignment submodule is used to perform bidirectional alignment of the input topological embedding features and frequency domain features based on a bidirectional cross-attention mechanism. It concatenates the bidirectional alignment result of the topological embedding features and frequency domain features with the input topological embedding features and frequency domain features, and obtains the aligned representation of the topological embedding features and frequency domain features through linear mapping. The specific process includes:
[0123] A bidirectional cross-attention mechanism is introduced to explicitly model the interdependence between the two modalities. The corresponding attention calculation is defined as follows:
[0124] , ; (Formula 23)
[0125] Subsequently, the bidirectional alignment result is concatenated with the original two-branch features, and a cross-modal alignment representation is obtained through linear mapping:
[0126] ; (Formula 24)
[0127] in, This represents the ReLU activation function. This step explicitly establishes the connection between the frequency domain and topological cues in the representation layer, laying the foundation for subsequent fusion.
[0128] The modal self-stabilizing confidence estimation submodule is used to input topological embedding features and frequency domain features into a lightweight MLP to obtain the corresponding modal self-stabilizing confidence. This submodule uses a lightweight multilayer perceptron (MLP) to quantitatively evaluate the reliability of the topological embedding features and frequency domain features, and inputs... and Then, output the corresponding modal self-stability confidence score. and The higher the confidence score, the stronger the reliability of the corresponding modal feature.
[0129] Although cross-attention achieves alignment, the reliability of different modal cues still dynamically changes with samples and the training phase in actual anterior segment photography. For example, frequency domain features are susceptible to exposure, reflection, and scattering, while topological features may degrade due to occlusion or localized highlighting. If fusion is performed indiscriminately, noisy modalities may mislead the final decision. To address this, this invention introduces a physically inspired credibility modulation submodule into the alignment representation for post-processing reliability correction of the fusion result.
[0130] The confidence modulation submodule projects the aligned representations of topological embedding features and frequency domain features onto a unified dimension to obtain the topological embedding and aligned frequency domain reference representations. Based on the aligned representations, reference representations, and modal self-stabilization confidence of the topological embedding features and frequency domain features, the confidence-modulated topological embedding features and frequency domain features are obtained. The specific process includes:
[0131] First, the features from both branches are projected onto a unified dimension as a reference representation:
[0132] , ; (Formula 25)
[0133] Subsequently, a lightweight MLP is used to estimate the modal self-stabilization confidence from the reference features. and And calculate the cosine correlation between the alignment representation and the reference feature.
[0134] Credibility modulation corrects the alignment representation through the residual direction:
[0135] ; (Formula 26)
[0136] Where m represents the topological branch t or the frequency domain branch f, and the modulation intensity It is smoothly enabled with each training epoch, thus avoiding the introduction of unstable disturbances before the model has converged.
[0137] The consistency-aware gating submodule is used to construct gating coefficients based on the consistency of topological embedding and the reference representation aligned to the frequency domain, and to obtain a fused representation by fusing the topological embedding features and frequency domain features after confidence modulation; the specific process includes:
[0138] After completing the credibility modulation, the contributions of the two modalities are further adaptively balanced at the sample level. Specifically, gating coefficients are constructed based on the consistency of the two-modal reference features:
[0139] ; (Formula 27)
[0140] in, This is the Sigmoid function. When the consistency between the two modes is high, the gating mechanism tends to reinforce the more consistent and reliable representation; when the consistency is low, it automatically balances and suppresses potentially conflicting modes. The final fused representation is defined as:
[0141] ; (Formula 28)
[0142] The classification submodule is used to input the topological embedding features, frequency domain features, and fused representations into three independent classifiers to obtain a first classification result, a second classification result, and a third classification result, and then normalize them using softmax to obtain a first probability distribution, a second probability distribution, and a third probability distribution, respectively; Specific process:
[0143] This submodule embeds topology features. Frequency domain characteristics The fused representation Z is input into three independent classifiers to obtain the first classification result. Second classification results and the third classification results Then, normalization is performed using the Softmax function to obtain the corresponding probability distribution:
[0144] , , ; (Formula 29)
[0145] The reliability-aware voting submodule is used to determine the voting results based on the first probability distribution. Second probability distribution and the third probability distribution The reliability perception voting is then combined with the frequency domain reliability score S and the topology response score P to obtain the corresponding corneal disease diagnosis results.
[0146] This submodule combines the three probability distributions with sample-level confidence scores (topological response score P and frequency domain reliability score S) in a weighted combination to obtain the final diagnostic result, thereby improving the model's decision robustness under complex imaging conditions and heterogeneous disease representations. The reliability-aware voting probability is defined as:
[0147] ; (Formula 30)
[0148] The final predicted label is The voting result does not correspond to an additional classifier, but is a derived prediction result obtained by weighting the frequency domain, topology, and fusion discriminant in the probability space. Its role is to improve the model's decision robustness under complex imaging conditions and heterogeneous disease representations.
[0149] In one embodiment, throughout the training phase, this paper applies cross-entropy supervision to all three classification branches simultaneously and uses Dynamic Weight Averaging (DWA) to dynamically adjust the loss weights, thereby maintaining a balance among the three discriminative capabilities and preventing the fusion head or a single branch from dominating the optimization in the long term. The cross-entropy supervision applied to the three classification branches simultaneously includes: topological embedding feature branch loss... Frequency domain feature branch loss and fusion characterization branch loss Considering the differences in convergence speed among different heads, we employ Dynamic Weight Averaging (DWA) to dynamically adjust the loss weights. The final total loss is:
[0150] ; (Formula 31)
[0151] in, , , The weighting coefficients are dynamically generated for the DWA strategy.
[0152] This invention proposes a low-cost anterior segment imaging-based method for diagnosing corneal diseases, based on two complementary dimensions: corneal topological features and texture frequency features. This method aims to achieve accurate and stable identification of corneal diseases. Regarding topological feature modeling, this invention designs a Topology-aware Morse-Mamba Module (TMM). This module introduces Morse theory in a multi-scale manner to perform topological analysis on the grayscale field in corneal images, constructing a continuous and stable topological response representation to characterize the overall morphological changes and tissue stability disruptions exhibited by the cornea in disease states. The TMM, combined with Mamba, performs structural modeling, globally modeling the long-range dependencies between topological responses at different scales and locations. This yields consistent and discriminative topological embedding features and simultaneously generates confidence information related to the topological response, providing a reliable basis for subsequent feature fusion and diagnostic decisions. Regarding frequency domain feature modeling, this invention designs a Frequency-aware Modulation Module (FMM). This module employs a learnable frequency domain decomposition method to perform multi-subband modeling and reconstructing of anterior segment imaging images, thereby highlighting discriminative frequency components closely related to corneal diseases, effectively suppressing frequency information irrelevant to diagnosis or redundant information, and enhancing the representation ability of abnormal corneal texture distribution. Furthermore, to better fuse frequency and topological features, this invention proposes a Confidence-aware Topology–Frequency Fusion Module (CTFFM) as the core unit for joint modeling of multi-source features. CTFFM achieves precise alignment and deep interaction between topological features and frequency domain features at the spatial and semantic levels through a bidirectional cross-attention mechanism. Combined with a confidence-based modulation strategy, it adaptively weights and corrects the fused features to improve the reliability and robustness of the fusion results. Finally, a decision-level reliability voting mechanism is used to comprehensively determine the multi-branch outputs, and an end-to-end joint optimization strategy is employed to train the overall network, thereby achieving reliable diagnosis of corneal diseases based on low-cost anterior segment imaging.
[0153] Experimental validation on public corneal disease datasets and private clinical datasets showed ACC of 84.1% and 90.4% respectively, indicating that the present invention can achieve accurate, stable and clinically practical intelligent diagnosis of corneal diseases under low-cost anterior segment photography conditions. It has good generalization ability and application prospects, and can provide an efficient and low-cost technical solution for large-scale screening of corneal diseases and primary healthcare scenarios.
[0154] This invention is implemented on a PyTorch-based computing platform, running on a system equipped with an RTX 4090 GPU and 24GB of memory. A series of experiments were conducted on two datasets: corneal ulcer and private clinical datasets. All experiments were evaluated using a 5-fold cross-validation strategy to fully utilize the limited sample size and improve the stability and reliability of the experimental results. Horizontal flipping was used for data augmentation on both datasets, and the network architecture was trained using mini-batch standardized means and standard deviations.
[0155] The specific experiments are as follows: A series of experiments were conducted on a public corneal ulcer dataset and a private clinical dataset. On the corneal ulcer dataset, the batch size for the frequency domain branch was set to 4, the training epochs were 500, and the initial learning rate was 0.03; the batch size for the topology branch was 4, the training epochs were 600, and the learning rate was 0.05; the batch size for the fusion branch was also 4, the training epochs were 1000, and the learning rate was 0.002. On the private clinical dataset, due to the limited sample size, the training parameters were adjusted accordingly. The batch size for the frequency domain branch was set to 2, the training epochs were 700, and the learning rate was 0.05; the batch size for the topology branch was 2, the training epochs were 800, and the learning rate was 0.08; the batch size for the fusion branch was 2, the training epochs were 1200, and the learning rate was 0.005.
[0156] Figure 5 shows the hyperparameter changes of the loss weights for FMM and TMM. Each hyperparameter has an optimal value range; excessively strong or weak constraints will lead to a decrease in model performance. This indicates that fine-tuning of hyperparameters can effectively improve the diagnostic accuracy and stability of the model under low-cost anterior segment imaging conditions, providing a reliable basis for parameter optimization in clinical applications. This invention adopts a multi-dimensional evaluation strategy to quantitatively analyze the model from aspects such as overall classification performance and model difference. Specifically, five commonly used classification indicators are selected to evaluate the model: accuracy (Accuracy, Acc), sensitivity (Sensitivity, SE), specificity (Specificity, SP), precision (Precision, PR), and F1 score (F1-score). Furthermore, to verify the statistical significance of performance differences between different methods, statistical significance analysis is introduced. Figure 6 shows the system's validation of the gain effect of each key module on the performance of the corneal disease diagnostic model after gradually introducing FMM, TMM, and CTFFM. The baseline, without any modules, exhibits the lowest performance across all metrics (ACC 62.9±3.5%). With the sequential addition of FMM and TMM, the model's ability to integrate multi-source features and model topological information gradually improves, leading to continuous performance enhancement. Further introduction of CTFFM significantly improves robustness under complex imaging conditions through a reliability-aware voting mechanism. Ultimately, the proposed CFLWMT-Net achieves optimal performance across all evaluation metrics, with an accuracy (ACC) of 84.1±4.6%, precision (PR) of 87.5±5.7%, recall (SE) of 82.8±8.1%, specificity (SP) of 91.0±2.6%, and an F1 score of 84.2±6.7%. This demonstrates the effectiveness of the synergistic effect of each module and provides a high-performance, highly robust technical solution for intelligent diagnosis of corneal diseases under low-cost anterior segment imaging conditions.
[0157] Figures 7 and 8 show the one-way ANOVA and t-test analysis of FMM, TMM, and CTFFM, respectively. The introduction of the FMM and TMM modules significantly improved the model's diagnostic performance; all p-values were less than 0.05. This indicates that CTFFM, through its reliability voting mechanism integrating frequency domain and topology awareness, significantly outperformed either the FMM or TMM modules individually in terms of diagnostic accuracy, precision, and recall, providing core support for a comprehensive improvement in model performance. Simultaneously, one-way ANOVA and t-tests were used to perform overall and paired comparisons of ablation experiments. This invention validates the effectiveness of the proposed method by visualizing the feature focus of different branches on corneal diseases. Under the synergistic effect of the frequency domain and topology branches, the network's focus on the texture features and overall morphological changes of corneal lesions is significantly enhanced. This enhanced feature response provides reliable support for the network's disease judgment, thereby significantly improving the accuracy and robustness of corneal disease diagnosis and facilitating efficient and intelligent screening under low-cost anterior segment imaging conditions. In actual testing, the weights from the training process are retained. An anterior segment image is input, the retained pre-trained weights are loaded and input into the network, and the corresponding corneal disease diagnosis results can be obtained after running the network.
[0158] Similar to the above embodiments, the present invention provides a method for diagnosing corneal diseases based on anterior segment photography.
[0159] The following specific embodiments are provided in conjunction with the accompanying drawings:
[0160] like Figure 9 This document illustrates a flowchart of a corneal disease diagnosis method based on anterior segment photography, as described in an embodiment of the present invention. Applied to the corneal disease diagnosis system based on anterior segment photography described in the above embodiment, the method includes:
[0161] Step S1: Take an anterior segment photograph;
[0162] Step S2: Input the anterior segment photograph into the corneal disease diagnosis model based on the fusion of learnable wavelet and Morse topological features of the anterior segment photograph to obtain the corneal disease diagnosis result;
[0163] The corneal disease diagnostic model includes: a frequency-sensing modulation module, a topology-sensing module, and a confidence-sensing topology and frequency fusion module;
[0164] The frequency-aware modulation module is used to perform learnable frequency domain decomposition and sub-band level modulation on the input anterior segment photograph to obtain frequency domain features and frequency domain reliability score.
[0165] The topology-aware module is used to globally model the long-range dependencies between the topological responses of the input anterior segment photograph at different scales and locations to obtain topological embedding features and topological response scores.
[0166] The confidence-aware topology and frequency fusion module is used to obtain the corresponding corneal disease diagnosis results by performing cross-modal alignment, confidence modulation and consistency-aware gating based on frequency domain features, frequency domain reliability scores and topology embedding features and topology response scores through a bidirectional cross-attention mechanism.
[0167] Since the implementation principle of the corneal disease diagnosis method based on anterior segment photography has been described in the foregoing embodiments, it will not be repeated here.
[0168] The corneal disease diagnostic system based on anterior segment photography provided in this invention can be implemented on the terminal side or the server side. For the hardware structure of the electronic terminal, please refer to [link to relevant documentation]. Figure 10 This is a schematic diagram of an optional hardware structure of an electronic terminal 1000 provided in an embodiment of the present invention. The terminal 1000 can be a mobile phone, computer device, tablet device, personal digital processing device, factory back-end processing device, etc. The terminal 1000 includes: at least one processor 1001, a memory 1002, at least one network interface 10010, and a user interface 1009. The various components in the device are coupled together through a bus system 1005. It is understood that the bus system 1005 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 1005 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 10 All buses are labeled as bus systems.
[0169] The user interface 1009 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.
[0170] It is understood that memory 1002 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.
[0171] In this embodiment of the invention, the memory 1002 is used to store various types of data to support the operation of the terminal 1000. Examples of this data include: any executable program for operation on the terminal 1000, such as the operating system 10021 and application program 10022; the operating system 10021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 10022 may contain various applications, such as a media player, browser, etc., for implementing various application services. The corneal disease diagnosis system based on anterior segment photography provided in this embodiment of the invention can be included in the application program 10022.
[0172] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by the processor 1001. The processor 1001 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 1001 or by instructions in the form of software. The processor 1001 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 1001 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor 1001 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in a memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.
[0173] In an exemplary embodiment, the terminal 1000 may be used to execute the aforementioned method by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs).
[0174] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented using computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0175] In the embodiments provided in this application, the computer-readable and writable storage medium may include read-only memory, random access memory, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, flash memory, USB flash drive, portable hard drive, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Additionally, any connection may be appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. However, it should be understood that computer-readable and writable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are intended for non-transient, tangible storage media. The disks and optical discs used in the application include compact optical discs (CDs), laser optical discs, optical discs, digital multifunction optical discs (DVDs), floppy disks, and Blu-ray discs, where disks typically copy data magnetically, while optical discs use lasers to copy data optically.
[0176] In summary, the corneal disease diagnosis system, method, and terminal based on anterior segment photography of the present invention utilize acquired anterior segment photographs and input them into a corneal disease diagnosis model based on the fusion of learnable wavelet and Morse topological features to obtain diagnostic results. In the model, a frequency-aware modulation module performs learnable frequency domain decomposition and sub-band modulation on the input image to obtain frequency domain features and reliability scores; a topology-aware module globally models the long-range dependencies of topological responses at different scales and locations of the image to obtain topological embedding features and response scores. A confidence-aware topology and frequency fusion module uses a bidirectional cross-attention mechanism to align, modulate, and perceive consistency across modalities to obtain diagnostic results. This invention introduces Morse theory modeling into the topological structure branch to construct stable corneal morphological representations at multiple scales, and combines it with the Mamba model to efficiently model long-range dependencies; the frequency domain representation branch highlights discriminative frequency components, suppresses interference, and improves the stability of texture features. Furthermore, a fusion mechanism is designed to achieve adaptive correction and complementarity of heterogeneous features, and a reliability voting strategy is introduced to improve the robustness and credibility of the diagnostic results. Therefore, this invention effectively overcomes the various shortcomings of the prior art and has high industrial application value.
[0177] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A corneal disease diagnostic system based on anterior segment photography, characterized in that, The system includes: The image acquisition module is used to capture images of the anterior segment; The corneal disease diagnosis module is used to input anterior segment radiographs into a corneal disease diagnosis model based on the fusion of learnable wavelet and Morse topological features from the anterior segment radiographs to obtain corneal disease diagnosis results. The corneal disease diagnostic model includes: a frequency-sensing modulation module, a topology-sensing module, and a confidence-sensing topology and frequency fusion module; The frequency-aware modulation module is used to perform learnable frequency domain decomposition and sub-band level modulation on the input anterior segment photograph to obtain frequency domain features and frequency domain reliability score. The topology-aware module is used to globally model the long-range dependencies between the topological responses of the input anterior segment photograph at different scales and locations to obtain topological embedding features and topological response scores. The confidence-aware topology and frequency fusion module is used to obtain the corresponding corneal disease diagnosis results by performing cross-modal alignment, confidence modulation and consistency-aware gating based on frequency domain features, frequency domain reliability scores and topology embedding features and topology response scores through a bidirectional cross-attention mechanism.
2. The corneal disease diagnostic system based on anterior segment photography as described in claim 1, characterized in that, The frequency sensing modulation module includes: The frequency domain decomposition submodule is used to perform frequency domain decomposition on the input anterior segment photograph using a learnable Haar wavelet analysis operator to obtain four complementary frequency subbands; The sub-band-level frequency domain gated modulation sub-module is used to perform adaptive weight calibration based on each frequency sub-band, obtain the gate weight of each sub-band, and load the gate weight of the extended spatial dimension onto the corresponding frequency sub-band to obtain each frequency sub-band after frequency domain gated modulation. The sub-band level multi-scale frequency domain enhancement sub-module is used to enhance the frequency domain of each frequency sub-band after frequency domain gating modulation through a multi-scale dilated convolution pyramid; the multi-scale dilated convolution pyramid includes: four parallel branches with 3×3 convolution kernels using different dilation rates; The frequency domain enhancement and reconstruction submodule is used to remap each frequency subband after frequency enhancement back to the spatial domain using a learnable inverse wavelet synthesis operator and perform feature fusion to obtain the reconstruction results of each frequency subband after frequency domain enhancement. All enhanced subbands are spliced along the channel dimension to obtain frequency domain features. The frequency domain reliability assessment module is used to construct a frequency domain energy amplitude map based on frequency domain features. It performs convolutional encoding on the frequency domain features and the frequency domain energy amplitude map respectively and fuses them to obtain a pixel-level reliability map. It then performs average pooling on the pixel-level reliability map to obtain a frequency domain reliability score.
3. The corneal disease diagnostic system based on anterior segment photography as described in claim 1, characterized in that, The sub-band-level frequency domain gated modulation module performs global average pooling on each frequency sub-band output by the frequency domain decomposition sub-module through a global average pooling layer to extract the channel-level frequency response. Then, it generates the gate weights of each sub-band through two fully connected layers and a nonlinear activation function. The gate weights of each sub-band are extended to the spatial dimension and loaded onto the corresponding sub-band in the form of channel-by-channel multiplication to obtain each frequency sub-band after frequency domain gated modulation.
4. The corneal disease diagnostic system based on anterior segment photography as described in claim 3, characterized in that, The loss function of the frequency-aware modulation module includes a gated regularization term and an energy constraint term; wherein, the energy constraint term is obtained by calculating the sum of the minimum input image energy and the frequency domain sub-band energy for anterior segment photography, and by calculating the difference between the minimum input image energy and the sum of the frequency domain sub-band energy.
5. The corneal disease diagnostic system based on anterior segment photography as described in claim 1, characterized in that, The topology sensing module includes: The grayscale processing submodule is used to perform grayscale processing on the input anterior segment photograph to obtain a grayscale image; The multi-scale filtering submodule is used to introduce multiple learnable smoothing scale operators to perform multi-scale filtering on grayscale images. The local differential response calculation submodule is used to estimate the background intensity at each scale of the multi-scale filtered image using local means and calculate the local differential response. The gated activation submodule is used to apply a smooth nonlinear mapping to the local differential response, introduce a learnable threshold parameter for gated activation, and obtain a multi-scale structural response. The normalization submodule is used to introduce learnable scale weight parameters and normalize them through softmax, thereby fusing multi-scale structural responses into a unified topological response score. The topological saliency representation submodule is used to flatten the topological response scores into vectors and compress them into compact topological vectors through linear projection. The modeling submodule is used to model compact topology vectors using the Mamba encoder to obtain topology embedding features; the Mamba encoder employs a zigzag scanning scheme.
6. The corneal disease diagnostic system based on anterior segment photography as described in claim 5, characterized in that, The loss function of the topology-aware module includes: a loss term for constraining the sparsity of the persistent graph and an energy regularization term for the topological features.
7. The corneal disease diagnostic system based on anterior segment photography as described in claim 1, characterized in that, The confidence-aware topology and frequency fusion module includes: The cross-modal alignment submodule is used to perform bidirectional alignment of the input topological embedding features and frequency domain features based on the bidirectional cross-attention mechanism. The bidirectional alignment result of the topological embedding features and frequency domain features is concatenated with the input topological embedding features and frequency domain features, and the aligned representation of the topological embedding features and frequency domain features is obtained through linear mapping. The modal self-stabilizing confidence estimation submodule is used to input topological embedding features and frequency domain features into a lightweight MLP to obtain the corresponding modal self-stabilizing confidence. The confidence modulation submodule is used to project the aligned representations of topological embedding features and frequency domain features onto a unified dimension to obtain the topological embedding and the reference representation of the aligned frequency domain. Based on the aligned representations, reference representations, and modal self-stabilization confidence of the topological embedding features and frequency domain features, the confidence-modulated topological embedding features and frequency domain features are obtained. The consistency-aware gating submodule is used to construct gating coefficients based on the consistency of topological embedding and the reference representation aligned to the frequency domain, and to obtain a fused representation based on the topological embedding features and frequency domain features after confidence modulation. The classification submodule is used to input the topological embedding features, frequency domain features and fusion representation into three independent classifiers to obtain a first classification result, a second classification result and a third classification result, and then normalize them through softmax to obtain a first probability distribution, a second probability distribution and a third probability distribution; The reliability-aware voting submodule is used to obtain the corresponding corneal disease diagnosis result by performing reliability-aware voting based on the first probability distribution, the second probability distribution, and the third probability distribution, combined with the frequency domain reliability score and the topology response score.
8. The corneal disease diagnostic system based on anterior segment photography as described in claim 7, characterized in that, The loss function of the confidence-aware topology and frequency fusion module is calculated by simultaneously applying cross-entropy supervision to the three classification branches of topology, frequency domain and fusion representation, which are respectively the loss of the topology embedding feature branch, the loss of the frequency domain feature branch and the loss of the fusion representation branch. The weight of each branch loss is dynamically adjusted by the DWA strategy, and then the loss of each branch is weighted and calculated to obtain the loss function.
9. A method for diagnosing corneal diseases based on anterior segment photography, characterized in that, The method includes: Collect photographs of the anterior segment; The corneal disease diagnosis results are obtained by inputting anterior segment radiographs into a corneal disease diagnosis model that fuses learnable wavelets and Morse topological features based on anterior segment radiographs. The corneal disease diagnostic model includes: a frequency-sensing modulation module, a topology-sensing module, and a confidence-sensing topology and frequency fusion module; The frequency-aware modulation module is used to perform learnable frequency domain decomposition and sub-band level modulation on the input anterior segment photograph to obtain frequency domain features and frequency domain reliability score. The topology-aware module is used to globally model the long-range dependencies between the topological responses of the input anterior segment photograph at different scales and locations to obtain topological embedding features and topological response scores. The confidence-aware topology and frequency fusion module is used to obtain the corresponding corneal disease diagnosis results by performing cross-modal alignment, confidence modulation and consistency-aware gating based on frequency domain features, frequency domain reliability scores and topology embedding features and topology response scores through a bidirectional cross-attention mechanism.
10. An electronic terminal, characterized in that, include: One or more memories and one or more processors; The one or more memories are used to store computer programs; The one or more processors are connected to the memory and are used to run the computer program to perform the method as described in claim 9.