1 Introduction

DR is one of the major diseases of diabetes and the primary cause of vision impairment [1]. In order to avoid blindness, the early detection and treatment of DR are very essential. The first indication of DR is microaneurysms. As specified by ETDRS, the existence of some microaneurysms exhibits the sign of mild NPDR [2]. If there are more microaneurysms, then there is a huge risk of DR development. At present, ophthalmologists examine the color fundus images, where the monitoring and detection of microaneurysms are done manually which is a cyclic, tiring and error-prone process. Moreover, the manual monitoring of DR will not meet the detection requirements of severe DR. If DR is diagnosed in the early stages, then the development of vision impairment will be reduced [3].

DR consists of two major kinds such as NPDR, and PDR [4]. NPDR is usually seen in the starting phases of DR, which is later split into moderate, severe, and mild phases. The mild stage consists of one microaneurysm, a little circular red dot at the end of blood vessels. The microaneurysms bliss into deep layers and create a flame-shaped haemorrhage in the retina, which is seen in a moderate stage. Moreover, the severe stage consists of about 20 intraretinal haemorrhages in each quadrant holding specific venous bleeding with well-known intraretinal microvascular abnormalities. PDR is usually seen in the advanced stages of DR that cause neovascularisation, and the usual development of new blood vessels in the form of functional microvascular networks, which develops inside the retina [5].

However, the macula detection of DR is a time-consuming process, which thus depends on trained clinicians for inspecting and validating the digital color fundus images of the retina. Consequently, the improvement of automatic DR detection approaches is based on eye screening is provoked and helped the researches in both medical and academic communities [6,7,8]. Therefore, the number of DR diagnostic models is dependent on image evaluation approaches. Moreover, the computer vision-based techniques are classified into end-to-end learning [9, 10], and hand-on engineering [11,12,13]. In end-to-end learning, the concealed rich features are learned automatically and hence produce the best classification. The hand-on engineering techniques take out the features by existing methods like HOG [14], SIFT [15], LBP [16], Gabor Filters [17], etc., that fails in encoding the dissimilarities of scale, rotation, and illumination. In addition, several end-on-end learning and hand-on engineering-based methodologies [8, 12] are employed for detecting DR in the Kaggle dataset, but any of the methods are not capable of detecting the mild stage. The mild stage detection is very crucial for early diagnosis. Thus, the above techniques are generally found to be defective because of a lack of interpretability.

Hereunder, the major contributions of the paper are given:

  • The efficient DR diagnosis model is developed using optimal feature extraction and classification strategies.

  • Next to the image pre-processing, the optic disc is removed with the help of open-close watershed transformation and blood vessel segmentation and removal are done by grey level thresholding.

  • The methods called Top hat transformation and Gabor filtering is used to extract the abnormalities like hard exudates, haemorrhages, Microaneurysm, and soft exudates. Next, the features like LBP, TEM, Shannon, and Kapur’s entropy are extracted and further subjected to select the optimal feature selection.

  • The proposed MGS-ROA performs both feature selection and improved DBN classification in order to reduce the correlation between the features, and error difference between the predicted and actual detection outcome.

The entire paper is designed as follows:

The review on literal works is given in Sect. 2. Section 3 describes the proposed model for diagnosing diabetic retinopathy from retinal fundus images. Moreover, the abnormality segmentation and optimal feature selection for diabetic retinopathy detection are discussed in Sect. 4. Section 5 specifies the objective model considered for proposed diabetic retinopathy detection. The results and discussions of the proposed paper are given in Sect. 6. Finally, Sect. 7 concludes the paper.

2 Literature review

2.1 Related works

In 2019, Qummar et al. [18] have presented different computer vision-based approaches for diagnosing DR automatically and the corresponding phases from retina images. Here, Kaggle dataset images were utilized for training a group of Deep CNN methods such as Inceptionv3, Dense121, Xception, Dense169, and Resnet50 for encoding the best features and enhance the classification of various phases of DR. From the test results, it has been revealed that the developed approach was performed well in detecting DR at all stages.

In 2018, Kar and Maity [19] had offered a novel and automatic lesion detection model that includes four key stages such as “pre-processing, candidate lesion detection, eradication of optic disc and vessel extraction, and post-processing”. At first, the blood vessels and optic disc were removed for further processing. In order to split the dark lesions from the poor illuminated retinal background, curvelet-based edge enhancement was performed whereas a wideband bandpass filter was used to improve the contrast among the bright lesions and the background. Moreover, the experimental analysis was done on various publicly accessible datasets and the results have shown that the developed model was outperformed conventional models in diagnosing different kinds of DR lesions.

In 2019, Wang et al. [20] have explored the viability of detecting the existence of DR-related features and severity levels in a two-step process. For the experiment, 1589 retinal fundus images categorized by four general ophthalmologists, and three retinal specialists were taken. If both grading costs and prediction performance were taken into consideration, then SAMG was the best option. Similarly, when considering only the prediction performance, the DAAD was having the highest priority. The results have revealed that the two-step process was the best model for detection purposes.

In 2019, Chakraborty et al. [21] have introduced ANN for attaining exact diagnoses results in the case of DR. By calculating multiple entities of conventional ANN, the accuracy of feed forward back propagation-based ANN was enhanced. Finally, the outcomes have shown that the suggested approach was well suited for detecting the DR in an efficient manner.

In 2018, Costa et al. [22] have developed a framework named MIL to frame the DR detection model. The major theme of the developed approach was the image categorization phases and the joint optimization of the instance encoding. From that, the important mid-level representations of diseased images were acquired. The performance of the system was improved by the latest loss function implementing suitable mid-level representations, and instance. Hence, the suggested method has attained the best performance over conventional methods.

In 2017, Zhou et al. [23] have recommended a new unsupervised classification approach on the basis of sparse PCA for detecting microaneurysms. The class imbalance issue was averted, as the proposed model was not considering the non-microaneurysms training set. In the meantime, an individual T2 statistic was developed, and the control limit was defined for differentiating true microaneurysms from false candidates automatically. Finally, the test results were performed on retinopathy online challenge competition dataset, and the results have shown that the developed model was efficient.

In 2019, Hemanth et al. [24] have used an approach that includes the image processing using histogram equalization, and the CLAHE methods. Later, the diagnosis was carried out by the categorization of CNN. With the help of 400 retinal fundus images, the proposed technique was evaluated in the MESSIDOR database using various performance metrics. By utilizing the image processing approaches and deep learning techniques, the suggested mechanism was superior to the conventional mechanisms.

In 2019, Xu et al. [25] have suggested a framework and the whole method consisting of two distinct ways in the view of microaneurysms turnover and compulsive risk factors for detecting the improvement of DR. The experiments on Grampian diabetes database has revealed that the recommended framework was attained the best sensitivity, specificity. Finally, it was confirmed that the proposed model was provided a novel and the non-invasive detection approach for early diagnosis of DR.

