Fundus image processing method, device and equipment

By analyzing the sharpness and chromaticity distribution of fundus images, and using style transfer processing to generate simulated imaging effect images, the problem of being unable to intuitively quantify the impact of cataracts in the existing technology is solved, and accurate and efficient evaluation of visual quality is achieved.

CN118196218BActive Publication Date: 2024-09-17PEKING UNIVERSITY THIRD HOSPITAL (THE THIRD CLINICAL MEDICAL SCHOOL OF PEKING UNIVERSITY)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410586406.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2024-09-17
Estimated Expiration
2044-05-13

AI Technical Summary

Technical Problem

Existing technology is difficult to intuitively quantify the impact of cataracts on patients' visual quality, and cannot accurately reflect the degree of visual function decline, lacking an intuitive and visual assessment method.

Method used

By analyzing the sharpness and chromaticity distribution of fundus images, combined with style transfer processing, the imaging effect images of simulated patients in different scenarios are generated, and color simulation pictures are provided to assist visual quality assessment.

Benefits of technology

Significantly improves the accuracy and efficiency of visual quality assessment of cataract patients, providing data with high reference value for treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118196218B
    Figure CN118196218B
Patent Text Reader

Abstract

The present invention provides a fundus image processing method, device and equipment, the method comprising: obtaining a fundus image; performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image; performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image; obtaining a clear target scene image; performing style transfer process on the target scene image based on the fundus image to form a blurred version of the target scene image; performing processing based on the clarity, chromaticity distribution and blurred version of the scene image to form a simulated image for simulating the imaging effect when the patient looks at the target scene. The fundus image processing method of the present invention is used to process the patient's fundus image to simulate an image that represents the imaging quality under the patient's actual viewing angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a fundus image processing method, device and equipment. Background Art

[0002] Cataract is a common disease that seriously affects the visual function of middle-aged and elderly people. Accurately monitoring the degree to which it affects visual quality is an important means to maintain the visual function and living ability of the elderly. At present, artificial intelligence algorithms for cataract monitoring developed based on slit lamp microscopy and fundus photography are mainly used to grade the severity of cataracts, and cannot intuitively quantify the degree to which cataracts affect patients' visual function.

[0003] Moreover, even after quantifying the degree of lens opacity and its impact on the quality of human eye imaging, the data obtained still cannot directly show the extent of the patient's visual quality decline. Therefore, it is necessary to visually present the visual quality of cataract patients to assist medical staff and patients to more clearly and directly understand the actual visual quality under cataract conditions. Summary of the invention

[0004] The present invention provides a fundus image processing method, device and equipment for processing a patient's fundus image to simulate a picture representing the imaging quality under the patient's actual viewing angle.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a fundus image processing method, which is characterized by comprising:

[0006] obtaining a fundus image, wherein the fundus image includes a fundus image of a cataract patient;

[0007] Performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image;

[0008] Performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image;

[0009] Get a clear picture of the target scene;

[0010] Performing style migration processing on the target scene image based on the fundus image to form a blurred version of the target scene image;

[0011] The blurred version of the target scene image is processed based on the clarity and chromaticity distribution to form a simulated image for simulating the imaging effect when the patient looks at the target scene, and the simulated image is a color image.

[0012] In some embodiments, performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes:

[0013] Performing a first preprocessing on the fundus images to at least unify the resolutions of different fundus images into a first resolution;

[0014] Performing color space conversion on the first preprocessed fundus image to form a first grayscale image;

[0015] intercepting a region including blood vessels and optic disc texture in the first grayscale image to form a first target image;

[0016] Performing Gaussian blur processing on the first target image to form a second target image;

[0017] Performing edge detection on the second target image, and counting the number of pixels whose pixel values ​​meet the requirements based on the detection result;

[0018] The clarity of each fundus image is calculated based on the number of pixels and the total number of pixels of the fundus image.

[0019] In some embodiments, performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes:

[0020] Performing a second preprocessing on the fundus images to at least unify the resolutions of different fundus images into a second resolution;

[0021] Performing color space conversion on the second preprocessed fundus image to form a second grayscale image;

[0022] Analyzing and determining the color component ranges of different colors in the second grayscale image;

[0023] Calculate and determine the number of pixels under each color component and the number of pixels of the fundus image;

[0024] The chromaticity distribution of the fundus image is calculated based on the number of pixels under each color component and the number of pixels of the fundus image.

[0025] In some embodiments, the analyzing and determining the color component ranges of different colors in the second grayscale image includes:

[0026] The color component ranges of red, orange, yellow, green and blue in the second grayscale image are analyzed and determined.

[0027] In some embodiments, the method further comprises:

