figure a

Introduction

Diabetic retinopathy (DR) is the primary cause of blindness globally, with 80% of diabetic people developing DR within 20 years after diagnosis [1-4]. The efficacy of appropriate treatment options such as laser therapy or intravitreal injections of anti-vascular endothelial growth factors in diabetic retinopathy is contingent on early detection, remarkably when the retinopathy has progressed to the point where intervention is essential [1,5-10].

In order to distinguish proliferative diabetic retinopathy (PDR) from non-proliferative diabetic retinopathy (NPDR), fluorescein angiography (FA) is currently the gold standard for investigating a variety of characteristics of PDR [3, 4, 11,12]. FA, on the other hand, is a relatively invasive procedure that requires intravenous fluorescein dye injection and is associated with several concerns, including nausea, vomiting, itching, urticaria, and even anaphylaxis [11-13]. Optical coherence tomography angiography (OCTA) provides depth-resolved images of the retinal vascular structure, allowing for the differentiation of the superficial and deep capillary plexus layers of the retina, a phenomenon that FA is unable to detect due to the superimposition of the superficial capillary plexus over the deep capillary plexus. However, drawbacks of current OCTA devices, such as a limited field of view compared to FA and inability to detect vascular leakage, have hampered the use of OCTA as a reliable way to distinguish different stages of DR [11-15].

In recent years, many automated approaches based on machine learning or deep learning techniques have been developed to differentiate several stages of diabetic retinopathy. The classification models presented to date have been trained and tested using imperfect ground truths created using traditional fundus images rather than FA [15-28].

In the current study, we present a machine learning–based method to differentiate PDR from NPDR automatically from the OCTA vascular density maps with more accurate ground truths using FA images of patients.

Materials and methods

The Farabi Eye Hospital at Tehran University of Medical Sciences, Iran, provided the dataset for this research. The study was also authorized by the institutional review board of Tehran University of Medical Sciences (IR.TUMS.REC.1399.019) and followed the Declaration of Helsinki’s principles. The patients all provided written informed consent.

An RTVue XR 100 Avanti device (Version 2017.1.0.151, Optovue, Inc., Fremont, CA, USA) was used to obtain 6 × 6-mm2 macular OCTA images of patients with varying stages of diabetic retinopathy between 8:00 and 12:00 a.m. All patients underwent fluorescein angiography (Heidelberg Engineering, Heidelberg, Germany) at baseline for the staging of the DR. Two retina experts (H. R. E. and E. K. P.) assessed the results of fundus exams and fluorescein angiography images of patients and determined the stage of the retinopathy by consensus. Individuals with neovascularization at the disc (NVD) and/or neovascularization elsewhere (NVE) in fundus exams and FA were categorized as PDR, while the others were classified as NPDR. Afterward, according to this consensus-based labelling of patients, all corresponding OCTA images of patients were labelled as NPDR or PDR.

The exclusion criteria were the presence of exudate and fibrovascular proliferation in the macular area, other macular diseases (like age-related macular degeneration or macular dystrophies and vitreomacular interface disorders), uveitis, uncontrolled glaucoma, severe media opacity, visual acuity of less than 20/200, and refractive error >  + 3 and <  − 3. Those having a history of previous PRP, macular photocoagulation, intravitreal anti-VEGF injections, or intraocular surgery except for cataract extraction were also excluded. Low-quality images (signal strength index (SSI) less than 40 according to built-in RTVue software quality assessment report) were omitted from the study. Images with different artifacts (including movement, shadow, decentration artifacts, and defocus) preventing accurate determination of the superficial and deep capillary plexuses and FAZ area were excluded.

In each OCTA printout, 333 \(\times\) 333-pixel images of vascular density maps at three levels, superficial capillary plexus (SCP), deep capillary plexus (DCP), and total retina (Retina) were cropped.

Examples of vascular density maps from three levels of SCP, DCP, and Retina employed in this experiment for two patients in the NPDR and PDR groups are depicted in Fig. 1. Cold hues indicate regions of decreased perfusion in each vascular density map.

Fig. 1
figure 1

Vascular density maps of two patients in NPDR and PDR groups; top row represents a NPDR patient. (a) The vascular density map in superficial capillary plexus (SCP), (b) the vascular density map in deep capillary plexus (DCP), and (c) the vascular density map in total retinal layer (Retina). Additionally, the bottom row contains (d) vascular density map in SCP, (e) vascular density map in DCP, and (f) vascular density map in total retinal layer for a PDR class

Pre-processing

After cropping the original vascular density map images, we attempted to extract each image features using Gabor-based filters that enabled us to estimate the image’s content to differentiate NPDR images from PDR.