2.2 Review

Even though there are many mechanisms for detecting DR in an effective manner, still there are some defects with those methods so that new models need to be introduced in the future for further improvement in detecting DR at an early stage. Table 1 specifies the benefits and limitations of existing DR methods. Among them, Deep CNNs [18, 24] has high performance, there is no need of feature extraction, these are reliable and work well on image data, and pre-training of features is not required. Yet, there are few disadvantages such as if GPU was not good, the training is very slow, and still it utilizes black box testing for improving the detection system at an early stage. Differential Evolution [19] improves the capability of local search, and less parameter settings have the ability to handle composite optimization problems. However, there are few conflicts such as the convergence is not steady, and there is a possibility of falling into local optima. DAAD [20] has high prediction performance, and it is less expensive. Still, it is having some disadvantages like when both grading costs and prediction performance are considered, it should not be preferred. ANN [21] designs compound and non-linear relationships, and ANNs are easy, once learned from the previous inputs and the corresponding relationships; it is assumed that unseen relationship on hidden data as well. However, there are some conflicts like there is no specific restriction for defining the structure of ANN, and these will only work with numerical information. MIL [22] has high accuracy, and it is directly utilized for instance classification tasks. But, it won’t work when the instances have no specific classes. The images grouping with PCA [23] decreases the complexity and Decreases the noise. However, there are few conflicts like it is difficult to evaluate the covariance matrix accurately, and even the simple invariance is not confined. SVM [25] is relatively memory efficient, and it is highly efficient in high dimensional spaces. Still, it is not suitable for huge datasets. Hence, the above-specified cons are utilized for developing new methodologies for early diagnosis of DR.

Table 1 Features and challenges of conventional diabetic retinopathy detection methods

3 Proposed model for diagnosing diabetic retinopathy from retinal fundus images

3.1 Proposed methodology

The main intent of the proposed model is to detect DR automatically from the abnormalities present in the retinal fundus images. Most of the eye-related diseases that lead to blindness are DR, glaucoma, and age-related macular degeneration. In order to detect the eye infections easily and effectively, image processing is employed, which helps ophthalmologists to monitor the patients and perform a clinical review. The abnormalities like hard exudates, haemorrhages, microaneurysms, and soft exudates present in the retina provide detailed information regarding the changes followed by these retina related diseases, especially DR. The architecture of the developed DR detection system is shown in Fig. 1.

Fig. 1
figure 1

Diabetic retinopathy detection model using the segmentation of retinal abnormalities

The proposed model includes phases such as image pre-processing, optic disc removal, blood vessel removal, abnormality segmentation, feature extraction, optimal feature selection, and classification. In the pre-processing phase, the retinal fundus image is given as input, where the RGB image is initially converted into a green channel, and the image enhancement is done using CLAHE. From the contrast-enhanced image, the segmentation and removal of the optic disc are done by the open-close watershed transform. This watershed transform is used to split touching objects present in an image and recognizes the catchment basins and watershed ridgelines in an image by considering it as a surface, in which the light pixels are more, and the dark pixels are less. After removing the optic disc, the blood vessels are segmented and removed using Grey level thresholding. Next to the removal of blood vessels and the optic disc, the abnormality segmentation is performed by top hat transformation followed by Gabor filtering. The obtained abnormality segmented image is subjected further for extracting features such as LBP, TEM, Shannon and Kapur’s entropy. LBP is used to extract the texture features of an image, whereas TEM is used to find the energy. Shannon’s and Kapur's entropy quantifies the expected value of data present in the image. The length of the feature vector is found to be very large so that the feature selection process is performed that selects the individual features with less correlation. Optimal feature selection is adopted in the proposed methodology for selecting the unique features. The improved meta-heuristic algorithm named MGS-ROA is used to perform the feature selection process. In addition, the optimally collected features by proposed MGS-ROA are given to the optimized DBN-classifier for detecting DR. Here in DBN classifier, the weight function is updated by the same MGS-ROA-based optimization algorithm. Moreover, the objective of the proposed feature selection and detection for DR diagnosis is to minimize the correlation of selected features and detection errors, respectively. Hence, the final classification model gives the outcome regarding the DR diagnosis whether it is normal, earlier, moderate, or severe stage.

3.2 Image description

Let the input retinal fundus image is denoted as \(In_{img}\). The pre-processed retinal fundus image is indicated by \(In_{\Pr }\). Moreover, the image obtained after removing the optic disc is \(In_{ODR}\), and the term \(In_{BVR}\) is the image acquired next to the removal of blood vessels. The final abnormality segmented image is indicated by \(In_{ABN}\). The input features from the segmented abnormalities are denoted by \(Fe_{inp}\), where \(inp = 1,2, \cdots ,NF\), and \(NF\) indicates the number of features. The optimal selection of features is represented by \(Fe_{inp}^{ * }\) where \(inp = 1,2, \cdots ,NF^{ * }\)\(NF^{ * }\) refers to the number of optimal features.

3.3 Pre-processing of retinal fundus images

Here, the pre-processing of the input retinal fundus image is performed by Green channel conversion and CLAHE.

(a) Green channel The input retinal fundus image is an RGB image that includes three channels such as red, green, and blue, which are transformed into green channel images. The retinal images are often low contrast images. In this green channel, the abnormalities are clearly seen because of high contrast.

(b) CLAHE [26] It is a well-known procedure utilized for improving the brightness of the image. The algorithm for improving the contrast of the image using the CLAHE approach is as follows:

(1) Every image is split into a count of non-overlapping contextual regions of a similar size of 8 × 8 blocks; each block refers to the neighborhood of 64 pixels.

(2) Measure the intensity histogram for every contextual region.

(3) In order to clip the histograms, set the clip limits, which is a threshold parameter to change the brightness of the image in an efficient manner. The brightness of the local image is enhanced by higher clip limits so that it should be set to a minimum optimal value.

(4) By choosing transformation functions, each histogram is modified.

(5) Each histogram is changed by not exceeding the chosen clip limit. The numerical equation for modified gray levels for the benchmark CLAHE approach with uniform distribution is given in Eq. (1), in which the maximum pixel value is given by \(gr_{\max }\), \(gr_{\min }\) is the minimum pixel value, \(gr\) is the measured pixel value, and \(PD\left( f \right)\) is the CPD.

$$gr = [gr_{\max } - gr_{\min } ] * PD\left( f \right) + gr_{\min }$$
(1)

To improve the exponential distribution, the gray level is determined by Eq. (2), where \(\alpha\) is the clip parameter.

$$gr = gr_{\min } - \left( {\frac{1}{\alpha }} \right) * \ln \left[ {1 - PD(f)} \right]$$
(2)

(6) By using bilinear interpolation, the neighboring tiles were merged and the grayscale values of the image are changed with respect to modified histograms.