[0028] Training an initial model based on the fundus image and the corresponding clarity and chromaticity distribution as training data to obtain a fundus image analysis model for analyzing and calculating the clarity and chromaticity distribution of the fundus image;

[0029] The performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes:

[0030] Performing a first analysis process on the fundus image based on the fundus image analysis model to calculate and determine the clarity of the fundus image;

[0031] The performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes:

[0032] A second analysis process is performed on the fundus image based on the fundus image analysis model to calculate and determine the chromaticity distribution of the fundus image.

[0033] In some embodiments, the method further comprises:

[0034] Build an initial model based on the cycleGAN model;

[0035] Obtain fundus grayscale images of ordinary people and fundus grayscale images of different cataract patients as training data;

[0036] Training the initial model based on the training data to obtain a candidate model, wherein the candidate model is used to learn the style of the fundus grayscale image of the cataract patient and is capable of migrating the style of the fundus grayscale image to the fundus grayscale image of an ordinary person, so as to process and form a target fundus grayscale image having the style of the fundus grayscale image of the cataract patient;

[0037] The target fundus grayscale image is compared with the corresponding fundus grayscale image of a cataract patient, and the weight parameters in the candidate model are updated based on the comparison result to obtain a target model with a higher processing accuracy than the candidate model.

[0038] In some embodiments, performing style transfer processing on the target scene image based on the fundus image to form a blurred version of the target scene image includes:

[0039] Performing color space conversion on the fundus image to form a third grayscale image;

[0040] Processing the target scene image to form a single-channel image, wherein the single-channel image includes a red channel image, a green channel image, and a blue channel image;

[0041] Convert the single-channel image into a grayscale image by performing a color space conversion.

[0042] Inputting the single-channel grayscale image and the third grayscale image into the target model to obtain a fuzzy single-channel grayscale image that matches the style of the third grayscale image;

[0043] The blurred single-channel grayscale images are merged to form a blurred version of the target scene image.

[0044] In some embodiments, the processing based on the clarity, chromaticity distribution and blurred version of the scene picture to form a simulated picture for simulating the imaging effect when the patient looks at the target scene includes:

[0045] The clarity and chromaticity of the blurred version of the scene image are adjusted based on the clarity and chromaticity distribution, thereby forming a simulated image for simulating the imaging effect when the patient looks at the target scene.

[0046] Another embodiment of the present invention also provides an image data processing and analysis device, including:

[0047] A first acquisition module is used to obtain a fundus image, wherein the fundus image includes a fundus image of a cataract patient;

[0048] A first processing module, used for performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image;

[0049] A second processing module, used for performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image;

[0050] The second acquisition module is used to obtain a clear target scene image;

[0051] A third processing module is used to perform style migration processing on the target scene image according to the fundus image to form a blurred version of the target scene image;

[0052] The fourth processing module is used to process the clarity, chromaticity distribution and blurred version of the scene image to form a simulated image for simulating the imaging effect when the patient looks at the target scene, and the simulated image is a color image.

[0053] Another embodiment of the present invention also provides an electronic device, including:

[0054] at least one processor; and,

[0055] a memory communicatively coupled to the at least one processor;

[0056] The memory stores instructions executable by the at least one processor, and the instructions are configured to execute the fundus image processing method as described in any one of the embodiments above.

[0057] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of the embodiments of the present invention include the ability to analyze and process the patient's fundus image to obtain the clarity and chromaticity distribution of the corresponding fundus image, then perform style transfer processing on the scene image corresponding to the fundus image, and update and correct the processing result based on the clarity and chromaticity distribution, and finally obtain an image that can simulate the imaging effect when the patient looks at the scene corresponding to the scene image. Based on the image, medical staff can perform a more accurate visual quality assessment of the patient, significantly improve the assessment efficiency and accuracy, and provide high reference value data for the patient's treatment. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 4 is a flow chart of a fundus image processing method in an embodiment of the present invention.

[0059] Figure 2 This is a flow chart of target model training in another embodiment of the present invention.

[0060] Figure 3 FIG. 4 is a flow chart of a fundus image processing method in another embodiment of the present invention.

[0061] Figure 4 FIG. 4 is a flow chart of a fundus image processing method in another embodiment of the present invention.

[0062] Figure 5 4 is a structural block diagram of a fundus image processing device in an embodiment of the present invention. DETAILED DESCRIPTION

[0063] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but are not intended to limit the present invention.

[0064] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.

[0065] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.

[0066] These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment given as a non-limiting example, with reference to the accompanying drawings.

[0067] It should also be understood that, although the invention has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the invention that have the characteristics recited in the claims and are therefore within the scope of protection defined thereby.

[0068] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

[0069] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.

[0070] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.

[0071] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0072] like Figure 1 As shown, an embodiment of the present invention provides a fundus image processing method, comprising:

[0073] S1: Obtaining a fundus image, wherein the fundus image includes a fundus image of a cataract patient;

[0074] S2: performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image;

[0075] S3: performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image;

[0076] S4: Get a clear picture of the target scene;

[0077] S5: performing style transfer processing on the target scene image based on the fundus image to form a blurred version of the target scene image;

[0078] S6: Based on the clarity, chromaticity distribution and blurred version of the scene image, a simulation image is formed to simulate the imaging effect when the patient looks at the target scene, wherein the simulation image is a color image.

[0079] Based on the contents of the above embodiments, it can be seen that the beneficial effects of this embodiment include the ability to analyze and process the patient's fundus image to obtain the clarity and chromaticity distribution of the corresponding fundus image, then perform style transfer processing on the scene image corresponding to the fundus image, and update and correct the processing result based on the clarity and chromaticity distribution, and finally obtain an image that can simulate the imaging effect when the patient looks at the scene corresponding to the scene image.

[0080] In this embodiment, the fundus image is taken as an example of a fundus image of a cataract patient. During the onset of cataract, the denaturation of lens protein will lead to turbidity of the lens cortex and increase of chromophores in the lens, which will lead to the deepening of the lens color and the enhancement of scattering and filtering absorption of light. Among them, the scattering effect causes the sharpness of the image edge, i.e., the clarity, to decrease, and the filtering absorption effect causes the image color to deviate from normal. The fundus camera projects light through the cornea, lens, and vitreous body into the fundus, and the lens captures the reflected light from the retina to form a fundus photo. With the help of the reversible principle of the optical path, under the condition of certain transparency of the cornea and vitreous body, the clarity of the fundus photo indirectly reflects the degree of filtering and scattering of light by the lens. Therefore, the fundus photo image of the patient can be compared with the fundus photo image of a healthy person with a transparent lens, and the degree of decrease in the sharpness of the texture edge in the image and the degree of deviation of the color from normal can be used to characterize the degree of decrease in the imaging quality of the human eye under the cataract state. That is, based on this image, medical staff can conduct a more accurate visual quality assessment of the patient, which can significantly improve the efficiency and accuracy of the assessment and provide high-value reference data for the patient's treatment.

[0081] In one embodiment, performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes:

[0082] S7: performing a first preprocessing on the fundus images to at least unify the resolutions of different fundus images into a first resolution;

[0083] S8: performing color space conversion on the fundus image after the first preprocessing to form a first grayscale image;

[0084] S9: intercepting the region containing blood vessels and optic disc texture in the first grayscale image to form a first target image;

[0085] S10: performing Gaussian blur processing on the first target image to form a second target image;

[0086] S11: performing edge detection on the second target image, and counting the number of pixels whose pixel values ​​meet the requirements based on the detection result;

[0087] S12: Calculate the clarity of each fundus image based on the number of pixels and the total number of pixels of the fundus image.

[0088] Exemplarily, the above steps of this embodiment are to analyze each fundus photo and calculate the number of identifiable blood vessel textures in the image to evaluate the edge sharpness in the image. Specifically, under the same foreground object, the clarity of the fundus photo is positively correlated with the number of texture features that can be extracted from the fundus photo, that is, the richer the edge texture (e.g., the edge of the blood vessel) that can be extracted from the image, the clearer the image is, and vice versa; therefore, in this embodiment, the edge texture of the fundus photo is selected to evaluate the clarity of the fundus photo, and the process includes:

[0089] 1. Extract the fundus image from the entire fundus photo with a black background and unify the resolution of the photo to 600x600 size (the specific size is not unique);

[0090] 2. Convert the color fundus photos in RGB format to grayscale images;

[0091] 3. Set the target region (ROI) for fundus image analysis with a radius of 295 pixels and the center of the image as the center, thereby removing the influence of edge texture outside the region and the black area outside the photo on the analysis results, and realizing that the connotation of edge texture detection is limited to the texture of blood vessels and optic disc;

[0092] 4. Perform Gaussian blur preprocessing on the image to reduce the impact of sharp signals such as artifacts formed by internal reflections on the image texture detection results;

[0093] 5. Perform Canny edge detection on the image, count the number of pixels in the edge feature image whose pixel value is greater than 200 (specific but not unique), divide the number of pixels by the total number of pixels in the fundus image, obtain the ratio, and then normalize it to finally obtain the image clarity value.

[0094] Furthermore, in another embodiment, the performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes:

[0095] S13: performing a second preprocessing on the fundus images to at least unify the resolutions of different fundus images into a second resolution;

[0096] S14: performing color space conversion on the fundus image after the second preprocessing to form a second grayscale image;

[0097] S15: Analyze and determine the color component ranges of different colors in the second grayscale image;

