Eye fundus image-based diabetic retinopathy small focus detection method and system
Through the detection method of small lesions of diabetic retinopathy based on fundus images, the traditional detection is solved by the problem of time-consuming and labor-intensive testing and relying on doctors' experience, and fast and accurate lesion detection and real-time feedback are achieved, which improves detection efficiency and visualization of results.
Patent Information
- Application Number
- CN202510416783.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-18
AI Technical Summary
Traditional fundus lesions detection relies on manual examinations by doctors, which are time-consuming and labor-intensive, and are affected by doctors’ experience and subjective judgments. It lacks real-time feedback and guidance, and cannot provide feedback and reminders of the subject’s eye behavior. Data processing is usually carried out after the examination, and patients need to wait to obtain the results.
The detection method of small lesions of diabetic retinopathy based on fundus images is adopted, including image preprocessing, feature extraction and small lesions detection and postprocessing stages. Grayscale processing is performed using weighted average method, median filtering and Gaussian filtering to remove noise, histogram equalization enhances contrast, feature extraction and detection is combined with support vector machine (SVM), random forest (RF) and convolutional neural network (CNN). False positives are removed in the postprocessing stage, and the results are visualized and stored in the database.
It realizes rapid and accurate fundus lesions detection, reduces dependence on doctors' experience, provides real-time feedback and guidance, improves detection efficiency, and facilitates doctors to view and review subsequent cases.
Smart Images