After applying the Gabor’s filter to the images, we acquired approximately 65,000 features from each image, which was a significant quantity, and we need to choose the relevant features to accurately classify images as NPDR or PDR. As a result, we employed neighborhood component analysis (NCA), a non-parametric supervised technique for feature selection that is based on an improved K-nearest neighbor (KNN) algorithm [29]. This strategy offers a higher positive weight to the most significant features, which are often located in the blue sections of vascular density maps, and reduces our feature set to 50 appropriate features for each vascular density map image.

Classification of PDR and NPDR

After the pre-processing stage, to classify the images as NPDR or PDR, we used a supervised machine learning based algorithm known as the support vector machine (SVM) classifier with radial basis function (RBF) kernel [30]. To reach the most accuracy in classification, we optimized the SVM using the genetic evolutionary algorithm to determine the optimal parameters of the classifier [31]. To find a hyperplane in an N-dimensional space, the goal of the SVM algorithm is to find one that clearly separates the data points from each other.

To evaluate the accuracy of the algorithm, we assessed it in three different models:

  1. A)

    Model 1: feature extraction with Gabor filter and classification with simple SVM.

  2. B)

    Model 2: feature extraction with Gabor filter and classification with SVM improved by genetic algorithm.

  3. C)

    Model 3: feature extraction with Gabor filter, feature selection, and classification with SVM improved by genetic algorithm.

To test the suggested model’s performance, we calculated the accuracy, precision, recall, and F-measure using the following equations (Eqs. (1)–(4)):

$$Accuracy\mathit=\mathit{\left(\frac{N_{TP}+N_{TN}}{N_{TP}+N_{FN}+N_{TN}+N_{FP}}\right)}$$
(1)
$$Precision\mathit=\frac{{\mathit N}_{\mathit T\mathit P}}{{\mathit N}_{\mathit T\mathit P}\mathit+{\mathit N}_{\mathit F\mathit P}}$$
(2)
$$Recall\mathit=\frac{{\mathit N}_{\mathit T\mathit P}}{{\mathit N}_{\mathit T\mathit P}\mathit+{\mathit N}_{\mathit F\mathit N}}$$
(3)
$$F_{\mathit m\mathit e\mathit a\mathit s\mathit u\mathit r\mathit e}\mathit=\frac{\mathit{\left({2\times Precision\times Recall}\right)}}{\mathit{\left({Precision+Recall}\right)}}$$
(4)

In these equations, NTP is the number of true positives, NTN is the number of true negatives, NFP is the number of false positives, and NFN is the number of false negatives in differentiating NPDR from PDR.

We applied our models to images of the vascular density map in three different layers (SCP, DCP, and Retina) to determine which layer is more accurate in identifying PDR and NPDR and also to evaluate the performance of the three mentioned models in each layer of vascular density maps.

In this experiment, we used the stratified cross-validation method to evaluate the proposed model, and for this purpose, we selected 10% of the patients as test data and used the rest of the patients for the training data. Then, we constructed the model using classified ten-fold cross-validation, and after that, we assessed the model using test data.

Statistical analysis

The following tests were used to compare various variables and characteristics between the two groups. For continuous quantity variables such as age and BCVA, the independent t-test was utilized. The categorical factors were determined using Chi-square test: gender, type of diabetic retinopathy, and left and right affected eye. When P < 0.05 was assumed to be significant, the findings were considered statistically significant. All statistical analyses were conducted in R, a statistical programming language (R version 3.1.3; e Foundation for Statistical Computing, Vienna, Austria).

Results

Among 89 patients, 148 eyes from 78 patients were included in this study based on the inclusion and exclusion criteria (NPDR = 103 eyes, including mild and moderate NPDR = 33 eyes and severe NPDR = 70 eyes and PDR (45 eyes)). The mean age of participants was 56 ± 10.8 (range: 44–71 years) and 79 (53.4%) were male. Table 1 demonstrates the baseline characteristics of participants.

Table 1 The demographic data of patients enrolled in the current study

Table 2 shows the results of the implementation of the three mentioned models in vascular density maps of three retinal layers (SCP, DCP, and Retina) in classifying PDR and NPDR. Model 3 showed the best performance in all vascular density map images to classify PDR and NPDR with more than 85% accuracy in all layers. This model demonstrated a 90% accuracy in discriminating between PDR and NPDR in deep retinal layer vascular density maps.

Table 2 Classification accuracy was determined using all three models for the three layers of retinal vascular density maps

Figure 2 and Table 3 illustrate the accuracy, precision, recall, and F-measure of model 3 (feature extraction with Gabor filter, feature selection, and classification with SVM improved by genetic algorithm) for categorizing PDR and NPDR in vascular density maps of DCP retinal layer.

Fig. 2
figure 2