[0098] S16: Calculate and determine the number of pixels under each color component and the number of pixels of the fundus image;

[0099] S17: Calculate the chromaticity distribution of the fundus image based on the number of pixels under each color component and the number of pixels of the fundus image.

[0100] The analyzing and determining the color component ranges of different colors in the second grayscale image includes:

[0101] S18: Analyze and determine the color component ranges of red, orange, yellow, green, and blue in the second grayscale image.

[0102] For example, as an optional method, this embodiment can calculate the color components of the color distribution in the HSV space color channel of the fundus image to optimize the spectral range and the number of channels, thereby forming an evaluation scheme based on imaging color, that is, chromaticity distribution. Specifically, through intuitive observation, it can be seen that the fundus images of patients and healthy people are obviously different in the spectral color level, so the fundus photos of patients and normal fundus photos can be distinguished more clearly through observation. Therefore, it is feasible to distinguish different fundus photos from the color of the picture, that is, the quantification of the chromaticity distribution dimension. Usually, the chromaticity distribution of normal fundus photos is overall orange, followed by the red component of red blood vessels; the chromaticity distribution of patient fundus photos is overall yellow, followed by orange and green. After analysis, it is determined that for fundus photos of cataract patients, there are 5 colors that are truly weighted, that is, color components with reference value, namely orange, red, yellow, green and blue. When calculating and determining the chromaticity distribution, the specific process is as follows:

[0103] 1. Cut off the black peripheral background from the entire fundus photo with a black background to obtain the fundus image to be analyzed, and then unify the resolution of the fundus image to 1655x1655 size;

[0104] 2. Perform color space conversion on the fundus images of uniform resolution, from RGB space to HSV space, where H represents hue, S represents saturation, and V represents brightness (i.e. grayscale image).

[0105] 3. According to the corresponding ranges of the above five colors, the color component value of each color in its corresponding fundus image is counted. The HSV ranges of the five color components are as follows:

[0106] Red: Consists of two ranges, one with upper and lower boundaries from [0, 43, 46] to [10, 255, 255], and the other red with upper and lower boundaries from [156, 43, 46] to [180, 255, 255].

[0107] The orange upper and lower boundaries are [11, 43, 46] to [20, 255, 255].

[0108] The yellow upper and lower boundaries are [20, 43, 46] to [30, 255, 255].

[0109] The green upper and lower boundaries are [35, 43, 46] to [85, 255, 255].

[0110] The blue upper and lower boundaries are [100, 43, 46] to [150, 255, 255].

[0111] 4. Count the number of pixels of the corresponding color component. The sum of the pixels is the color component of the corresponding color of this fundus image. Divide this value by the total number of pixels of the entire fundus photo to get the color proportion of the color in the entire image, that is, the chromaticity distribution value. Finally, the chromaticity distribution histogram of the five colors is calculated.

[0112] 5. In actual application, the chromaticity distribution attribute score can be further calculated, which is obtained by cosine similarity calculation. For example, first find a group of (for example but not limited to 20) relatively high-quality normal fundus images among all the test images, and then calculate the chromaticity distribution values ​​of the above 5 colors in these high-quality images, and then obtain a standard 5-dimensional normal fundus chromaticity distribution attribute template by averaging weighted methods, recorded as vector ,The chromaticity distribution data of other fundus images are calculated in the same way to obtain a 5-dimensional vector b; at this time, the chromaticity distribution value of the fundus photo can be approximated by the cosine similarity with the template vector, and the similarity value range is [-1,1]. The higher the chromaticity distribution value of the image, the closer it is to the normal template image, and the lower the value, the greater the deviation of the image color from the normal range (the greater the deviation of the spectral composition of the incoming light caused by cataracts from the normal range, the more serious the cataract is). The formula for calculating the cosine similarity score of the image is as follows:

[0113] ;

[0114] In one embodiment, in order to facilitate the analysis and processing of the fundus image, the method further includes:

[0115] S19: training an initial model based on the fundus image and the corresponding clarity and chromaticity distribution as training data to obtain a fundus image analysis model for analyzing and calculating the clarity and chromaticity distribution of the fundus image;

[0116] The performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes:

[0117] S20: performing a first analysis process on the fundus image based on the fundus image analysis model to calculate and determine the clarity of the fundus image;

[0118] The performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes:

[0119] S21: performing a second analysis process on the fundus image based on the fundus image analysis model to calculate and determine the chromaticity distribution of the fundus image.

[0120] For example, the following method can be used to train the fundus image analysis model:

