Myopia prediction method, system and electronic device based on fundus image

By performing data augmentation and standardization on the fundus image dataset, combined with structured pruning and self-distillation training of the ResNet-50 model, the problem of low accuracy in traditional pathological myopia diagnosis is solved, and fast and accurate myopia prediction is achieved, which is suitable for pathological myopia diagnosis in resource-constrained areas.

CN119494833BActive Publication Date: 2025-09-23NORTH CHINA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411787204.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-09-23
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

Traditional diagnosis of pathological myopia relies on complex instruments and the doctor's subjective judgment, with low accuracy. In addition, resource-constrained areas lack advanced medical equipment and professional doctors, resulting in untimely and inaccurate diagnosis.

Method used

A myopia prediction method based on fundus images was adopted. A pathological myopia medical dataset was obtained for data augmentation and standardization. The ResNet-50 model was selected for structured pruning, and self-distillation training was used to generate an auxiliary model for myopia prediction. The Osprey optimization algorithm was used to optimize the pruning ratio and performance loss threshold, and the cross-entropy loss function and early stopping strategy were used to optimize the training process.

Benefits of technology

It improves the accuracy of myopia prediction, reduces human errors, provides more consistent diagnostic results, is suitable for resource-constrained medical environments, and improves the efficiency of automatic diagnosis of pathological myopia.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494833B_ABST
    Figure CN119494833B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of myopia prediction technology, specifically a method, system, and electronic device for myopia prediction based on fundus images. The method comprises obtaining a medical dataset of pathological myopia, performing data enhancement and standardization processing on the medical dataset of pathological myopia, generating a fundus image dataset, and dividing the fundus image dataset into a training set and a validation set; selecting a baseline model, performing structured pruning on the baseline model to obtain a pruned model; using the fundus image dataset to perform self-distillation training on the pruned model to generate a myopia prediction auxiliary model; obtaining a fundus image to be detected; inputting the fundus image to be detected into the myopia prediction auxiliary model to generate a myopia prediction result for the fundus image to be detected. By performing myopia prediction using the above method, it is possible to quickly and accurately identify and classify which type of pathological myopia the fundus image to be detected belongs to, reduce human errors, and provide more consistent diagnostic results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of myopia prediction, and in particular to a myopia prediction method, system and electronic equipment based on fundus images. Background Art

[0002] Pathological myopia is a serious eye disease that, unlike myopia caused by common refractive errors, is usually caused by morphological abnormalities or structural changes in the eyeball, rather than simply a refractive error. It is characterized by axial length elongation and pathological changes in the retina and choroid, leading to vision loss and other eye health problems. In recent years, the incidence of pathological myopia has shown a significant upward trend, becoming a major challenge in the field of global eye health. Therefore, understanding and predicting the risk of pathological myopia is crucial for developing effective prevention strategies and treatment plans.

[0003] Traditional diagnosis of pathological myopia relies on complex instrumental examinations and the physician's clinical judgment. This process is not only time-consuming and labor-intensive, but also results are limited by the physician's expertise and experience, and are subject to subjectivity. Furthermore, resource-constrained regions, with insufficient access to advanced medical equipment and a shortage of specialized physicians, severely hinder the timely and accurate diagnosis of pathological myopia. Summary of the Invention

[0004] The technical problem to be solved by the present invention is that the traditional diagnosis of pathological myopia mainly relies on instruments and doctors' subjective judgment, and has a low accuracy rate.

[0005] To solve the above problems, the present invention provides a myopia prediction method and system that can improve the accuracy of fundus image classification and recognition, thereby improving the accuracy of myopia prediction;

[0006] The first technical solution of the present invention is:

[0007] A myopia prediction method based on fundus images, comprising:

[0008] Obtain a pathological myopia medical dataset, perform data enhancement and standardization on the dataset, generate a fundus image dataset, and divide the fundus image dataset into a training set and a validation set;

[0009] Select a baseline model and perform structured pruning on the baseline model to obtain a pruned model;

[0010] The pruned model was trained through self-distillation using a fundus image dataset to generate an auxiliary model for myopia prediction.

[0011] Acquiring a fundus image to be detected;

[0012] The fundus image to be detected is input into the myopia prediction auxiliary model to generate a myopia prediction result of the fundus image to be detected.