Thus, after contrast enhancement, the pre-processed image is represented as \(In_{\Pr }\) and it is further applied to watershed transform for segmenting and removing the optic disc.

3.4 Optic disc removal

In order to segment the optic disc and to remove it from the pre-processed image, open-close watershed transformation [27] is carried out. To successfully remove the optical disc, watershed transformation undergoes few steps i.e., initially, the image is to be read for segmenting. After reading the image, the structure element of that image is determined. For the structured element, morphological dilation followed by opening-closing is performed. In addition, the background markers are measured and those are subjected to watershed transformation. Later, the function is given to perform the quantitative analysis.

Morphological opening or closing makes simple by eradicating the dark components, which are not appropriate in the structural element. A close-open or open-close watershed mechanism is used for dealing with the bright and dark elements. The numerical equation of the morphological opening of the image \(In_{\Pr }\) by a structuring element \(F\) is expressed in Eq. (3), and the corresponding closing function is given in Eq. (4).

$$In_{\Pr } \circ F = \left( {In_{\Pr } \Theta F} \right) \oplus F$$
(3)
$$In_{\Pr } \bullet F = \left( {In_{\Pr } \oplus F} \right)\Theta F$$
(4)

The watershed line is nothing but a function, which is the group of points of a function that doesn’t belong to any other catchment basin, which is given in Eq. (5). Here, \(su\left( f \right)\) is the support to the function \(f\) and \(CB\left( {rm_{t} } \right)\) is the catchment basin with the regional minima \(\left( {rm_{t} } \right)\).

$$Wa_{shd} \left( f \right) = su\left( f \right) \cap \left[ {\bigcup\limits_{t} {\left( {CB\left( {rm_{t} } \right)} \right)} } \right]^{o}$$
(5)

By evaluating the distance transformation over the foreground image, SKIZ is measured. The geodesic distance zone equation is denoted in Eq. (6), which \(gd_{G} \left( {i,H_{t} } \right)\) is the geodesic distance from a point \(i\) to the group \(H\). Moreover, few points of pixels \(G\) doesn’t contribute to any influence zone. Therefore, those points make SKIZ of \(H\) in \(G\) and the corresponding equation is given in Eq. (7), where \(SKIZ_{G} \left( H \right)\) are the points that doesn’t belong to any of the influence zones. The mathematical equation \(DZ_{G} \left( H \right)\) is indicated in Eq. (8).

$$tdz_{G} \left( {H_{t} } \right) = \left\{ {i \in G,\forall s \in \left[ {1,r} \right]\backslash \left\{ t \right\},gd_{G} \left( {i,H_{t} } \right) < gdG\left( {i,H_{s} } \right)} \right\}$$
(6)
$$SKIZ_{G} \left( H \right) = G\backslash DZ_{G} \left( H \right)$$
(7)
$$DZ_{G} \left( H \right) = \bigcup\limits_{{t \in \left[ {1,r} \right]}} {dz_{G} \left( {H_{t} } \right)}$$
(8)

Moreover, after calculating the watershed ridgelines, the intensity of the image is changed by morphological reconstruction so that it will be having the regional minima in the necessary locations. The resultant image \(In_{ODR}\) is further segmented for removing the blood vessels effectively.

3.5 blood vessel removal

The segmentation and removal of blood vessels from the image \(In_{ODR}\) are done using grey-level thresholding [28]. which operates on the basis of a presumption that the image has a bimodal histogram. Thus, from the background, the object might be taken using an easy procedure, which contrasts the image with the threshold \(TL\) value, which separates into two modes and the resultant threshold image is shown in Eq. (9), which is a binary image. Here, the pixel with intensity value 1 refers to the objects, and 0 refers to the background.