[0121] 1. The input data is an RGB color fundus picture, and the input data size for training is 640x640. At the same time, in order to adapt to the input of multi-scene fundus pictures and more accurate analysis results, the network model adds a detection module for fundus images, so that the subsequent regression of clarity and chromaticity analysis focuses on the current fundus picture. For training data, a total of 400 pictures were produced in this embodiment, which are divided into training set and verification set according to the ratio of 9:1, of course, the specific ones are not unique. The clarity and chromaticity distribution values ​​of the training labels are obtained by the aforementioned method, and the position coordinates of the fundus can be obtained by manual annotation.

[0122] 2. The network architecture in this embodiment is as follows: the input image module is connected to a CNN-based image feature extraction layer. Because it includes the detection module and multi-attribute regression tasks, the overall sign extraction of CNN BackBone is divided into three levels of feature layers. The corresponding low-order features, mid-order features, and high-order features are extracted respectively. The lower the level, the more specific the features, and the higher the level, the more abstract the expression of the features. Therefore, the use of low, medium, and high level features together can better express the attributes of the fundus image in the dimensions of clarity and chromaticity distribution.

[0123] Furthermore, the feature extraction module is followed by a feature cascade layer, which connects the three levels of features extracted in the order of low, medium, and high, and forms a new feature layer after cascade operation transformation. The cascade module is followed by an output layer, and the output of the output layer is a 12x8400 two-dimensional matrix. The 12 in the first dimension represents the confidence value of fundus detection (1), the coordinates of fundus detection (4), the fundus clarity regression (1), the fundus chromaticity distribution score regression (1), and the corresponding five color component regressions (5). The 8400 in the second dimension represents the number of candidate targets to be detected.

[0124] Since cataracts last for a long time and lens opacity undergoes a long change from mild to severe, it is difficult to obtain clear fundus photos of the same individual before the disease and blurred fundus photos of the individual in the diseased state at the same time. For this reason, in the subsequent stage of coordinating the fundus images and target scene images, an unsupervised learning scheme is adopted, based on the cycleGAN model, to train an image generation model that blurs clear images to simulate the visual quality of cataract patients. The training data uses the Cataracts dataset, which is a medical image analysis dataset in the field of cataract diagnosis and classification, including 300 fundus images of ordinary people and 100 fundus images of cataract patients (the training data is flexible, the dataset used in this example is only one of the feasible datasets, and other datasets of similar nature can be used as training content).

[0125] Specifically, during training, the method includes:

[0126] S22: Build an initial model based on the cycleGAN model;

[0127] S23: Obtaining fundus grayscale images of ordinary people and fundus grayscale images of patients with different cataracts as training data;

[0128] S24: training the initial model based on the training data to obtain a candidate model, wherein the candidate model is used to learn the style of the fundus grayscale image of the cataract patient and is capable of transferring the style of the fundus grayscale image to the fundus grayscale image of an ordinary person, so as to process and form a target fundus grayscale image having the style of the fundus grayscale image of the cataract patient;

[0129] S25: Compare the target fundus grayscale image with the corresponding fundus grayscale image of a cataract patient, and update the weight parameters in the candidate model based on the comparison result to obtain a target model with a higher processing accuracy than the candidate model.

[0130] In addition, if Figure 2 As shown, the blurred fundus grayscale image can be reprocessed to form a clear fundus photograph, and compared with the corresponding fundus grayscale image of an ordinary person to determine the degree of restoration, and the weight parameters of the candidate model can be adjusted based on the degree of restoration to make the processing accuracy of the obtained target model better and the learning effect better.

[0131] Furthermore, performing style transfer processing on the target scene image based on the fundus image to form a blurred version of the target scene image includes:

[0132] S26: performing color space conversion on the fundus image to form a third grayscale image;

[0133] S27: Processing the target scene image to form a single-channel image, wherein the single-channel image includes a red channel image, a green channel image, and a blue channel image;

[0134] S28: Convert the single-channel image into a grayscale image by performing color space conversion;

[0135] S29: inputting the single-channel grayscale image and the third grayscale image into a target model to obtain a fuzzy single-channel grayscale image that matches the style of the third grayscale image;

[0136] S30: merging the blurred single-channel grayscale images to form a blurred version of the target scene image.

[0137] Specifically, Figure 3 As shown, since the color distribution of the fundus photograph of the human eye is mainly red and yellow, it cannot reflect all the colors seen by the human eye. Therefore, the fundus grayscale image is used for model training to obtain an image generation model that can generate a blurred version of the target scene image. In the process of using the model, the RGB channel image of the target scene image, that is, the single channel image, can be blurred by the target model trained with the grayscale image, and then the blurred RGB single channel image can be merged to obtain a colored blurred version of the target scene image, so as to achieve the first personalized fitting of the visual quality of cataract patients with different degrees of severity. The target scene image described in this embodiment is not limited to any specific, and can be a photo taken in any environment, etc.