The mean accuracy of model 3 in vascular density maps of DCP for differentiating PDR from NPDR reached 0.895%, the mean of precision was 0.91, the mean of recall was 0.905, and finally, the mean of F-measure value was 0.9

Table 3 The accuracy, precision, recall, and F-measure of model 3 (feature extraction with Gabor filter, feature selection, and classification with SVM improved by genetic algorithm) with a 95% confidence interval for categorizing PDR and NPDR in vascular density maps of DCP layer

Figure 3 shows the receiver operating characteristic curve (ROC curve) of the proposed model 3 algorithm for detecting PDR and NPDR in OCT-A vascular density maps. In the figures shown, the performance of the proposed model is compared with other introduced models. The proposed method 3 performs much better than models 1 and 2. As a consequence, according to the area under the curve (AUC), the proposed model 3 (feature extraction with Gabor filter, feature selection, and classification with SVM improved by genetic algorithm) is capable of making better discrimination between PDR and NPDR based on vascular density maps of DCP layer.

Fig. 3
figure 3

The receiver operating characteristic curve (ROC curve) of the proposed models of the algorithm for detecting PDR and NPDR in OCT-A vascular density maps. The performance of the proposed model 3 (feature extraction with Gabor filter, feature selection, and classification with SVM improved by genetic algorithm) is compared with other methods. According to the area under the curve (AUC), the proposed model 3 is capable of making better discrimination between PDR and NPDR based on vascular density maps of all layers, especially DCP layer. SCP superficial capillary plexus, DCP deep capillary plexus

Discussion

We have presented a novel approach for discriminating patients with PDR from those with NPDR using OCTA images by employing SVM, a well-known machine learning algorithm. The best performing model (Model 3) showed the acceptable proficiency in vascular density map images to classify PDR and NPDR with more than 85% accuracy in all layers including SCP, DCP, and total retina. The mean accuracy of this model (model 3) in discriminating PDR from NPDR in vascular density maps of the DCP layer was highest and reached 90%.

OCTA, as a unique non-invasive dye-free imaging technique, visualizes microvascular structures across the retina, allowing for a thorough quantitative investigation of pathological vascular alterations. Due to the fact that DR is predominantly a disease of the retinal vasculature, OCTA can offer more instructional information than fundus photos and maybe a more appropriate imaging modality for automated categorization of DR, despite its smaller field of view [12-14].

The findings of the current study are consistent with previous deep learning classification studies using OCT and OCTA, which demonstrated that the detailed information extracted from OCT/OCTA images is sufficient to diagnose and classify DR at a level comparable to fundus photographs, despite a limited field of view in OCTA images [17-20, 24-28].

Regular DR screening is critical to implementing prompt therapy to avoid vision loss. Early intervention with glucose and blood pressure management can help to delay the course of DR, whereas intervention with photocoagulation or intravitreal injection can help to prevent vision loss [1, 3, 4, 32]. Although many ophthalmologists suggest routine DR screening, complete DR screening is not commonly undertaken due to limitations associated with the availability of human evaluators [33, 34]. Regular retinal screening is suggested at the community level as a cost-effective preventative intervention. Task shifting is one strategy that the public health community may use to confront this issue head on, allowing ophthalmologists to treat but not screen. Task shifting is the term used by the World Health Organization to refer to a process of delegation in which responsibilities are transferred to less skilled health professionals when appropriate. Recent data suggest that screening by healthcare staff with prior training in DR grading has a role [35, 36]. However, we continue to encounter inadequacies in their training and placement within the system. As a result, a diagnostic system that utilizes automated algorithms is necessary to assist with DR screening.