$$In{}_{BVR} = \left\{ {\begin{array}{*{20}c} 1 & {if\,{\text{Im}} (x,y) > TL} \\ 0 & {if\,{\text{Im}} (x,y) \le TL} \\ \end{array} } \right.$$
(9)

Moreover, the image is represented as \(In_{BVR}\) after removing the blood vessels, and it is further subjected to abnormality segmentation.

4 Abnormality segmentation and optimal feature selection for diabetic retinopathy detection

4.1 Abnormality segmentation

The abnormality segmentation is performed next to the removal of the optic disc as well as blood vessels, which is done by top hat transform and Gabor filtering.

Top hat transform [29] It is determined as the difference between the image opening and the original image. The key objective of the top hat transform is to light objects on a dark background. This results in the enhancement of the contrast of the image. Moreover, top hat transform of the segmented image \(In_{BVR}\) is given in Eq. (10), where \(C\) is the structuring element.

$$T\left( {In_{BVR} } \right) = In_{BVR} - \left( {In_{BVR} \circ C} \right)$$
(10)

Gabor filtering [30] This filter is created from two components named sinusoidal and Gaussian. This mechanism is capable of linking the optimal representation of the spatial domain and the orientation direction. The mathematical formulation expressing the Gabor filtering of the image is depicted in Eq. (11), in which the cosine wave frequency is denoted by \(fr\), along with \(u\) and \(v\) axes, \(\sigma_{u}\) and \(\sigma_{v}\) is the fixed the distance from the Gaussian properties, respectively, and \(\theta\) be the orientation direction. Moreover, the representation of \(u_{\theta }\) and \(v_{\theta }\) is given in Eq. (12), and Eq. (13), respectively.

$$GF\left( {u,v;\theta ,fr} \right) = \exp \left\{ { - \frac{1}{2}\left[ {\frac{{u_{{\theta^{\prime}}}^{2} }}{{\sigma_{u}^{2} }} + \frac{{v_{\theta }^{2} }}{{\sigma_{v}^{2} }}} \right]} \right\}\cos \left( {2\Pi fru_{\theta } } \right)$$
(11)
$$u_{\theta } = u\cos \theta - v\sin \theta$$
(12)
$$v_{\theta } = u\sin \theta + v\cos \theta$$
(13)

Finally, the abnormality segmented image \(In_{ABN}\) is applied to the feature extraction phase for extracting reliable features.

4.2 Feature extraction

Here feature extraction is done using three techniques (1) LBP, (2) LTE, and (3) Entropy.

LBP [31] It is recommended as an efficient and robust texture descriptor, which could be implemented in a wide range of applications from texture segmentation to face recognition. By thresholding, the neighborhood of every pixel with the center value, the LBP operator categorizes the image pixel and this thresholding output is taken as the binary value. When each and every pixel is categorized with respect to LBP codes, the histogram of the labels is calculated and employed as a texture descriptor. The histogram of the labeled image \(In_{ABN} \left( {x,y} \right)\) is utilized as a descriptor and it is given in Eq. (14), in which \(I(C) = 1\), when \(C\) is true, and \(I(C) = 0\) when \(C\) is false, and \(m\) is the number of distinct labels provided by the LBP operator.

$$Hm_{img} = \sum\limits_{x,y} {I(In_{ABN} (x,y) = img),\,img = 0, \cdots ,m - 1}$$
(14)

Moreover, a circular neighborhood is taken around a pixel. On the circumference of the circle, \(Po\) points are selected with radius \(Ra\). The uniformity metric \(\left( U \right)\) is determined using Eq. (15) by taking \(LBP_{Po,Ra}\) as \(Po\)-bit binary number \(\left( {k_{Po - 1} ,k_{Po - 2,} \cdots ,k_{1} ,k_{0} } \right)\) for acquiring a rotation-invariant uniform pattern with finer angular quantization.

$$UM(LBP_{Po,Ra} ) = \left| {k_{Po - 1} - k_{0} } \right| + \sum\limits_{Po = 1}^{Po - 1} {\left| {k_{Po} - k_{Po - 1} } \right|}$$
(15)

The rotation invariant uniform pattern by \(U\) value less than or equal to 2 is given in Eq. (16), where the grey value of the centre pixel is denoted by \(gv_{cp}\), and the grey values of \(Po\) points is indicated by \(gv_{pPo}\),\(po = 0, \cdots ,Po - 1\). By selecting circles with various radii around the center pixels, a multi-scale evaluation is done using LBP and creating a separate LBP image for every scale. Moreover, the energy and the entropy of the LBP image is built over various scales \(Ra = 1,\,2,\,and\,3\) with corresponding pixel count \(Po = 8,\,16,\,and\,24\) are employed as the feature descriptor.

$$LBP_{Po,Ra} = \left\{ {\begin{array}{*{20}l} {\sum\limits_{po = 0}^{Po - 1} {s(gv_{pPo} - gv_{cp} )\,\,} } \hfill & {if\,U(LBP_{Po,Ra} ) \le 2} \hfill \\ {Po + 1} \hfill & {Otherwise} \hfill \\ \end{array} } \right.$$
(16)

LTE [32] It is one of the most utilized texture descriptors, which is employed in different applications consisting of medical image analysis. The whole masks are acquired from a one-dimensional vector with five-pixel lengths \(L5\) indicates the level detection, \(S5\) refers to spot detection, \(E5\) denotes the edge detection, \(R5\) represents the ripple detection, and denotes the wave detection. The image is convoluted with every two-dimensional mask for extracting the texture data from \(In_{ABN} \left( {x,y} \right)\). When the filter \(L5E5\) is utilized, the acquired texture image is shown in Eq. (17). All the two dimensional masks excluding \(L5L5\) had zero mean based on the laws. Therefore, the texture image \(TEX_{L5L5}\) is employed for normalizing the contrast of the remaining texture images \(TEX\left( {x,y} \right)\), which is given in Eq. (18).

$$TEX_{L5E5} = In_{ABN} \left( {x,y} \right) \otimes L5E5$$
(17)
$$Normalize\left( {TEX_{{\left( {x,y} \right)}} } \right) = \frac{{TEX_{(x,y)} }}{{TEX_{{(x,y)^{L5L5} }} }}$$
(18)

The suitable convolution of these masks provides 25 various combinations. The results are sent to TEM, which includes moving non-linear window average of absolute values is shown in Eq. (19). By uniting 25 TEM descriptors, a fourteen rotationally invariant TEM \(\left( {TR} \right)\) is obtained, and it is given in Eq. (20).

$$TEM_{(x,y)} = \sum\limits_{a = - 7}^{7} {\sum\limits_{b = - 7}^{7} {\left| {TEX_{{\left( {x + ay + b} \right)}} } \right|} }$$
(19)
$$TR_{E5L5} = \frac{{TEM_{E5L5} + TEM_{L5E5} }}{2}$$
(20)

Entropy [33] It is defined as the uncertainty linked with randomness. Here, two various kinds of entropy are considered such as Shannon and Kapur’s entropy models. Assume, the input segmented image \(In_{ABN} \left( {x,y} \right)\) consisting of \(N_{dg}\) distinct gray values. Thus, the normalized histogram is determined for the specific region of interest of size \((ne \times me)\) is given in Eq. (21). In addition, the mathematical equation of Shannon entropy is given in Eq. (22). The Kapur’s entropy equation is represented in Eq. (23), which is having a more dynamic range than Shannon entropy.

$$Ent_{dg} = \frac{{N_{dg} }}{ne \times me}$$
(21)
$$SE = - \sum\limits_{dg = 0}^{M - 1} {Ent_{dg} \log_{2} (Ent_{dg} )}$$
(22)
$$K_{\alpha ,\beta } = \frac{1}{\beta - \alpha }\log_{2} \frac{{\sum\nolimits_{dg = 0}^{M - 1} {Ent_{dg}^{\alpha } } }}{{\sum\nolimits_{dg = 0}^{L - 1} {Ent_{dg}^{\beta } } }}$$
(23)

The overall features extracted are finally termed as \(Fe_{inp}\), which is denoted in Eq. (24).

$$Fe_{inp} = LBP_{Po,Ra} + TEM_{{\left( {x,y} \right)}} + SE + K_{\alpha ,\beta }$$
(24)

Thus, Eq. (24) is the final features extracted and further used for selecting the optimal feature using the proposed MGS-ROA algorithm.

4.3 Optimal feature selection

The optimal feature selection of the input features \(Fe_{inp}\) is done by the developed MGS-ROA algorithm, which intends to select the optimal features \(Fe_{inp}^{ * }\).

Conventional ROA The algorithm ROA [34] is inspired based on the rider’s cluster, which is moving towards the target. Assume, a few groups of riders are moving in the direction of a similar destination in order to win the race. There are four clusters of riders are taken into consideration, where the number of riders is equal in all the clusters. The four rider’s clusters are bypass rider, followers, overtakers, and attackers. Each group is having its particular mechanism to accomplish the destination. Moreover, the overtaker follows his individual location to reach the destination, which is the closest position of the leading rider. The attacker comes with high speed and occupies the location of the rider for reaching the target location. This algorithm has a few steps that each rider should follow are specified below.

(1) Parameter initialization for group and rider Four groups of riders are initialized, which is indicated by \(RG\) and their positions are initialized at random. The cluster initialization is represented in Eq. (25). Here, the number of riders is indicated by \(RN\), which is the same as the group of riders \(\left( {RG} \right)\). The count of co-ordinates or dimension is indicated by \(CN\). Moreover, the position of \(c^{th}\) rider is represented as \(L_{it} \left( {c,d} \right)\). The overall count of riders is known by computing the number of riders present in each group, and the corresponding equation is denoted in Eq. (26).

$$L_{it} = \left\{ {L_{it} \left( {c,d} \right)} \right\};\,1 \le c \le RN;\,1 \le d \le CN$$
(25)
$$RN = ByR + Fol + Ovr + Att$$
(26)

In Eq. (26), \(ByR\),\(Fol\),\(Ovr\), and \(Att\) are the “bypass rider, follower, overtaker, and attacker”, respectively. Moreover, steering, gear, accelerator, and brake are the rider parameters, which are initialized after the cluster initialization. The steering angle of the rider’s vehicle at a time \(it\) is given in Eq. (27), which \(ST_{c,d}^{it}\) is the steering angle of \(c^{th}\) rider’s vehicle, and the mathematical equation is denoted in Eq. (28).

$$ST_{it} = \left\{ {ST_{c,d}^{it} } \right\};\,1 \le c \le RN;\,1 \le d \le CN$$
(27)
$$ST_{c,d} = \left\{ {\begin{array}{*{20}l} {\theta_{c} ;} \hfill & {if\,d = 1} \hfill \\ {ST_{c,d - 1} + \varphi ;} \hfill & {if\,d \ne 1\,\& \,ST_{c,d - 1} + \varphi \le 360} \hfill \\ {ST_{c,d - 1} + \varphi - 360;} \hfill & {otherwise} \hfill \\ \end{array} } \right.$$
(28)

In addition, from Eq. (28), \(\theta_{c}\) and \(\varphi\) is the location angle and the co-ordinate angle of the \(c^{th}\) rider’s vehicle. Based on the number of riders and the maximum angle 360°, the position angle of \(c^{th}\) rider’s vehicle is determined, which is given in Eq. (29). In order to find the steering angle, a co-ordinate angle is used and it is denoted in Eq. (30).

$$\theta_{c} = c * \frac{{{{360^\circ }}}}{{{\text{RN}}}}$$
(29)
$$\varphi = \frac{{{{360^\circ }}}}{{{\text{CN}}}}$$
(30)

(2) Determining the success rate Based on the distance, the success rate is defined i.e., computed between the target and the position of the rider as shown in Eq. (31), in which the position of the target is denoted by \(Lo_{ta}\). Moreover, the distance must be declined in order to improve the success rate so that the success rate of the rider is measured by the reciprocal of the distance.

$$sur_{c} = \frac{1}{{\left\| {L_{c} - Lo_{ta} } \right\|}}$$
(31)

(3) Determining the leading rider In order to find the leading rider, the success rate is considered majorly. The rider, who is having more success rate, will be assumed as the leading rider because the rider is nearer to the target. The location of the target changes every time so that the leading rider also changes at every time period. Thus, it is stated that the rider who is having more success rate will be the leading rider.

(4) Update the location of the riders For finding the leading rider and the winner in the race, the position of the riders in each cluster is updated every time. Based on the features, the location update of the rider in each cluster is done by following the below steps.

(a) Bypass update Since these riders bypass the usual path by not going in the path of leading riders, the bypass rider’s update process is denoted in Eq. (32). Here, \(\delta\) and \(\beta\) are the random values ranging in between 0 and 1. Moreover, \(\eta\) and \(\xi\) are the values that choose the random value ranging from 0 to \(RN\). The size \(\beta\) is \(1 \times CN\). Therefore, each rider in the group updates its location and turn out as the winner.

$$L_{it + 1}^{ByR} = \delta \left[ {L_{it} \left( {\eta ,d} \right) * \beta \left( d \right) + L_{it} \left( {\xi ,d} \right) * \left[ {1 - \beta \left( d \right)} \right]} \right]$$
(32)

(b) Follower update This follows the path of the leading rider, and updates its location thus the follower reaches the destination quickly and effectively. In addition, the follower is based on the co-ordinate selector, such that the location is updated for the selected values existing in \(CN\), and the corresponding update equation is given in Eq. (33).

$$L_{it + 1}^{Fol} \left( {c,crs} \right) = L^{Ler} \left( {Ler,crs} \right) + \left[ {cso\left( {ST_{c,crs}^{it} } \right) * L^{Ler} \left( {Ler,crs} \right) * dst_{c}^{it} } \right]$$
(33)

In Eq. (33), the location of the rider is given by \(L^{Ler}\), the co-ordinate selector is indicated by \(crs\). The steering angle of the \(c^{th}\) rider in \(cs^{th}\) co-ordinate is denoted by \(ST_{c,cs}^{it}\), and the distance traveled by the \(c^{th}\) rider is given by \(dst_{c}^{it}\), which is computed by the product of the velocity of the rider with the rate of off time, and the corresponding equation is given in Eq. (34). Here, the maximum time is represented as \(Ti_{off}\) and \(ver_{c}^{it}\) is the velocity of \(c^{th}\) rider.

$$dst_{c}^{it} = ver_{c}^{it} * \left( {\frac{1}{{Ti_{off} }}} \right)$$
(34)

Moreover, the velocity is directly proportional to the speed of the vehicle and the rider parameters except for the steering angle, and the corresponding velocity equation is denoted in Eq. (35).

$$ver_{c}^{it} = \frac{1}{3}\left[ {ge_{c}^{it} * sp_{c}^{ge} + sp_{\max }^{c} * acc_{c}^{it} + \left( {1 - br_{c}^{it} } \right) * sp_{\max }^{c} } \right]$$
(35)

In the above equation, \(ge_{c}^{it}\), \(br_{c}^{it}\), and \(acc_{c}^{it}\) are the gear, brake, and accelerator of the \(c^{th}\) rider’s vehicle, respectively. The speed limit of the gear of \(c^{th}\) rider is given by \(sp_{c}^{ge}\).

(c) Overtaker update Based on three factors like relative success rate, direction indicator, and co-ordinate selector, the overtaker is updated. The mathematical formula is given in Eq. (36), in which the location of \(c^{th}\) rider in crsth \(crs^{th}\) co-ordinate is given by \(L_{it} \left( {c,crs} \right)\), the direction indicator of \(c^{th}\)rider at time \(it\) is denoted by \(di_{it} \left( c \right)\). Moreover, it measures the direction by the relative success rate, which is given in Eq. (37) using Eq. (38). Here, the relative success rate of \(c^{th}\) rider at time \(it\) is given by \(\left( {{\text{Re}} s_{it}^{Rs} \left( c \right)} \right)\).

$$L_{it + 1}^{Ovr} \left( {c,crs} \right) = L_{it} \left( {c,crs} \right) + \left[ {di_{it} \left( c \right) * L^{Ler} \left( {Ler,crs} \right)} \right]$$
(36)
$$di_{it} \left( c \right) = \left[ {\frac{2}{{1 - \log \left( {{\text{Re}} s_{it}^{Rs} \left( c \right)} \right)}}} \right] - 1$$
(37)
$${\text{Re}} s_{it}^{Rs} \left( c \right) = \frac{{sur_{it} \left( c \right)}}{{\max_{c = 1}^{Rs} sur_{it} \left( c \right)}}$$
(38)

(d) Attacker update The attacker who is trying to occupy the location of the leader will follow the similar procedure of the follower. The update process of the attacker is denoted in Eq. (39), in which the location of the leading rider is given by \(L^{Ler} \left( {Ler,d} \right)\) and the steering angle of \(c^{th}\) rider in \(d^{th}\) co-ordinate is denoted as \(ST_{c,d}^{it}\).

$$L_{it + 1}^{Att} \left( {c,d} \right) = L^{Ler} \left( {Ler,d} \right) + \left[ {\cos \left( {ST_{c,d}^{it} } \right) * L^{Ler} \left( {Ler,d} \right)} \right] + dst_{c}^{it}$$
(39)

(5) Determining the success rate Each rider’s success rate is computed after the completion of the update process based on the location of the rider who is first in the race is replaced by the new rider’s position such that the success of each rider is maximum.

4.4 Proposed MGS-ROA

The conventional ROA is based on the group of riders reaching the target, which is a new computing methodology. The idea of the ROA approach is accelerating the rider’s location towards the leading riders at each time step. In that case, local minima are prevented by little local neighbourhood i.e., handled by the attacker, yet quick convergence is acquired by a more global neighbourhood, which is performed by the overtaker. Rather than having such benefits, this algorithm will often be stuck in solving discrete optimization problems. In order to further improve its performance, the proposed MGS-ROA modifies the updated pattern of gear and steering angle. It is determined based on the fitness function of the current solution \(F_{C}\) and the maximum fitness values \(F_{MAX}\). If \(F_{C} < F_{MAX}\), then the gear \(ge_{c}^{it}\) is updated based on maximum gear (5), and steering angle is updated based on Eq. (40). On the other hand, gear \(ge_{c}^{it}\) is updated based on minimum gear (1), and the steering angle is updated based on Eq. (41).

$$ST_{it + 1} = ST_{it} + Distn$$
(40)
$$ST_{it + 1} = ST_{it} - Distn$$
(41)

The term \(Distn\) is a distance function, which is calculated by Eq. (42).

$$Distn = \frac{{abs\left( {L_{it + 1}^{*} - L_{it} } \right)}}{{\max \left( {L_{it + 1}^{*} } \right)}}$$
(42)

In Eq. (42), \(L_{it + 1}^{*}\) is the best position (leader position) and \(L_{it}\) is the current position. The pseudo-code of the proposed MGS-ROA is shown in Algorithm 1.

figure a

4.5 Optimized DBN-based detection

The optimal trained DBN is used for diagnosing the DR. DBN [35] is a kind of deep NNs consisting of several layers. Each layer includes visible neurons in the input layer and the hidden neurons in the output layer. The major building blocks of DBNs are Boltzmann Machines for attaining the best results. The output of DBN is given by \(OP\), which is a binary value and is denoted in Eq. (43), which \(Pb\left( \lambda \right)\) is the probability function and the corresponding equation is given in Eq. (44). Here, \(ptmp\) is the pseudo temperature, where \(ptmp > 0\) is used to control the noise level in the probability. The stochastic model is depicted in Eq. (45)

$$OP = \left\{ {\begin{array}{*{20}l} 1 \hfill & {with\,Pb\left( \lambda \right)} \hfill \\ 0 \hfill & {with\,1 - Pb\left( \lambda \right)} \hfill \\ \end{array} } \right.$$
(43)
$$Pb\left( \lambda \right) = \frac{1}{{1 + e^{{\frac{ - \lambda }{{ptmp}}}} }}$$
(44)
$$\mathop {\lim }\limits_{{ptmp \to 0^{ + } }} Pb\left( \lambda \right) = \mathop {\lim }\limits_{{ptmp \to 0^{ + } }} \frac{1}{{1 + e^{{\frac{ - \lambda }{{ptmp}}}} }} = \left\{ {\begin{array}{*{20}c} 0 & {for\,\lambda < 0} \\ \frac{1}{2} & {for\,\lambda = 0} \\ 1 & {for\,\lambda > 0} \\ \end{array} } \right.$$
(45)

The main objective of the Boltzmann network model is to determine input patterns precisely according to the Boltzmann distribution. Moreover, the energy of the Boltzmann machine for configuring the neuron states \(st\) is represented in Eq. (46), in which \(W_{g,h}\) indicates weights among the neurons, and \(\theta_{g}\) is the biases of the neurons. In addition, the effect of a single unit’s state \(st_{g}\) on global energy is measured by Eq. (47).

$$En(st) = - \sum\limits_{g < h} {W_{g,h} st_{g} st_{h} } - \sum\limits_{g} {\theta_{g} st_{g} }$$
(46)
$$\Delta En\left( {st_{g} } \right) = \sum\limits_{h} {W_{g,h} st_{h} + \theta_{g} }$$
(47)

This energy is utilized in the training procedure with a gradient descend approach for determining the least possible energy of the model for the provided input. The main reason for this is the interconnections among the visible and the hidden neurons that make the neuron states depend on each other. By removing the connection, the joint configuration of visible and the hidden neurons will provide new energy definitions, which are given in Eq. (48), Eq. (49), and Eq. (50), in which the biases are given by \(p_{g}\) and \(q_{h}\). The binary states of visible and hidden neurons are denoted by \(z_{{vi_{g} }}\), and \(z_{{hn_{h} }}\).

$$En(\vec{z}_{vi} ,\vec{z}_{hn} ) = - \sum\limits_{{\left( {g,h} \right)}} {W_{g,h} z_{{vi_{g} }} z_{{hn_{h} }} - \sum\limits_{g} {z_{{vi_{g} }} p_{g} - \sum\limits_{h} {z_{{hn_{h} }} q_{h} } } }$$
(48)
$$\Delta En\left( {z_{{vi_{g} }} ,\vec{z}_{hn} } \right) = \sum\limits_{h} {W_{g,h} z_{{hn_{h} }} + p_{g} }$$
(49)
$$\Delta En\left( {\vec{z}_{vi} ,z_{{hn_{h} }} } \right) = \sum\limits_{g} {W_{g,h} z_{{vi_{g} }} + q_{h} }$$
(50)

Moreover, the RBM is not dependent on the visible and the hidden neurons while calculating the energy difference. These are trained using unsupervised learning. In addition, RBMs learn by encoding the probability distribution of input data into weight parameters. The RBM allows a probability for each possible pair of a visible and the hidden vector using the energy function defined in Eq. (51), and the partition function is denoted in Eq. (52).

$$RP\left( {\vec{z}_{vi} ,\vec{z}_{hn} } \right) = \frac{1}{Pa}e^{{ - En\left( {\vec{z}_{vi} ,\vec{z}_{hn} } \right)}}$$
(51)
$$Pa = \sum\limits_{{\vec{z}_{vi} ,\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\rightharpoonup}$}} {z}_{hn} }} {e^{{ - En\left( {\vec{z}_{vi} ,\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\rightharpoonup}$}} {z}_{hn} } \right)}} }$$
(52)