[0138] Furthermore, the processing based on the clarity, chromaticity distribution and blurred version of the scene picture to form a simulated picture for simulating the imaging effect when the patient looks at the target scene includes:

[0139] S31: adjusting the clarity and chromaticity of the blurred version of the scene image based on the clarity and chromaticity distribution, thereby forming a simulated image for simulating the imaging effect when the patient looks at the target scene.

[0140] That is, through the above steps, the blurred version of the target scene image matching the patient can be personalized fit for the second time by using the clarity and chromaticity distribution of the fundus image of the corresponding patient, and finally a simulated image is generated.

[0141] Based on the above embodiments, it can be seen that Figure 4As shown, the method of the present application is to input the patient's fundus photo and scene photo to the system (model) under the premise of a given scene, and then obtain a fitting picture of the patient's visual quality, and the content of the picture simulates the imaging effect of the scene from the patient's perspective. In order to achieve this function, the system of this embodiment has multiple models, including a fundus image analysis model, which is used to analyze and process the fundus image to obtain the corresponding clarity and chromaticity distribution; a target model, which is used to perform style transfer on the scene image, that is, personalized processing, so that it at least matches the imaging style of the patient's fundus image, or blur matching; an image generation model, which is used to further personalize the output result of the target model according to the obtained clarity and chromaticity distribution, and further adjust the clarity and color of the output result to meet the actual situation of the patient's eyes, and finally obtain a simulated image that matches the actual imaging effect of the patient. Among them, the above-mentioned analysis model and target model can be nested in the image generation model to improve the accuracy of the image generation model.

[0142] In summary, the embodiments of the present application can support the use of image processing strategies to split the impact of cataracts on visual quality into quantitative analysis of image edge sharpness and chromaticity, so that the imaging quality of cataractous eyes can be indirectly reflected through the clarity of fundus images; then, the RGB three-channel color components are processed separately with the average grayscale of the fundus photograph to avoid the technical difficulty that the fundus photograph has a relatively single color and cannot reflect the entire color space and color distribution, thereby realizing the simulation of color perception in the patient's visual quality; in addition, through quantitative analysis of fundus images, personalized extraction of the clarity characteristics of the fundus images of each patient is realized to form texture clarity and color distribution data, and this objective and quantitative image analysis data is used to replace the current manual scoring data that is greatly affected by subjective factors and has low accuracy, and is used as the annotation data of the image generation model to refine the model for training, which can significantly improve the model learning and processing accuracy, and make the generated simulated images more in line with the actual imaging conditions of the patients.

[0143] like Figure 5 As shown, another embodiment of the present invention also provides a fundus image processing device 100, including:

[0144] A first acquisition module is used to obtain a fundus image, wherein the fundus image includes a fundus image of a cataract patient;

[0145] A first processing module, used for performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image;

[0146] A second processing module, used for performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image;

[0147] The second acquisition module is used to obtain a clear target scene image;

[0148] A third processing module is used to perform style migration processing on the target scene image according to the fundus image to form a blurred version of the target scene image;

[0149] The fourth processing module is used to process the clarity, chromaticity distribution and blurred version of the scene image to form a simulated image for simulating the imaging effect when the patient looks at the target scene, and the simulated image is a color image.

[0150] In some embodiments, performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes:

[0151] Performing a first preprocessing on the fundus images to at least unify the resolutions of different fundus images into a first resolution;

[0152] Performing color space conversion on the first preprocessed fundus image to form a first grayscale image;

[0153] intercepting a region including blood vessels and optic disc texture in the first grayscale image to form a first target image;

[0154] Performing Gaussian blur processing on the first target image to form a second target image;

[0155] Performing edge detection on the second target image, and counting the number of pixels whose pixel values ​​meet the requirements based on the detection result;

[0156] The clarity of each fundus image is calculated based on the number of pixels and the total number of pixels of the fundus image.

[0157] In some embodiments, performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes:

[0158] Performing a second preprocessing on the fundus images to at least unify the resolutions of different fundus images into a second resolution;

[0159] Performing color space conversion on the second preprocessed fundus image to form a second grayscale image;

[0160] Analyzing and determining the color component ranges of different colors in the second grayscale image;

[0161] Calculate and determine the number of pixels under each color component and the number of pixels of the fundus image;

[0162] The chromaticity distribution of the fundus image is calculated based on the number of pixels under each color component and the number of pixels of the fundus image.

[0163] In some embodiments, the analyzing and determining the color component ranges of different colors in the second grayscale image includes:

[0164] The color component ranges of red, orange, yellow, green and blue in the second grayscale image are analyzed and determined.

[0165] In some embodiments, the apparatus further comprises:

[0166] A first training module is used to train an initial model based on the fundus image and the corresponding clarity and chromaticity distribution as training data, so as to obtain a fundus image analysis model for analyzing and calculating the clarity and chromaticity distribution of the fundus image;