[0013] Preferably, a further technical solution of the present invention is:

[0014] The selected baseline model is subjected to structured pruning to obtain a pruned model, specifically:

[0015] The baseline model uses the ResNet-50 model. The prediction results of the ResNet-50 model are used as the original prediction results. The convolution kernels in each convolutional layer of the ResNet-50 model are reinitialized with He, and the weights and reinitialized model after He reinitialization are output.

[0016] Perform forward propagation of the ResNet-50 model through the weights reinitialized by He, record the accuracy of the reinitialized model, and calculate the difference between the output of the reinitialized model and the output of the ResNet-50 model to obtain the performance loss;

[0017] Set a performance loss threshold. When the performance loss is less than the performance loss threshold, prune the ResNet-50 model to obtain an initial pruned model.

[0018] The Osprey optimization algorithm is used to optimize the parameters of the pruning ratio and performance loss threshold of the initial pruning model to obtain the pruning model.

[0019] The convolution kernels in each convolutional layer of the ResNet-50 model are reinitialized using He, and the formula is:

[0020] ;

[0021] in, is the ResNet-50 model weight, is the number of neurons in the previous layer, and the model weights are from a mean of 0 and a variance of are drawn from a normal distribution.

[0022] The Osprey optimization algorithm is used to optimize the parameters of the pruning ratio and performance loss threshold of the initial pruning model to obtain a pruning model, specifically:

[0023] In multi-objective optimization tasks, based on the characteristics of different regions of the objective function, a hierarchical strategy is used to gradually converge to the optimal solution, generate the Pareto frontier, find multiple optimal solutions that do not dominate each other, and obtain the optimal pruning ratio and optimal performance loss threshold;

[0024] The ResNet-50 model is pruned by the optimal pruning ratio and the optimal performance loss threshold to obtain the pruned model.

[0025] The fundus image dataset is used to perform self-distillation training on the pruning model to generate a myopia prediction auxiliary model, specifically:

[0026] The pruning model performs forward propagation on the training data of the training set, outputs the predicted probability of each category, performs temperature adjustment on the predicted probability, and generates the first soft label corresponding to the training set;

[0027] The pruning model performs forward propagation on the training data of the training set again to generate the second soft label corresponding to the training set;

[0028] Calculate the distillation loss based on the difference between the second soft label and the first soft label; use the cross entropy loss function to calculate the classification loss between the predicted result and the true label; combine the distillation loss and the classification loss through a weighting factor to generate a total loss function;

[0029] When the improvement of the accuracy of the validation set of the pruned model is less than or equal to the preset accuracy value within a continuous training cycle, the training is stopped, and the Osprey optimization algorithm is used to optimize the parameters of temperature, training cycle and preset accuracy value to generate a myopia prediction auxiliary model.

[0030] The temperature adjustment of the predicted probability to generate the first soft label corresponding to the training set is specifically:

[0031] Temperature adjustment is performed on the predicted probability of each category, and the predicted probability is divided by the temperature parameter , input the Softmax function to obtain the first soft label; the Softmax function formula is:

[0032] ;

[0033] in, For the The first soft label corresponding to the category, The model is The original output of the categories , is the temperature parameter that controls the smoothness of the probability distribution.

[0034] The data enhancement and standardization processing of the pathological myopia medical dataset is specifically as follows:

[0035] The AutoAugment algorithm is used to select the optimal combination among multiple enhancement strategies, and the optimal enhancement strategy corresponding to the pathological myopia medical dataset is obtained;

[0036] Use the optimal enhancement strategy to enhance the data of the pathological myopia medical dataset and obtain an enhanced dataset;

[0037] The fundus image in the enhanced data set is size-normalized and pixel-value-normalized to obtain the fundus image data set.

[0038] The AutoAugment algorithm is used to select the optimal combination among multiple enhancement strategies, and the optimal enhancement strategy corresponding to the pathological myopia medical dataset is obtained. Specifically, it is:

[0039] Using the reinforcement learning framework, the operation probability is enhanced in the following and amplitude Search for the optimal combination in the parameter space:

[0040] ;

[0041] in, Indicates the selected enhancement operation, and are the probability and magnitude of the operation, Indicates the number of enhancement operations included in each combination;

[0042] Optimization objective function of the enhancement strategy Expressed as:

[0043] ;

[0044] in, is the number of samples in the validation set, is the total number of categories, For the input image The result after applying the combination of enhancement strategies, For the model In the enhanced sample Upper pair The predicted probability of the class, is an indicator variable. The true category is Class time, ,otherwise ;

[0045] The step of searching for the optimal combination is iterated until the optimal enhancement strategy is obtained.

[0046] The second technical solution of the present invention is:

[0047] A myopia prediction system based on fundus images, applying the prediction method described in the above claims, comprising:

[0048] The model training module is used to obtain a pathological myopia medical dataset, perform data augmentation and standardization on the dataset, generate a fundus image dataset, and divide the fundus image dataset into a training set and a validation set; select a baseline model, perform structured pruning on the baseline model to obtain a pruned model; and perform self-distillation training on the pruned model using the fundus image dataset to generate a myopia prediction auxiliary model.

[0049] An acquisition module is used to acquire the fundus image to be detected and input the fundus image to be detected into the prediction module;

[0050] The prediction module is used to generate a myopia prediction result of the fundus image to be detected based on the myopia prediction auxiliary module.

[0051] The third technical solution of the present invention is:

[0052] An electronic device, comprising:

[0053] processor;

[0054] a memory for storing instructions executable by the processor;

[0055] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in the above claim.

[0056] Compared with the prior art, the present invention adopting the above technical solution has the following beneficial effects:

[0057] The present invention selects ResNet-50, which has the best performance on the fundus image dataset, as the baseline model, and uses structured pruning technology to prune the baseline model. The structured pruning technology involves randomly reinitializing the parameters of each layer and evaluating the importance of each convolutional layer filter based on the performance degradation of the baseline model after reinitialization. After setting the performance loss threshold, the filters with less performance impact are pruned, thereby reducing the complexity and computational requirements of the model without significantly affecting the model performance, significantly improving the processing speed; after pruning, the pruned model is further optimized using self-distillation training technology. In this process, the pruned model uses its own predicted output on the training data as new training labels. These outputs are used as soft labels, and the pruned model is retrained through the cross-entropy loss function, which helps the pruned model to deeply understand the complex characteristics of pathological myopia; to prevent overfitting and ensure the optimal performance of the pruned model on unseen data, an early stopping strategy is introduced, that is, if the accuracy of the pruned model does not drop significantly in several consecutive verification cycles, the training is stopped. The myopia prediction auxiliary model trained by the above method can quickly and accurately identify and classify which type of pathological myopia the fundus image to be tested belongs to, reduce human errors, and provide more consistent diagnostic results. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flow chart of the prediction method according to the first embodiment of the present invention;

[0059] Figure 2 is a schematic diagram of a fundus image according to the first embodiment of the present invention;

[0060] Figure 3 1 is a schematic diagram of the process of self-distillation training according to the first embodiment of the present invention;

[0061] Figure 4 This is a generation roadmap of the myopia prediction auxiliary model according to the first embodiment of the present invention; DETAILED DESCRIPTION

[0062] The present invention will be further described below with reference to the embodiments, the purpose of which is only to provide a better understanding of the content of the present invention. Therefore, the examples given do not limit the scope of protection of the present invention.

[0063] See attached Figure 1-4 Embodiment 1 of the present invention discloses a myopia prediction method based on fundus images, comprising:

[0064] Step 101: Acquire a pathological myopia medical dataset, perform data enhancement and standardization on the pathological myopia medical dataset to generate a fundus image dataset, and divide the fundus image dataset into a training set and a validation set;

[0065] Step 102: Select the ResNet-50 model as the baseline model, perform structured pruning on the baseline model, and obtain a pruned model.

[0066] Step 103: Use the fundus image dataset to perform self-distillation training on the pruned model to generate a myopia prediction auxiliary model;

[0067] Step 104: Acquire the fundus image to be detected;

[0068] Step 105 : Input the fundus image to be detected into the myopia prediction auxiliary model to generate a myopia prediction result for the fundus image to be detected.