The time utilized by RBM for attaining the link by the developed approach is composite, therefore CD model is considered, which provides the fast convergence in system distribution. The corresponding algorithm is summarized below.

  1. 1.

    Assume a training set \(z_{vi}\) and merge it into visible neurons.

  2. 2.

    The probabilities are calculated for the hidden neurons \(RP_{{z_{hn} }}\) by multiplying the visible vector \(z_{vi}\) with the weights matrix \(w\). \(RP_{{z_{hn} }} = \sigma \left( {z_{vi} \cdot w} \right)\).

  3. 3.

    Sample the hidden states \(z_{hn}\) from the probabilities \(RP_{{z_{hn} }}.\)

  4. 4.

    Calculate the outer product of vectors \(RP_{{z_{hn} }}\) and \(z_{vi}\), and name it as a positive gradient.

  5. 5.

    Reconstruction of visible states \(z_{{vi^{\prime}}}\) is sampled from the hidden states \(z_{hn}\). After that, resample the hidden states from the renovation of visible states.

  6. 6.

    Now, calculate the outer product of reconstructed visible and hidden states and called a negative gradient. \(\varphi^{ - } = z_{{vi^{\prime}}} .RP_{{z_{{hn^{\prime}}} }}^{T}\).

  7. 7.

    By subtracting the positive gradient from a negative gradient, the weight updates are computed \(\Delta w = \eta \left( {\varphi^{ + } - \varphi^{ - } } \right)\).

  8. 8.

    The weights should be updated using the new values \(W_{g,h}^{ * } = \Delta W_{g,h} + W_{g,h}\).