[0167] The performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes:

[0168] Performing a first analysis process on the fundus image based on the fundus image analysis model to calculate and determine the clarity of the fundus image;

[0169] The performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes:

[0170] A second analysis process is performed on the fundus image based on the fundus image analysis model to calculate and determine the chromaticity distribution of the fundus image.

[0171] In some embodiments, the apparatus further comprises:

[0172] Construction module, used to build the initial model based on the cycleGAN model;

[0173] The second acquisition module is used to obtain the fundus grayscale images of ordinary people and the fundus grayscale images of different cataract patients as training data;

[0174] A second training module is used to train the initial model based on the training data to obtain a candidate model, wherein the candidate model is used to learn the style of the fundus grayscale image of the cataract patient and is capable of transferring the style of the fundus grayscale image to the fundus grayscale image of an ordinary person, so as to process and form a target fundus grayscale image having the style of the fundus grayscale image of the cataract patient;

[0175] The updating module is used to compare the target fundus grayscale image with the corresponding fundus grayscale image of a cataract patient, and update the weight parameters in the candidate model based on the comparison result to obtain a target model with a higher processing accuracy than the candidate model.

[0176] In some embodiments, performing style transfer processing on the target scene image based on the fundus image to form a blurred version of the target scene image includes:

[0177] Performing color space conversion on the fundus image to form a third grayscale image;

[0178] Processing the target scene image to form a single-channel image, wherein the single-channel image includes a red channel image, a green channel image, and a blue channel image;

[0179] Convert the single-channel image into a grayscale image by performing a color space conversion.

[0180] Inputting the single-channel grayscale image and the third grayscale image into the target model to obtain a fuzzy single-channel grayscale image that matches the style of the third grayscale image;

[0181] The blurred single-channel grayscale images are merged to form a blurred version of the target scene image.

[0182] In some embodiments, the processing based on the clarity, chromaticity distribution and blurred version of the scene picture to form a simulated picture for simulating the real imaging result when the patient looks at the target scene includes:

[0183] The clarity and chromaticity of the blurred version of the scene image are adjusted based on the clarity and chromaticity distribution, thereby forming a simulated image that simulates the real imaging result when the patient looks at the target scene.

[0184] Another embodiment of the present invention further provides an electronic device, including:

[0185] at least one processor; and,

[0186] a memory communicatively coupled to the at least one processor;

[0187] The memory stores instructions executable by the at least one processor, and the instructions are configured to execute the fundus image processing method as described in any one of the embodiments above.

[0188] Another embodiment of the present invention further provides a storage medium, which includes a stored program, wherein when the program is executed, a device including the storage medium is controlled to execute the fundus image processing method as described in any one of the above embodiments.

[0189] The embodiment of the present invention also provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions, and when the computer-executable instructions are executed, at least one processor executes a fundus image processing method such as in the embodiment described above. It should be understood that each solution in this embodiment has the corresponding technical effect in the above method embodiment, which will not be repeated here.

[0190] It should be noted that the computer storage medium of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, antenna, optical cable, RF, etc., or any suitable combination of the above.

[0191] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0192] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.

Claims

1. A fundus image processing method, characterized in that: include: obtaining a fundus image, wherein the fundus image includes a fundus image of a cataract patient; Performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image; Performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image; Get a clear picture of the target scene; Performing style migration processing on the target scene image based on the fundus image to form a blurred version of the target scene image; Processing the blurred version of the scene image based on the clarity and chromaticity distribution to form a simulated image for simulating the imaging effect when the patient looks at the target scene, wherein the simulated image is a color image; The method further comprises: Build an initial model based on the cycleGAN model; Obtain fundus grayscale images of ordinary people and fundus grayscale images of different cataract patients as training data; Training the initial model based on the training data to obtain a candidate model, wherein the candidate model is used to learn the style of the fundus grayscale image of the cataract patient, and is capable of transferring the style of the fundus grayscale image of the cataract patient to the fundus grayscale image of an ordinary person, so as to process and form a target fundus grayscale image having the style of the fundus grayscale image of the cataract patient; Comparing the target fundus grayscale image with the corresponding fundus grayscale image of a cataract patient, and updating the weight parameters in the candidate model based on the comparison result to obtain a target model with a higher processing accuracy than the candidate model; The performing style transfer processing on the target scene picture based on the fundus image to form a blurred version of the target scene picture includes: Performing color space conversion on the fundus image to form a third grayscale image; Processing the target scene image to form a single-channel image, wherein the single-channel image includes a red channel image, a green channel image, and a blue channel image; Convert the single-channel image into a grayscale image by performing a color space conversion. Inputting the single-channel grayscale image and the third grayscale image into the target model to obtain a fuzzy single-channel grayscale image that matches the style of the third grayscale image; The blurred single-channel grayscale images are merged to form a blurred version of the target scene image.