[0069] In this embodiment, the pathological myopia medical dataset in step 101 adopts the iChallenge-PM dataset; illustratively, the fundus images in the iChallenge-PM dataset ( Figure 2 PM in the fundus image) can be compared with the normal fundus image ( Figure 2 The Normal value in the iChallenge-PM dataset provides richer details. After data augmentation and normalization, a fundus image dataset is generated. The iChallenge-PM dataset contains 400 training images and 400 validation images.

[0070] Preferably, the data enhancement processing of the pathological myopia medical dataset in step 101 is specifically as follows:

[0071] The AutoAugment algorithm is used to select the optimal combination among multiple enhancement strategies to obtain the optimal enhancement strategy corresponding to the pathological myopia medical dataset; the pathological myopia medical dataset is enhanced using the optimal enhancement strategy to obtain an enhanced dataset; the fundus images in the enhanced dataset are size-normalized and pixel-value-normalized to obtain the fundus image dataset.

[0072] The AutoAugment algorithm is used to select the optimal combination among multiple enhancement strategies, and the optimal enhancement strategy corresponding to the pathological myopia medical dataset is obtained.

[0073] Using the reinforcement learning framework, the operation probability is enhanced in the following and amplitude Search for the optimal combination in the parameter space:

[0074] ;

[0075] The above formula represents the input A set of augmentation operations applied, where Indicates the selected enhancement operation, which is part of each tuple. and are the probability and magnitude of the operation, Indicates the number of enhancement operations included in each combination;

[0076] Optimization objective function of the enhancement strategy Expressed as:

[0077] ;

[0078] in, is the number of samples in the validation set, is the total number of categories, For the input image The result after applying the combination of enhancement strategies, For the model In the enhanced sample Upper pair The predicted probability of the class, is an indicator variable. The true category is Class time, ,otherwise ;

[0079] Iterating the step of searching for the optimal combination until the optimal enhancement strategy is obtained;

[0080] The standardization process for the pathological myopia medical dataset in step 101 specifically involves performing size and pixel value normalization on the enhanced fundus images in the pathological myopia medical dataset. For example, all images are normalized to the same size, 224*224. The scale, mean, variance, and order of all images are then normalized to obtain the fundus image dataset.

[0081] In this embodiment, the ResNet-50 model in step 102 is a deep residual network, mainly composed of multiple residual blocks, including an input part consisting of a convolutional layer and a maximum pooling layer, a middle part consisting of multiple residual blocks, and an output part consisting of a fully connected layer, wherein each residual block contains multiple convolutional layers.

[0082] In this embodiment, the specific steps of structured pruning in step 102 are:

[0083] The prediction results of the ResNet-50 model are used as the original prediction results, and the convolution kernels in each convolutional layer of the ResNet-50 model are reinitialized with He:

[0084] ;

[0085] in, is the ResNet-50 model weight, is the number of neurons in the previous layer, and the model weights are from a mean of 0 and a variance of Extract from the normal distribution of ; output the weights and reinitialized model after He reinitialization;

[0086] The ResNet-50 model is forward propagated through the weights after He reinitialization, the accuracy of the reinitialized model is recorded, and the difference between the output of the reinitialized model and the output of the ResNet-50 model is calculated to obtain the performance loss. ;

[0087] The specific performance loss formula is:

[0088] ;

[0089] Where, It represents the accuracy of the model after a certain layer of reinitialization on the validation set, and is the accuracy of the original model; this difference measures the impact of each layer weight reinitialization on model performance; set the performance loss threshold ,Right now Figure 4 The accuracy threshold in , when the performance loss Less than the performance loss threshold When , it is considered that pruning this layer will not significantly affect the overall performance of the model, and the ResNet-50 model is pruned to obtain the initial pruned model;

[0090] Pruning ratio and performance loss threshold of the initial pruning model using the Osprey optimization algorithm Perform parameter optimization to obtain the pruning model, specifically:

[0091] In multi-objective optimization tasks, according to the different regional characteristics of the objective function, a hierarchical strategy is used to gradually converge to the optimal solution, generate the Pareto frontier, and find multiple optimal solutions that do not dominate each other, and obtain the optimal pruning ratio and optimal performance loss threshold; the ResNet-50 model is pruned using the optimal pruning ratio and optimal performance loss threshold to obtain a pruned model.

[0092] Preferably, the fitness function of the Osprey optimization algorithm can be the root mean square error (RMSE) of the baseline model under different parameter combinations, and dynamically adjusted control parameters are used to determine the probability of using different hunting behaviors.

[0093] During the pruning process, we use cross-entropy loss to measure the classification performance of the pruned model on the training data. This ensures that the classification accuracy of the pruned model remains as high as possible while gradually reducing the model parameters. By monitoring the accuracy of the pruned model on the validation set, we can evaluate the impact of pruning on model performance and dynamically adjust the pruning strategy to reduce the negative impact of pruning on accuracy. The specific settings are as follows:

[0094] ;

[0095] in, is the indicator variable of the true label, is the predicted probability output by the pruned model, is the number of categories.

[0096] In this embodiment, the self-distillation training step in step 103 includes:

[0097] 1. Generate soft labels: The pruning model performs forward propagation on the training data of the training set, outputs the predicted probability of each category, performs temperature adjustment on the predicted probability, and generates the first soft label corresponding to the training set;

[0098] ;

[0099] Where, For the pruning model The original output of the categories , For the pruning model The original output of the categories , For all categories The exponential sum of is the temperature parameter that controls the smoothness of the probability distribution.

[0100] 2. Loss function configuration:

[0101] (1) Distillation loss: The pruning model performs forward propagation on the training data of the training set again, and uses the same batch of training data to generate new outputs. These outputs are used as the second soft labels corresponding to the training set. The distillation loss is calculated based on the difference between the second soft label and the first soft label. The distillation loss calculation formula is:

[0102] ;

[0103] Where, At a given temperature The current output probability of the pruned model is , is the result obtained after softmax conversion. Here is the first soft label obtained by calculation.

[0104] (2) Classification loss: The cross entropy loss function is used to calculate the classification loss between the pruned model prediction result and the true label (original hard label); the cross entropy loss function formula is:

[0105] ;

[0106] in, is the actual class label.

[0107] (3) Total loss function: The distillation loss and classification loss are combined through weighting factors to generate the total loss function;

[0108] ;

[0109] in, is the distillation loss weight, set to 0.5, is the temperature parameter, set to 2. The factor is used to appropriately scale the distillation loss, ensuring that the gradient contributed by the distillation loss remains balanced relative to the gradient of the classification loss.

[0110] 3. Set the self-distillation parameters:

[0111] (1) Temperature parameters Set to 2 to adjust the smoothness of the soft labels, helping the pruning model learn more subtle information from these probabilities;

[0112] (2) Distillation loss weight Set to 0.5, this weight determines the proportion of distillation loss in the total loss function to ensure that the pruned model can balance the distillation loss and the original classification loss when learning its own output.

[0113] 4. Pruning model training configuration:

[0114] The learning rate is set to 0.001, which is a relatively mild learning rate suitable for making subtle adjustments during the self-distillation process to ensure that the pruned model can effectively learn from its own output.

[0115] The Adam optimizer is selected as the optimizer. The Adam optimizer is widely used because of its adaptive learning rate adjustment mechanism and is particularly suitable for dealing with unstable gradient problems that may occur in the self-distillation process.

[0116] 5. Training Monitoring and Early Stopping: During self-distillation training, the performance of the pruned model on the validation set is continuously monitored, and an early stopping strategy is implemented to prevent overfitting. Training is stopped when the validation set accuracy of the pruned model improves to less than or equal to the preset accuracy value over five consecutive training cycles. Specifically, the preset accuracy value is set to 1%.

[0117] The Osprey Optimization Algorithm (OOA) optimizes the temperature, training cycle, and accuracy presets to obtain a trained myopia prediction auxiliary model. In the field of deep learning, the Osprey Optimization Algorithm (OOA) can be used to optimize neural network parameters such as weights and biases. By treating the neural network training process as an optimization problem, the Osprey Optimization Algorithm can help find the optimal parameter settings and improve the performance of the neural network.

[0118] A second embodiment of the present invention discloses a myopia prediction system based on fundus images, applying the prediction method described in the above claims, including:

[0119] The model training module is used to obtain a pathological myopia medical dataset, perform data augmentation and standardization on the dataset, generate a fundus image dataset, and divide the fundus image dataset into a training set and a validation set; select a baseline model, perform structured pruning on the baseline model to obtain a pruned model; and perform self-distillation training on the pruned model using the fundus image dataset to generate a myopia prediction auxiliary model.

[0120] An acquisition module is used to acquire the fundus image to be detected and input the fundus image to be detected into the prediction module;

[0121] The prediction module is used to generate a myopia prediction result of the fundus image to be detected based on the myopia prediction auxiliary module.

[0122] A third embodiment of the present invention discloses an electronic device, including:

[0123] processor;

[0124] a memory for storing instructions executable by the processor;

[0125] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in the above claim.

[0126] The present invention compares the performance of three deep learning models, VGGNet, GoogLeNet and ResNet-50, on the iChallenge-PM fundus image dataset, selects the ResNet-50 model with the best performance as the baseline model based on key indicators such as accuracy and loss, and uses SR-init structured pruning (layer pruning) technology to prune the baseline model. The structured pruning technology involves randomly reinitializing the parameters of each layer, and evaluating the importance of each convolutional layer filter based on the performance degradation of the baseline model after reinitialization by comparing the output difference of the model before and after reinitialization. It then decides whether to retain these filters based on the set performance loss threshold, thereby While significantly impacting the performance of the pruned model, this approach reduces model complexity and computational requirements, significantly improving processing speed. After pruning, the pruned model is further optimized using a self-distillation training technique. During this process, the pruned model uses its own predicted outputs on the training data as new training labels. These outputs serve as soft labels, and the pruned model is retrained using a cross-entropy loss function, helping the pruned model gain a deeper understanding of the complex characteristics of pathological myopia. To prevent overfitting and ensure optimal performance of the pruned model on unseen data, an early stopping strategy is introduced: training is terminated if the accuracy of the pruned model does not significantly decrease over several consecutive validation cycles. The self-distilled trained model is then evaluated on an independent test set to verify its improved diagnostic accuracy and generalization ability. This model will significantly improve the efficiency of automated diagnosis of pathological myopia and reduce misdiagnosis rates. It is suitable for resource-constrained medical settings and has important implications for promoting intelligent and automated healthcare. The myopia prediction auxiliary model trained using this method can quickly and accurately identify and classify the pathological myopia type in fundus images, reducing human error and providing more consistent diagnostic results.

[0127] The above description is only a preferred embodiment of the present invention and does not limit the scope of the present invention. Any equivalent changes made using the contents of the present invention specification and its drawings are included in the scope of the present invention.

Claims

1. A myopia prediction method based on fundus images, characterized in that: include: Obtain a pathological myopia medical dataset, perform data enhancement and standardization on the dataset, generate a fundus image dataset, and divide the fundus image dataset into a training set and a validation set; Select a baseline model and perform structured pruning on the baseline model to obtain a pruned model; The pruned model was trained through self-distillation using a fundus image dataset to generate an auxiliary model for myopia prediction. Acquiring a fundus image to be detected; Inputting the fundus image to be tested into the myopia prediction auxiliary model to generate a myopia prediction result of the fundus image to be tested; The selected baseline model is subjected to structured pruning to obtain a pruned model, specifically: The baseline model uses the ResNet-50 model. The prediction results of the ResNet-50 model are used as the original prediction results. The convolution kernels in each convolutional layer of the ResNet-50 model are reinitialized with He, and the weights and reinitialized model after He reinitialization are output. Perform forward propagation of the ResNet-50 model through the weights reinitialized by He, record the accuracy of the reinitialized model, and calculate the difference between the output of the reinitialized model and the output of the ResNet-50 model to obtain the performance loss; Set a performance loss threshold. When the performance loss is less than the performance loss threshold, prune the ResNet-50 model to obtain an initial pruned model. The Osprey optimization algorithm is used to optimize the parameters of the pruning ratio and performance loss threshold of the initial pruning model to obtain the pruning model; The Osprey optimization algorithm is used to optimize the parameters of the pruning ratio and performance loss threshold of the initial pruning model to obtain a pruning model, specifically: In multi-objective optimization tasks, based on the characteristics of different regions of the objective function, a hierarchical strategy is used to gradually converge to the optimal solution, generate the Pareto frontier, find multiple optimal solutions that do not dominate each other, and obtain the optimal pruning ratio and optimal performance loss threshold; The ResNet-50 model is pruned by the optimal pruning ratio and the optimal performance loss threshold to obtain the pruned model.

2. The myopia prediction method based on fundus images according to claim 1, characterized in that: The convolution kernels in each convolutional layer of the ResNet-50 model are reinitialized using He, and the formula is: Among them, W is the ResNet-50 model weight, n l is the number of neurons in the previous layer, and the model weights are from a mean of 0 and a variance of are drawn from a normal distribution.

3. The myopia prediction method based on fundus images according to claim 1, characterized in that: The fundus image dataset is used to perform self-distillation training on the pruning model to generate a myopia prediction auxiliary model, specifically: The pruning model performs forward propagation on the training data of the training set, outputs the predicted probability of each category, performs temperature adjustment on the predicted probability, and generates the first soft label corresponding to the training set; The pruning model performs forward propagation on the training data of the training set again to generate the second soft label corresponding to the training set; Calculate the distillation loss based on the difference between the second soft label and the first soft label; use the cross entropy loss function to calculate the classification loss between the predicted result and the true label; combine the distillation loss and the classification loss through a weighting factor to generate a total loss function; When the improvement of the accuracy of the validation set of the pruned model is less than or equal to the preset accuracy value within a continuous training cycle, the training is stopped, and the Osprey optimization algorithm is used to optimize the parameters of temperature, training cycle and preset accuracy value to generate a myopia prediction auxiliary model.

4. The myopia prediction method based on fundus images according to claim 3, characterized in that: The temperature adjustment of the predicted probability to generate the first soft label corresponding to the training set is specifically: The predicted probability of each category is temperature-adjusted, the predicted probability is divided by the temperature parameter T, and input into the Softmax function to obtain the first soft label; the Softmax function formula is: Among them, q i is the first soft label corresponding to the i-th category, z i is the original output logits of the model for the i-th category, and T is the temperature parameter used to control the smoothness of the probability distribution.

5. The myopia prediction method based on fundus images according to claim 1, characterized in that: The data enhancement and standardization processing of the pathological myopia medical dataset is specifically as follows: The AutoAugment algorithm is used to select the optimal combination among multiple enhancement strategies, and the optimal enhancement strategy corresponding to the pathological myopia medical dataset is obtained; Use the optimal enhancement strategy to enhance the data of the pathological myopia medical dataset and obtain an enhanced dataset; The fundus image in the enhanced data set is size-normalized and pixel-value-normalized to obtain the fundus image data set.

6. The myopia prediction method based on fundus images according to claim 5, characterized in that: The AutoAugment algorithm is used to select the optimal combination among multiple enhancement strategies, and the optimal enhancement strategy corresponding to the pathological myopia medical dataset is obtained. Specifically, it is: Using a reinforcement learning framework, we search for the optimal combination in the following parameter space of enhanced operation probability p and amplitude m: T(x)={(op1,p1,m1),(op2,p2,m2),...,(op n ,p n ,m n )}; Among them, op i represents the selected enhancement operation, p i and m i are the probability and magnitude of the operation, respectively, and n represents the number of reinforcement operations contained in each combination; The optimization objective function L of the enhancement strategy val Expressed as: Among them, N is the number of samples in the validation set, C is the total number of categories, T(x i ) is the input image x i The result after applying the enhanced strategy combination, f θ (T(x i )) c For model f θ In the enhanced sample T(x i ) is the predicted probability of the cth class, y i,c is an indicator variable. When the sample x i When the true category of is the cth category, y i,c =1, otherwise y i,c =0; The step of searching for the optimal combination is iterated until the optimal enhancement strategy is obtained.

7. A myopia prediction system based on fundus images, applying the prediction method according to any one of claims 1 to 6, characterized in that: include: The model training module is used to obtain a pathological myopia medical dataset, perform data augmentation and standardization on the dataset, generate a fundus image dataset, and divide the fundus image dataset into a training set and a validation set; select a baseline model, perform structured pruning on the baseline model to obtain a pruned model; and perform self-distillation training on the pruned model using the fundus image dataset to generate a myopia prediction auxiliary model. An acquisition module is used to acquire the fundus image to be detected and input the fundus image to be detected into the prediction module; The prediction module is used to generate a myopia prediction result of the fundus image to be detected based on the myopia prediction auxiliary module.

8. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Pathological myopia recognition method based on data enhancement and model fusion

    CN112580580A

  • Model compression method and device, data processing method and device, storage medium and chip

    CN116644781A