Here, the training of DBN is done by both RBM and MGS-ROA in order to minimize the error function.

5 Objective model considered for proposed diabetic retinopathy detection

5.1 Objective function

There are two objective models employed for DR detection by segmenting the retinal abnormalities. The first one focuses on minimizing the correlation between the features, and the second one focuses on minimizing the error difference between the predicted and target outcome of DBN classification. Initially, the features have to be selected in such a manner that the correlation between the features should be minimum. If the correlation between the features is minimum, then it is having a possibility of determining the more accuracy. The correlation between the two features \(a\) and \(A^{e}\) is shown in Eq. (53), which \(NP\) is the number of feature pairs. Hence, the first objective function is the minimization of the correlation between features as shown in Eq. (53).

$$Corr = \frac{{NP\sum {ab - \sum {a\sum b } } }}{{\left( {\sqrt {NP} \sum {a^{2} - } \left( {\sum a } \right)^{2} } \right) - \left( {NP\sum {b^{2} - \left( {\sum b } \right)^{2} } } \right)}}$$
(53)
$$OBJ1 = Min\left( {Corr} \right)$$
(54)

The actual output vector of DBN is indicated by \(A^{e}\), and the predicted outcome is denoted by \(B^{e}\). The error function among the actual and the predicted outcome is shown in Eq. (55), which has to be minimized as the second objective function, as represented in Eq. (56).