Figure CN120339698A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical detection, and specifically to a method and system for detecting small lesions of diabetic retinopathy based on fundus images. Background Art
[0002] The most common early clinical manifestations of diabetic retinopathy include microaneurysm formation and intraretinal hemorrhage. Microvascular damage leads to retinal capillary non-perfusion, cotton wool spots, an increased number of hemorrhages, venous abnormalities, and intraretinal microvascular abnormalities (IRMA). At this stage, increased vascular permeability leads to retinal thickening (edema) and / or exudate, resulting in a decrease in central vision. The proliferative stage leads to neovascular proliferation on the optic disc, retina, iris, and filtration angle. It can be diagnosed through ophthalmoscopy or fundus color photography.
[0003] Traditional fundus lesion detection usually relies on manual examination and diagnosis by doctors, which is not only time-consuming and laborious, but may also be affected by doctors' experience and subjective judgment, and lacks a real-time feedback and guidance mechanism, unable to provide feedback and reminders on the eye behavior of the tested person. Data processing is usually carried out after the examination, and patients need to wait to obtain the results. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the present invention provides a method and system for detecting small lesions of diabetic retinopathy based on fundus images, which solves the problems described above.
[0005] The present invention provides the following technical solutions: A method for detecting small lesions of diabetic retinopathy based on fundus images, the detection method includes image preprocessing, feature extraction and small lesion detection, and post-processing stages; the image preprocessing includes: grayscale processing, fundus images are usually color, but in order to simplify subsequent calculations and highlight structures such as blood vessels and lesions, grayscale processing is first performed. For RGB color images, the weighted average method can be used to convert them into grayscale images, Gray = 0.299R + 0.587G + 0.114B, where R, G, and B are the pixel values of the red, green, and blue channels respectively;
[0006] Noise removal: Fundus images may contain Gaussian noise, salt-and-pepper noise, etc. Median filtering can be used to remove salt-and-pepper noise. It is a non-linear filtering technique that replaces the value of the central pixel with the median value of the pixels in the neighborhood. For Gaussian noise, Gaussian filtering can be used, which calculates the new value of each pixel according to the Gaussian function, and its kernel function formula is where σ is the standard deviation, and (x, y) is the position of the pixel in the kernel.
[0007] Contrast Enhancement: To better observe the lesion area, histogram equalization can be used to enhance the image contrast. It redistributes the gray levels of the image, making the image histogram more uniform, enhancing the details and contrast of the image.
[0008] Preferably, the feature extraction includes blood vessel feature extraction and lesion area feature extraction. The blood vessel feature extraction: Diabetic retinopathy is often accompanied by changes in retinal blood vessels. A method based on matched filtering can be used to extract blood vessel features. Design a Gaussian-shaped filter whose size and direction match the shape and orientation of the blood vessels. By sliding the filter on the image and calculating the filter response, the position and direction of the blood vessels can be detected.
[0009] Preferably, the lesion area feature extraction includes color features and texture features. The color features: The lesion area may differ in color from normal retinal tissue. Microaneurysms usually appear as small red dots, and the bleeding area has a darker color. Color histogram features can be extracted to count the pixel distribution in different color channels.
[0010] The texture features: The texture of the lesion area may be different from that of the normal area. The gray-level co-occurrence matrix (GLCM) can be used to extract texture features such as contrast, correlation, energy, and entropy. GLCM is constructed by calculating the joint gray-level distribution of pixel pairs at specific distances and directions in the image. Based on this, various texture feature parameters can be obtained to describe the texture characteristics of the lesion area.
[0011] Preferably, the small lesion detection includes Support Vector Machine (SVM), Random Forest (RF), and Convolutional Neural Network (CNN). The Support Vector Machine (SVM): Taking the extracted features as input, training an SVM classifier to distinguish between lesion and non-lesion areas. The basic idea of SVM is to find an optimal hyperplane to separate data of different classes. For a binary classification problem (lesion and non-lesion), the following optimization problem can be solved to determine the hyperplane: subject to y i (w·x i +b)≥1, where w is the normal vector of the hyperplane, b is the bias term, xi is the feature vector, and yi is the corresponding class label.
[0012] Preferably, the Random Forest (RF): RF is an ensemble learning method composed of multiple decision trees. Each decision tree is trained based on a random subset of the training data, and finally, the final classification result is determined by voting, etc. In small lesion detection, it can effectively handle the complex relationships between features and reduce overfitting.
[0013] Preferably, the convolutional neural network CNN: construct a suitable CNN architecture, such as U-Net, Res-Net, etc. for small lesion detection. The CNN automatically extracts image features through the convolutional layer, reduces the data dimension through the pooling layer, and classifies through the fully connected layer. For example, in the U-Net architecture, it has a contracting path for feature extraction and an expanding path for upsampling and restoring the image resolution, so as to achieve accurate positioning and classification of small lesions.
[0014] Preferably, the post-processing stage includes false positive removal and result visualization. The false positive removal: Since the detection algorithm may produce some false positive results, post-processing is required to remove them. The results can be screened according to prior knowledge such as the size, shape, and position of the lesion area. For example, if the detected "lesion area" is too small and does not conform to the geometric characteristics of normal lesions, it may be a misjudgment and should be excluded.
[0015] The result visualization: Mark the detected small lesions on the original fundus image, for example, circle the lesion area with a red circle, so that doctors can view and diagnose more intuitively.
[0016] A small lesion detection system for diabetic retinopathy based on fundus images includes an image acquisition module, an image processing and analysis module, and a result display and storage module. The image acquisition module is responsible for obtaining high-quality fundus images.
[0017] Preferably, the image processing and analysis module is responsible for implementing the above functions such as image preprocessing, feature extraction, small lesion detection, and post-processing.
[0018] Preferably, the result display and storage module is responsible for displaying the detection results and storing data.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] 1. It is realized through software programming. For example, use the Python programming language combined with the OpenCV library for image preprocessing and basic feature extraction operations, and use deep learning frameworks such as TensorFlow or PyTorch to build and train a CNN model for rapid small lesion detection; display the fundus image marked with small lesions on the screen for doctors to view. At the same time, store the detection results and relevant data (such as lesion characteristics, positions, etc.) in the database for subsequent case review and research. A database such as MySQL can be used to store data, and the results can be displayed through a graphical user interface (GUI).
[0021] 2. An ophthalmic fundus camera is usually used to collect images. The principle is to focus the reflected light from the fundus onto an imaging sensor through an optical system. This ophthalmic fundus camera can have different imaging modes, such as color imaging and fluorescence imaging, etc., providing basic data for subsequent detection to assist doctors in quickly screening out cases that require further examination. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic flow diagram of the method for detecting small lesions of diabetic retinopathy based on fundus images of the present invention;
[0023] Figure 2 It is a system diagram of the method for detecting small lesions of diabetic retinopathy based on fundus images of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0025] Please refer to Figure 1 - Figure 2 , for the method for detecting small lesions of diabetic retinopathy based on fundus images, the detection method includes image preprocessing, feature extraction and small lesion detection, and post - processing stages; Image preprocessing includes: Grayscale processing, fundus images are usually in color, but to simplify subsequent calculations and highlight structures such as blood vessels and lesions, grayscale processing is first performed. For RGB color images, the weighted average method can be used to convert them into grayscale images, Gray = 0.299R + 0.587G + 0.114B, where R, G, and B are the pixel values of the red, green, and blue channels respectively;
[0026] Noise removal: Fundus images may contain Gaussian noise, salt - and - pepper noise, etc. Median filtering can be used to remove salt - and - pepper noise. It is a non - linear filtering technique that replaces the value of the central pixel with the median value of the pixels in the neighborhood. For Gaussian noise, Gaussian filtering can be used, which calculates the new value of each pixel according to the Gaussian function, and its kernel function formula is where σ is the standard deviation, and (x, y) is the position of the pixel in the kernel.
[0027] Contrast enhancement: To better observe the lesion area, histogram equalization can be used to enhance the image contrast. It redistributes the gray levels of the image to make the histogram of the image more uniform, enhancing the details and contrast of the image.
[0028] Furthermore, feature extraction includes blood vessel feature extraction and lesion area feature extraction. Blood vessel feature extraction: Diabetic retinopathy is often accompanied by changes in retinal blood vessels. A method based on matched filtering can be used to extract blood vessel features. Design a Gaussian-shaped filter whose size and direction match the shape and orientation of the blood vessels. By sliding this filter on the image and calculating the filter response, the position and direction of the blood vessels can be detected.
[0029] Furthermore, lesion area feature extraction includes color features and texture features. Color features: The lesion area may differ in color from normal retinal tissue. Microaneurysms usually appear as small red dots, and the bleeding area has a darker color. Color histogram features can be extracted to count the pixel distribution in different color channels.
[0030] Texture features: The texture of the lesion area may be different from that of the normal area. The gray-level co-occurrence matrix (GLCM) can be used to extract texture features such as contrast, correlation, energy, and entropy. GLCM is constructed by calculating the joint gray-level distribution of pixel pairs at specific distances and directions in the image. Based on this, various texture feature parameters can be obtained to describe the texture characteristics of the lesion area.
[0031] Furthermore, small lesion detection includes support vector machine (SVM), random forest (RF), and convolutional neural network (CNN). Support vector machine (SVM): Use the extracted features as input and train an SVM classifier to distinguish between lesion and non-lesion areas. The basic idea of SVM is to find an optimal hyperplane to separate data of different classes. For example, for a binary classification problem (lesion and non-lesion), subject to y i (w·x i +b)≥1, where w is the normal vector of the hyperplane, b is the bias term, xi is the feature vector, and yi is the corresponding class label.
[0032] Furthermore, random forest (RF): RF is an ensemble learning method composed of multiple decision trees. Each decision tree is trained based on a random subset of the training data, and finally, the final classification result is determined through voting, etc. In small lesion detection, it can effectively handle the complex relationships between features and reduce overfitting.
[0033] Furthermore, convolutional neural network (CNN): Construct a suitable CNN architecture such as U-Net, Res-Net, etc. for small lesion detection. CNN automatically extracts image features through convolutional layers, reduces the data dimension through pooling layers, and performs classification through fully connected layers. For example, in the U-Net architecture, it has a contracting path for feature extraction and an expanding path for upsampling and restoring the image resolution, thus achieving precise localization and classification of small lesions.
[0034] Furthermore, the post - processing stage includes false - positive removal and result visualization. False - positive removal: Since the detection algorithm may produce some false - positive results, post - processing is required to remove them. The results can be screened based on prior knowledge such as the size, shape, and location of the lesion area. For example, if the detected "lesion area" is too small and does not conform to the geometric characteristics of a normal lesion, it may be a misjudgment and should be excluded.
[0035] Result visualization: Mark the detected small lesions on the original fundus image. For example, circle the lesion area with a red circle so that doctors can view and diagnose more intuitively.
[0036] The small - lesion detection system for diabetic retinopathy based on fundus images includes an image acquisition module, an image processing and analysis module, and a result display and storage module. It is characterized in that: The image acquisition module is responsible for obtaining high - quality fundus images.
[0037] In this embodiment, a fundus camera is usually used to collect images. Its principle is to focus the reflected light from the fundus onto the imaging sensor through an optical system. The fundus camera can have different imaging modes, such as color imaging and fluorescence imaging, etc., providing basic data for subsequent detection.
[0038] Furthermore, the image processing and analysis module is responsible for implementing the above - mentioned functions of image pre - processing, feature extraction, small - lesion detection, and post - processing.
[0039] In this embodiment, it can be implemented through software programming. For example, use the Python programming language combined with the OpenCV library for image pre - processing and basic feature extraction operations, and use deep - learning frameworks such as TensorFlow or PyTorch to build and train a CNN model for small - lesion detection.
[0040] Furthermore, the result display and storage module is responsible for displaying the detection results and storing data.
[0041] In this embodiment, the fundus image marked with small lesions is displayed on the screen for doctors to view. At the same time, the detection results and relevant data (such as lesion characteristics, location, etc.) are stored in a database for subsequent case review and research. A database such as MySQL can be used to store data, and the results are displayed through a graphical user interface (GUI).
[0042] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "axial", "radial", "circumferential", etc. are based on the orientation or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation on the present invention.
[0043] In addition, the terms "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, the meaning of "a plurality" is two or more unless otherwise specifically defined.
[0044] In the present invention, unless otherwise clearly defined and limited, the terms such as "mounted", "connected", "coupled", "fixed", etc. shall be construed in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection, an electrical connection, or a communication connection; it may be directly connected, or indirectly connected through an intermediate medium, and it may be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention may be understood according to specific circumstances.
[0045] In the present invention, unless otherwise clearly defined and limited, the first feature being "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. In the description of this specification, the description with reference to terms such as "one solution", "some solutions", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the solution or example are included in at least one solution or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same solution or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more solutions or examples in a suitable manner.
[0046] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting small lesions of diabetic retinopathy based on fundus images, characterized in that, The detection method includes image preprocessing, feature extraction, small lesion detection, and post-processing stages; the image preprocessing includes: grayscale processing. Fundus images are usually colored, but to simplify subsequent calculations and highlight structures such as blood vessels and lesions, grayscale processing is first performed. For RGB color images, the weighted average method can be used to convert them into grayscale images, Gray = 0.299R + 0.587G + 0.114B, where R, G, and B are the pixel values of the red, green, and blue channels respectively. Noise Removal: Fundus images may contain Gaussian noise, salt-and-pepper noise, etc. Median filtering can be used to remove salt-and-pepper noise. It is a non-linear filtering technique that replaces the value of the central pixel with the median value of the pixels in the neighborhood. For Gaussian noise, Gaussian filtering can be used, which calculates the new value of each pixel according to the Gaussian function. Its kernel function formula is where σ is the standard deviation and (x, y) is the position of the pixel in the kernel. Contrast enhancement: To better observe the lesion area, histogram equalization can be used to enhance the image contrast. It redistributes the gray levels of the image, making the histogram of the image more uniform, enhancing the details and contrast of the image.
2. The method for detecting small lesions of diabetic retinopathy based on fundus images according to claim 1, wherein: The feature extraction includes blood vessel feature extraction and lesion area feature extraction. The blood vessel feature extraction: Diabetic retinopathy is often accompanied by changes in retinal blood vessels. A method based on matched filtering can be used to extract blood vessel features. Design a Gaussian-shaped filter whose size and direction match the shape and orientation of the blood vessels. By sliding this filter on the image and calculating the filter response, the position and direction of the blood vessels can be detected.
3. The method for detecting small lesions of diabetic retinopathy based on fundus images according to claim 2, wherein: The lesion area feature extraction includes color features and texture features. The color features: The lesion area may differ in color from normal retinal tissue. Microaneurysms usually appear as small red dots, and the bleeding area has a darker color. Color histogram features can be extracted to count the pixel distribution in different color channels. The texture features: The texture of the lesion area may be different from that of the normal area. The gray-level co-occurrence matrix (GLCM) can be used to extract texture features such as contrast, correlation, energy, and entropy. GLCM is constructed by calculating the joint gray-level distribution of pixel pairs at specific distances and directions in the image. Based on this, various texture feature parameters can be obtained to describe the texture characteristics of the lesion area.
4. The method for detecting small lesions of diabetic retinopathy based on fundus images according to claim 1, wherein: The small lesion detection includes Support Vector Machine (SVM), Random Forest (RF) and Convolutional Neural Network (CNN). For the Support Vector Machine (SVM), the extracted features are used as input, and an SVM classifier is trained to distinguish between lesion and non-lesion regions. The basic idea of SVM is to find an optimal hyperplane to separate data of different classes. For a binary classification problem (lesion and non-lesion), the hyperplane can be determined by solving the following optimization problem: subject to y i (w·x i +b)≥1, where w is the normal vector of the hyperplane, b is the bias term, xi is the feature vector, and yi is the corresponding class label.
5. The method for detecting small lesions of diabetic retinopathy based on fundus images according to claim 4, characterized in that: The random forest (RF): RF is an ensemble learning method composed of multiple decision trees. Each decision tree is trained based on a random subset of the training data, and finally, the final classification result is determined through voting and other methods. In small lesion detection, it can effectively handle the complex relationships between features and reduce overfitting.
6. The method for detecting small lesions of diabetic retinopathy based on fundus images according to claim 4, wherein: The convolutional neural network (CNN): Construct a suitable CNN architecture, such as U-Net, Res-Net, etc., for small lesion detection. CNN automatically extracts image features through convolutional layers, reduces the data dimension through pooling layers, and performs classification through fully connected layers. For example, in the U-Net architecture, it has a contracting path for feature extraction and an expanding path for upsampling and restoring the image resolution, thereby achieving accurate localization and classification of small lesions.
7. The method for detecting small lesions of diabetic retinopathy based on fundus images according to claim 1, wherein: The post-processing stage includes false positive removal and result visualization. The false positive removal: Since the detection algorithm may produce some false positive results, post-processing is required to remove them. The results can be screened according to prior knowledge such as the size, shape, and position of the lesion area. For example, if the detected "lesion area" is too small and does not conform to the geometric characteristics of normal lesions, it may be a misjudgment and should be excluded. The result visualization: Mark the detected small lesions on the original fundus image, for example, circle the lesion area with a red circle, so that doctors can view and diagnose more intuitively.
8. The small lesion detection system for diabetic retinopathy based on fundus images according to any one of claims 1-7, comprising an image acquisition module, an image processing and analysis module, and a result display and storage module, characterized in that: The image acquisition module is responsible for obtaining high-quality fundus images.
9. The small lesion detection system for diabetic retinopathy based on fundus images according to claim 8, characterized in that: The image processing and analysis module is responsible for implementing the above functions such as image preprocessing, feature extraction, small lesion detection, and post-processing.
10. The small lesion detection system for diabetic retinopathy based on fundus images according to claim 8, characterized in that: The result display and storage module is responsible for displaying the detection results and storing data.