Machine learning and deep learning algorithms have recently enabled computers to learn from enormous datasets in ways that far exceed human skills. Numerous machine learning or deep learning algorithms have been created with excellent specificity and sensitivity for the categorization or diagnosis of certain disease states using medical images, including retinal imaging studies [15, 16, 21

Ophthalmologists frequently differentiate PDR from NPDR by finding abnormalities such as neovascularization over disc (NVD) or neovascularization elsewhere (NVE) during fundus examinations. However, fluorescein angiography is the gold standard diagnostic tool for detecting PDR [32, 43, 44]. Due to the invasive and costly nature of angiography, which not all patients are capable of performing, access to machine learning and artificial intelligence algorithms that can discriminate PDR patients from NPDR ones is critical. The power of these algorithms lies in their potential ability and accuracy to make connections not readily apparent to human investigators. These algorithms are especially beneficial in developing countries because the number of patients referred for regular diabetic retinopathy screening is significantly lower than in industrialized countries. Many of these patients with advanced PDR stages are directed to retinal clinics, where therapies at these stages are too expensive, and sometimes visual function cannot be recovered to a significant amount [45]. As a result, in this investigation, we attempted to evaluate the screening capability of a conventional machine learning algorithm on OCTA vascular density images of different retinal capillary plexuses to detect patients with PDR. Nearly 90% accuracy is considered satisfactory for identifying PDR individuals who require definitive treatments such as PRP or anti-VEGF injection.

Current machine learning and deep learning algorithms for DR screening have been primarily focused on identifying patients with referable DR (moderate NPDR or worse) or vision-threatening DR mostly based on fundus photos, implying that patients should be sent to ophthalmologists for treatment or additional follow-up [45]. One of their fundamental drawbacks is that they provide images in only two dimensions with no appreciation for depth, compared to OCTA imaging which provides quantifiable information about different capillary plexuses in different depths; therefore, it is possible to detect pathology with topological changes in vivo.

In the current study, we tried to detect patients with PDR in OCTA images as a group of patients that need to be treated as soon as possible. The following points explain why we chose to distinguish PDR from NPDR patients in this study: a subset of individuals with referable DR fall into the category of moderate to severe DR. In contrast to patients with PDR, these patients require periodic fundus examinations but may not require definite treatment especially in the absence of macular edema. On the other hand, the exclusion of patients with earlier stages of DR, such as moderate and severe NPDR, by subjective fundus examination or FA is prone to mistake, affecting the algorithm’s training, particularly in small sample size studies such as ours [33, 34]. However, the critical role of early detection of DR should not be overlooked. Early intervention to achieve optimal management of glucose, blood pressure, and lipid profiles has been shown to greatly delay the progression of DR and even restore moderate NPDR to a DR-free state [46].

As a consequence of our research, we discovered that the machine learning method performs better in isolating PDR patients using deep capillary plexus vascular density maps than using superficial or whole retinal layer vascular density maps. This means that DCP layer alterations in diabetic retinopathy are likely to be more noticeable as compared to changes in the superficial layers of the retina in these individuals. This has been established in prior investigations using OCTA in diabetic retinopathy patients [47,48,50]. Capillaries of DCP are likely to be terminal vessels and tend to be more sensitive than SCP to ischemic stress, similar to terminal capillaries in other organs, like kidneys [47, 51]. It has been shown that even slight changes in retinal circulation may also primarily affect DCP [51]. Moreover, previous studies demonstrated the importance of ischemia in DCP in predicting visual acuity in DR [52, 53].

Overall, the implemented algorithm in the current study can categorize single OCTA images in less than 5 s. While categorizing images with this algorithm requires ophthalmologists to be familiar with platforms such as Python, exporting this algorithm to a user-friendly application eliminates this requirement. Future large-scale research to create algorithms based on sophisticated classification methods, such as neural networks, with more accuracy and faster application would assist ophthalmologists in quickly classifying OCTA images in a user-friendly way.

This study has several limitations, as any study with a small sample size always does. Our suggested preliminary algorithm was trained on a small number of patients; therefore, the major challenge of distinguishing severe NPDR and PDR patients will be addressed in a larger study with a larger sample size. Despite the study contains fewer than 150 eyes, the mentioned algorithm achieved high levels of accuracy comparable to other algorithms using fundus photo or OCT to classify diabetic patients [18, 28, 54]. Noteworthy, individuals with retinal edema or vitreous hemorrhage, for example, were omitted because of the low picture quality and artifact of these lesions in the assessment of retinal vascular density maps, despite the fact that these patients reflect the pathophysiology of DR. As a result, a subset of diabetic patients in everyday practice will not benefit from the method applied in the current study. As the vascular alterations caused by diabetes are widely distributed, more than 50% of DR lesions are known to be located outside seven-standard Early Treatment Diabetic Retinopathy Study (ETDRS) fields. Previous studies reported that the presence of peripheral retinal lesions may suggest increased DR severity in 9 to 15% of eyes [55,56,57,58]. In the current study we did not have access to ultrawide-field FA (UWF-FA) and used conventional FA in all patients. Further studies are required to directly compare the results of machine learning algorithms using OCTA and traditional fundus photography, respectively, based on more accurate ground truth using UWF-FA. Moreover, a 3D algorithm was recently proposed for visualization of the retinal capillary plexuses. Future investigations using this approach may assess the 3D relationship of the retinal ischemia and staging of diabetic retinopathy [59]. Multiple new insights may be gleaned from this emerging technology.

In conclusion, the current study developed a classifier using a supervised machine learning model known as the support vector machine (SVM) to automatically identify PDR and NPDR using OCTA superficial, deep, and total retinal vascular density maps. This approach was capable of differentiating between PDR and NPDR based on the OCTA vascular density map of DCP with a 90% accuracy.