$$MER = A^{e} - B^{e}$$
(55)
$$OBJ1 = Min\left( {MER} \right)$$
(56)

This objective model is attained by the proposed MGS-ROA so that the best detection accuracy is gained.

5.2 Solution encoding

The proposed MGS-ROA is used for selecting the optimal features as well as optimizing the weight function in DBN classification. The solution encoding for optimal feature selection is shown in Fig. 2, and the optimal selection of weight in DBN is shown in Fig. 3.

Fig. 2
figure 2

Encoding of solution under optimal feature selection

Fig. 3
figure 3

Encoding of solution under weight updating in DBN

After optimizing the features and weights in DBN by the proposed MGS-ROA, the optimal features \(Fe_{inp}^{ * }\) are obtained with the updated weight, which could be highly suitable for improving the classification accuracy.

Figure 4 shows the flowchart of the proposed MGS-ROA-DBN. Initially, the input retinal image is subjected to pre-processing. Then, the next phase performs the optic disc removal, which is carried out by open-close watershed transformation. Afterthat, the segmentation and removal of blood vessels is done fgrey-level thresholding, in which, the pixel with intensity value 1 refers to the objects, and 0 refers to the background. Once the optic disk and blood vessels are removed, segmentation of abnormalities takes place. Then, the features are extracted from the image and the optimal feature selection is done by the improved meta-heuristic algorithm. Finally the classification is done using the DBN.

Fig. 4
figure 4

The flowchart of the proposed MGS-ROA-DBN

6 Results and discussions

6.1 Experimental procedure

The developed DR detection approach was implemented in MATLAB 2018a, and the performance evaluation of the proposed model was carried out. Here, the experiment was done on the dataset DIARETDB1, which includes 89 color fundus images. From that images, the experts have marked the regions belong to microaneurysms, haemorrhages, hard exudates, and soft exudates. In order to evaluate the feature selection, the population size was fixed as 10 and the maximum number of iterations was considered as 100. The performance of the developed MGS-ROA-based DBN was compared over the conventional PSO-DBN [36], GWO-DBN [37], WOA-DBN [38], and ROA-DBN [34] by evaluating the “performance measures such as accuracy, sensitivity, specificity, precision, FPR, FNR, NPV, FDR, F1 score, and MCC”.

6.2 Performance measures

In this paper, ten performance measures are taken into consideration to evaluate the performance and the description of each performance measure is given below.

(a) Accuracy It is a “ratio of the observation of exactly predicted to the whole observations”. The formula for accuracy is shown in Eq. (57), where \(TR^{P}\) \(TR^{N}\) denotes the “true positives, and true negatives”, respectively. Moreover, \(FA^{P}\) and \(FA^{N}\) are the “false positives and false negatives”, respectively.

$$Acc = \frac{{TR^{P} + TR^{N} }}{{TR^{P} + TR^{N} + FA^{P} + FA^{N} }}$$
(57)

(b) Sensitivity It measures “the number of true positives, which are recognized exactly”. It is represented in Eq. (58).

$$Sen = \frac{{TR^{P} }}{{TR^{P} + FA^{N} }}$$
(58)

(c) Specificity It measures “the number of true negatives, which are determined precisely”. It is given in Eq. (59).

$$Spe = \frac{{TR^{N} }}{{FA^{P} }}$$
(59)

(d) Precision It is “the ratio of positive observations that are predicted exactly to the total number of observations that are positively predicted”. It is mathematically represented in Eq. (60).

$$\Pr e = \frac{{TR^{P} }}{{TR^{P} + FA^{P} }}$$
(60)

