Research Article

Ensemble Framework of Deep CNNs for Diabetic Retinopathy Detection

Algorithm 1

The proposed algorithm.
Require: fundus images (X,Y); where Y={y/y ϵ {normal, mild, moderate, severe, PDR}}
Output: the trained model that classifies the fundus images xϵX
(1)Perform preprocessing:
(i)Resize the image to dimension 786 × 512
(ii)Perform augmentation: randomly crop five patches, of size 512 × 512, of each image and perform flip flop and 90 degree rotation
(iii)Mean normalize the each image
Import a set of pretrained models ={ DenseNet-121 }
Replace the last fully connected layer of each model by a layer of (5 × 1) dimension
for eachdo
α = 0.0001
for epochs=1 to 50 do
  for each mini batch(Xi,Yi) ϵ (Xtrain, Ytrain) do
   Update the parameters of the model h(.) using Eq.2
   if the validation error is not improving for five epochs then
   stop training
  end
 end
end
end
foreach xϵXtestdo
 Ensemble the output of all models, , using equation (3)
End