2. The fundus image processing method according to claim 1, characterized in that: The performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes: Performing a first preprocessing on the fundus images to at least unify the resolutions of different fundus images into a first resolution; Performing color space conversion on the first preprocessed fundus image to form a first grayscale image; intercepting a region including blood vessels and optic disc texture in the first grayscale image to form a first target image; Performing Gaussian blur processing on the first target image to form a second target image; Performing edge detection on the second target image, and counting the number of pixels whose pixel values ​​meet the requirements based on the detection result; The clarity of each fundus image is calculated based on the number of pixels and the total number of pixels of the fundus image.

3. The fundus image processing method according to claim 1, characterized in that: The performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes: Performing a second preprocessing on the fundus images to at least unify the resolutions of different fundus images into a second resolution; Performing color space conversion on the second preprocessed fundus image to form a second grayscale image; Analyzing and determining the color component ranges of different colors in the second grayscale image; Calculate and determine the number of pixels under each color component and the number of pixels of the fundus image; The chromaticity distribution of the fundus image is calculated based on the number of pixels under each color component and the number of pixels of the fundus image.

4. The fundus image processing method according to claim 3, characterized in that: The analyzing and determining the color component ranges of different colors in the second grayscale image includes: The color component ranges of red, orange, yellow, green and blue in the second grayscale image are analyzed and determined.

5. The fundus image processing method according to claim 1, characterized in that: The method further comprises: Training an initial model based on the fundus image and the corresponding clarity and chromaticity distribution as training data to obtain a fundus image analysis model for analyzing and calculating the clarity and chromaticity distribution of the fundus image; The performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image includes: Performing a first analysis process on the fundus image based on the fundus image analysis model to calculate and determine the clarity of the fundus image; The performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image includes: A second analysis process is performed on the fundus image based on the fundus image analysis model to calculate and determine the chromaticity distribution of the fundus image.

6. The fundus image processing method according to claim 1, characterized in that: The processing of the blurred version of the scene image based on the clarity and chromaticity distribution to form a simulated image for simulating the imaging effect when the patient looks at the target scene includes: The clarity and chromaticity of the blurred version of the scene image are adjusted based on the clarity and chromaticity distribution, thereby forming a simulated image for simulating the imaging effect when the patient looks at the target scene.

7. An image data processing device, characterized in that: include: A first acquisition module is used to obtain a fundus image, wherein the fundus image includes a fundus image of a cataract patient; A first processing module, used for performing a first analysis process on the fundus image to calculate and determine the clarity of the fundus image; A second processing module, used for performing a second analysis process on the fundus image to calculate and determine the chromaticity distribution of the fundus image; The second acquisition module is used to obtain a clear target scene image; A third processing module is used to perform style migration processing on the target scene image according to the fundus image to form a blurred version of the target scene image; A fourth processing module, used for processing according to the clarity, chromaticity distribution and blurred version of the scene picture to form a simulated picture for simulating the imaging effect when the patient looks at the target scene, wherein the simulated picture is a color picture; The device also includes: The construction module is used to build the initial model based on the cycleGAN model; The second acquisition module is also used to obtain the fundus grayscale images of ordinary people and the fundus grayscale images of different cataract patients as training data; a second training module, for training the initial model according to the training data to obtain a candidate model, wherein the candidate model is used to learn the style of the fundus grayscale image of the cataract patient and is capable of transferring the style of the fundus grayscale image of the cataract patient to the fundus grayscale image of an ordinary person, so as to process and form a target fundus grayscale image having the style of the fundus grayscale image of the cataract patient; An updating module, used for comparing the target fundus grayscale image with the corresponding fundus grayscale image of a cataract patient, and updating the weight parameters in the candidate model based on the comparison result to obtain a target model with a higher processing accuracy than the candidate model; The performing style transfer processing on the target scene picture according to the fundus image to form a blurred version of the target scene picture includes: Performing color space conversion on the fundus image to form a third grayscale image; Processing the target scene image to form a single-channel image, wherein the single-channel image includes a red channel image, a green channel image, and a blue channel image; Convert the single-channel image into a grayscale image by performing a color space conversion. Inputting the single-channel grayscale image and the third grayscale image into the target model to obtain a fuzzy single-channel grayscale image that matches the style of the third grayscale image; The blurred single-channel grayscale images are merged to form a blurred version of the target scene image.

8. An electronic device comprising: at least one processor; as well as, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are configured to execute the fundus image processing method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Fundus image evaluation method based on fusion of digital twin and optic nerve imaging

    CN119251229B