(e) FPR It is computed as “the ratio of the count of false-positive predictions to the entire count of negative predictions”, which is shown in Eq. (61)

$$FPR = \frac{{FA^{P} }}{{FA^{P} + TR^{N} }}$$
(61)

(f) FNR It is “the proportion of positives which yield negative test outcomes with the test”. The numerical equation is denoted in Eq. (62).

$$FNR = \frac{{FA^{N} }}{{TR^{N} + TR^{P} }}$$
(62)

(g) NPV It is the “probability that subjects with a negative screening test truly don't have the disease”. It is shown in Eq. (63).

$$NPV = \frac{{FA^{N} }}{{FA^{N} + TR^{N} }}$$
(63)

(h) FDR It is “the number of false positives in all of the rejected hypotheses”. The numerical formula for FDR is given in Eq. (64).

$$FDR = \frac{{FA^{P} }}{{FA^{P} + TR^{P} }}$$
(64)

(i) F1 score It is defined as the “harmonic mean between precision and recall. It is used as a statistical measure to rate performance”. It is given in Eq. (65)

$$F1score = \frac{Sen \bullet \Pr e}{{\Pr e + Sen}}$$
(65)

(j) MCC It is a “correlation coefficient computed by four values”. It is denoted in Eq. (66).

$$MCC = \frac{{TR^{P} \times TR^{N} - FA^{P} \times FA^{N} }}{{\sqrt {\left( {TR^{P} + FA^{P} } \right)\left( {TR^{P} + FA^{N} } \right)\left( {TR^{N} + FA^{P} } \right)\left( {TR^{N} + FA^{N} } \right)} }}$$
(66)

6.3 Segmentation results

Here, the results of the pre-processing, optic disc removal, blood vessel removal, and segmented images are shown in Fig. 5.

Fig. 5
figure 5

Experimental results of pre-processed, optic disk removal, blood vessel removal and segmentation of abnormalities

6.4 Performance analysis

The performance analysis of the proposed MGS-ROA-DBN compared over the conventional heuristics-based DBN, which is graphically represented in Fig. 6. From Fig. 6a, the accuracy of the developed MGS-ROA-DBN is computed effectively when compared with other conventional algorithms. At a learning percentage of 45%, the suggested MGS-ROA is 2.1% better than WOA and 6.6% better than PSO-DBN. Moreover, the specificity of the developed MGS-ROA-DBN is exactly predicting the true negative observations from the false-positive observations from Fig. 6c Therefore, the specificity of the developed MGS-ROA-DBN is 3.3% superior to ROA, 6.8% superior to GWO, 9.4% superior to WOA, 12.7% superior to DBN, and 16.2% superior to PSO-DBN at learning percentage 100%. The precision of the presented approach correctly determined the positive values, which is shown in Fig. 6d. It is 4.4% improved than WOA, and 16.2% improved than PSO-DBN at learning percentage 45%. In addition, at a learning percentage 65%, the NPV of the recommended MGS-ROA-DBN is 3.1%, 4.2%, 8.8%, and 10.1% enhanced than ROA, WOA, DBN, and PSO, respectively and it is given in Fig. 6g. From Fig. 6j, the MCC of the improved MGS-ROA-DBN is 8.2% better than WOA and 27.7% better than PSO-DBN at learning percentage 50%. Finally, it is proved that the implemented MGS-ROA-DBN is superior in detecting DR effectively.

Fig. 6
figure 6

Performance analysis of proposed and conventional heuristic-based DBN for Diagnosing DR showing a accuracy, b sensitivity, c specificity, d precision, e FPR, f FNR, g NPV, h FDR, i F1 score, and j MCC

The overall performance of the developed model is tabulated in Table 2. From Table 3, the accuracy of the implemented MGS-ROA-DBN has precisely determined the positive observations from the whole observations. Thus, the accuracy of the developed MGS-ROA-DBN is 13.8% superior to PSO, 5.1% superior to GWO, 10.8% superior to WOA, and 2.5% superior to ROA. Moreover, the precision of the improved MGS-ROA-DBN correctly defined the positive observations from the negative values. Therefore, the precision of the proposed MGS-ROA-DBN is 35.7% enhanced than PSO, 11.7% enhanced than GWO, 26.6% enhanced than WOA, and 5.5% enhanced than ROA. Similarly, the NPV of the modified MGS-ROA-DBN is 8.6% better than PSO, 3.2% better than GWO, 6.7% better than WOA, and 1.6% better than ROA. Thence, it is confirmed that the developed MGS-ROA-DBN is outperforming the conventional heuristics-based DBN in detecting DR effectively.

Table 2 Overall Performance analysis of proposed and conventional-based DBN for DR detection
Table 3 Algorithmic analysis of the proposed and conventional models for detecting DR

6.5 Analysis on different classifiers

The performance of the proposed MGS-ROA-DBN is analyzed and compared with the existing classifiers and it is shown in Table 3. In Table 3, the accuracy of the suggested MGS-ROA-DBN is defined precisely. It is 30.1% improved than NN, 32.2% improved than KNN, and 17.1% improved than SVM and DBN. Similarly, the precision of the recommended MGS-ROA-DBN calculated the positive values exactly. Therefore, the precision of the presented MGS-ROA-DBN is 55.4% better than NN, 52.6% better than KNN, and 46.1% better than SVM as well as DBN. Hence, it is concluded that the improved MGS-ROA-DBN is producing the best performance in detecting DR abnormalities.

7 Conclusion

The paper has presented a novel approach for developing automated DR detection by evaluating the retinal abnormalities such as hard exudates, haemorrhages, microaneurysms, and soft exudates. Here, the processing stages of DR included pre-processing, optic disc removal, blood vessel removal, segmentation of abnormalities, and classification. At first, the input retinal fundus image was enhanced using CLAHE. In the next stage, the removal optic disc was done using open-close watershed transformation. Later, the gray level thresholding was performed for removing and segmenting the blood vessels. After the removal of blood vessels and the optic disc, the segmentation of abnormalities was done by top-hat transformation and Gabor filtering. Next, the features such as LBP, TEM, Shannon’s, and Kapur’s entropy were extracted. As the feature vector seemed to very large the optimal feature selection was performed to select the individual features with less correlation. In addition, the categorization of images into four classes such as normal, earlier, moderate, or severe stages was done using the DBN-based classification algorithm. Here, the optimal feature selection and the weight update in DBN was done by the modified algorithm named MGS-ROA. From the results, it states that the accuracy of the suggested MGS-ROA-DBN is 30.1% improved than NN, 32.2% improved than KNN, and 17.1% improved than SVM and DBN, which proves the superior performance of the proposed model. The future extension of this work will consider the segmentation of abnormal features, such as cotton wool, spot drusen, and so on. In addition, the classification could be extended by improved machine learning or deep learning algorithms with new variant of optimization algorithm for attaining the high detection rate.