1. Introduction
According to statistics of the World Health Organization (WHO), glaucoma is the second leading cause of blindness in the world [
1]. It is estimated that people with glaucoma will increase to 111.8 million in 2040 [
2].
An early diagnosis of glaucoma is of great importance. Glaucoma is irreversible after blindness, which leads to structural modifications as the disease progresses [
3]. Fortunately, glaucoma has a long lesions cycle, and the patient’s vision is slowly weakened. If detected and treated as early as possible, patients still can maximize the preservation of useful vision to maintain a normal life and work life [
4]. Therefore, the early diagnosis and treatment of glaucoma are particularly necessary.
In actual medical diagnosis, ophthalmologists usual use cup to disk ratio (CDR [
5]) as one of the factors in diagnosing glaucoma. The optic disc (OD) in the digital fundus image is the area where blood vessels and optic nerve fibers enter the retina. In digital fundus images, OD appears as a bright oval area, and the optic cup (OC) is the brighter oval area in the center of OD [
1]. When the ratio of optic cup to the optic disc that means the diameter of the cup divided by the diameter of the disc [
6,
7] is greater than 0.6, which is considered to indicate glaucoma [
8]. Glaucoma and normal fundus images are shown in
Figure 1.
Figure 1a shows a fundus diagram with glaucoma, for which its CDR is much greater than 0.6, while
Figure 1b is a fundus of the normal eye, which can be seen when the central bright area; that is the cup area, and it is much smaller than the optic disc area. Therefore, many scholars use computers as an aid for the early diagnosis of glaucoma. The effective division of the optic disc area on the fundus is of extraordinary significance to the diagnosis of glaucoma. In this paper, the segmentation of the OD region is the main research focus.
In recent years, different approach of optic disc segmentation such as machine learning and clustering have been proposed so far. Thus, a deep learning architecture called M-Net is proposed by Fu, H. [
9], which uses U-shaped neural networks as the main frame and introduces polar coordinate transformations to solve the problem of OD segmentation in a multi-level label system. Al-Bander and Baidaa et al. [
10] found a new method based on deep learning that separates OD in the fundus image by using a combination of a fully convolutional network and DenseNet. Although deep learning-based approaches obtain a satisfactory performances of optic disc segmentation, those approaches require a huge number of data for the time-consuming training required. On the basis of color similarity and image proximity, Achanta et al. [
11] segmented the optic disc with the generation of superpixels using clustering. There is no doubt that superpixel methods do not consider color information, which may adversely impact performance.
There are many drawbacks when applying deep learning to the segmentation of optic discs. One of the main reason for this is that the glaucoma datasets are too small to meet the training requirements of deep learning. The datasets originate from hospitals, and to protect the privacy of the patient, the patient’s permission must be obtained [
12]. Furthermore, the optic disc must hand labeled by experienced ophthalmologists, which undoubtedly increases the difficulty of obtaining datasets.
To overcome the drawback of the lack of glaucoma dataset, a new particle swarm optimization-based approach for optic disc segmentation SePSO is proposed in our work. The proposed algorithm does not require large amounts of data for preprocessing, which is a self-learning approach. In addition, the information of image color and optic disc shape is also taken into our consideration, which reduces the interference of relevant information on experimental results [
13].
Furthermore, the subsequent sections are organized as follows:
Section 2 describes details on the PSO approach that we modified for the segmentation of optic disc.
Section 3 provides some results with datasets, evaluation parameters used for our experimental study, and the discussion. Moreover, the conclusion is highlighted in
Section 4.
2. Materials and Methods
This section described the Particle Swarm Optimization algorithm that we modified in this paper to segment the optic disc in retinal images. As described by Shi and Eberhart [
14], PSO is a multi-agent system, and the system is initialized with a population of random solutions. For each potential solution, called particle, all particles fly in the exploration area for the global optimum. Each particle tracks its coordinates in exploration area. The coordinates of each particle tracks are associated with the best solution [
15] (fitness) achieved by itself so far, which is called
, and the entire group’s best solution, which is called
. The particle can be described as
, where
is the current position of particle, and
is the current velocity of particle. Each particle moves toward
and
at every iteration.
The basic idea of PSO is to find the optimal solution through collaboration and information sharing between individuals in the animal populations. Usually, the PSO algorithm can be used to optimize continuous nonlinear functions and to solve some discrete problems.
In this paper, the optic disc segmentation problem is converted into a series of the extreme value problem. Based on a large number of experiments, we found that it is not sufficient to solve the optic disc segmentation problem by original PSO. To solve this problem, we propose an improved algorithm based on Particle Swarm Optimization, called SePSO. The goal of SePSO is to find a set of best solutions for the particles. Moreover, the closed shape formed by these particles is the boundary of the predicted optic disc. The components of the SePSO algorithm we modified are described in subsequent sections.
2.1. Subgroups and Edges
In this paper, the PSO approach has been used in segmenting OD in a fundus image. In order to achieve this goal, the concept of subgroups are drawn into PSO. The entire particle group is divided into a certain number of subgroups
. There are
N subgroups in the original group, where the subgroups consist of the same number of particles
. Particles in every subgroups are marked with numbers from 1 to
. For a clear expression,
represents a particle with a label of
in the
ith subgroups. Each subgroup
, which searches within its respective regions (details in
Section 2.2.1), contains some particles
. The subgroups
can be described as Equation (
1):
where
is the ith subgroup;
The parameter ;
is the number of particles belonging to every single subgroup;
is the particle marked as in subgroup .
The closed curve, which consists of all the
particles in each subgroups connected, is called
in this paper. The number of potential boundary is the same as the number of particles in each subgroup, which is
. In addition,
is the potential solution of optic disc boundary.
can be defined as Equation (
2):
where
is the jth potential OD boundary;
The parameter ;
N is the number of subgroups;
is the position of particle in subgroup .
As the search progresses, most particles in each subgroup converge to the optimal solution and the
with best solution (fitness, details in
Section 2.3) makes up the final predicted boundary.
2.2. Exploration Area and Initiation
2.2.1. Exploration Area
Using the SePSO algorithm for OD segmentation means that each particle searches in the two-dimensional space for a set of
. Obviously, the entire two-dimensional space in original image is too broad for all the particles to search. It is advisable to optimize the exploration area first. To simplify the search processing, reduce the computation time and increase the accuracy of OD segmentation; we pre-process the original images in three steps.
Figure 2 shows the diagram of exploration area.
Firstly, the ROI images prepared for OD segmentation are initially resized to
pixels by using the interpolation of a Lanczos interpolation [
16] over an 8 × 8 pixel neighborhood. On one hand, making the size of images homogeneous is helpful for the subsequent calculations and evaluations. On the other hand, the exploration area can be compressed as small as possible on the premise of preserving features.
Secondly, according to prior knowledge and the circle nature of the optic disc, we set the entire exploration area as an annular area. Considering the center of the disc as the center
of the entire exploration area, the outer
and inner
exploration contours are, respectively, defined by the circle of center
and radius
and
, which are defined as Equation (
3).
In addition, a polar transform [
17] is applied to OD segmentation. The entire exploration area consists of a series of radial points, which is defined as a radial points map
. The radial points map is a two-dimensional polar coordinate system, and the points represent where particles are likely to explore. The radial points of this map are described by distance and angle, where the polar coordinate of
is
. Rays that proceed horizontally to the right from
are called polar axes [
18]. The distance between the search points and center point
is called radius
. The angle is calculated by gradually adding an increment of
. Therefore, the location of pixels on the map is described with a radius and angle by Equation (
4):
where
is the particle in the exploration map;
is the distance between and ;
is the angle of .
Therefore, the Cartesian coordinates of pixel
is described with radius and angle by Equation (
5).
where
and is the horizontal and vertical ordinate of ;
and is the horizontal and vertical ordinate of .
The entire exploration area
consists of a set of pixels, which can be described as Equation (
6).
Similarly to the relationship between
and
, the exploration area of subgroups
is not only defined as part of the entire exploration area or any two regions that do not intersect. Equations (
8) and (
9) are the properties and definition of
:
where
is the exploration area of subgroup
.
2.2.2. Initiation
The shape of the optic disc varies from circle to ellipse, and usually it is an irregular approximation of the ellipse. If too few points are used for fitting, it is difficult to express the true disc’s boundary. The more points are used for fitting, the closer the fitted shape is to the real boundary. However, too many points will slow down the calculation and increase time complexity. We need to find the proper number of points to balance speed and accuracy. In this paper, the number of points on the boundary is equal to the number of subgroups N. The influence of the parameter N will be shown in subsequent experiments.
In PSO, the particle number of each subgroup usually is between 20 and 40. The more particles there are, the wider the search space is. It is easy for SePSO to find the global optimal solution with more particles; however, computational consumption will become higher.
In this paper, the particle number is set as based on a large number of experiments.
Each particle is assigned a randomized location at the beginning. Considering of the circle nature of OD, the distances from particles on the predicted boundary to should be equal approximately for each j. Therefore, the initial location of each particle is set using the following rules:
For all particles belonging to the same having the same radius r, r is the distance between and center .
The radius r of particles on is randomly assigned from to . Based on experiments, is set as 30% of the image width, and is the 70% of the image width.
2.3. Fitness Function
When particles fly in the subgroup’s exploration area
, an indicator should be introduced to evaluate the locations, and a fitness function is used as the indicator in this paper. In the task of image segmentation, considering the differences between the OD region and the surrounding space, the red channel of the original RGB image is separated to calculated the gradient of every radial points in the exploration area [
19]. The differences between the images of blue, green, and red channels are showed in
Figure 3. The gradient is regarded as the fitness value of points.
Figure 4 shows the different gradient between original exploration and modified exploration. The fitness value of each point is calculated as Equation (
10).
We have the following equation:
where
In addition, the potential contours of OD, which is described as
, consists of the
jth particle in every subgroup
. The higher the fitness of a point, the more likely it is that the point is part of the boundary. The higher the fitness value is, the higher the possibility that it is part of
. The fitness of
can be calculated with Equation (
11):
where
is the fitness of the
jth particle in subgroup
.
2.4. Position Update
In the traditional PSO, each particle changes the location toward the particle’s best location
and the global best location
at each step. There are three control parameters, the inertia weight
, the cognitive
, and social
acceleration, that play an important part in the exploration and exploitation capability of PSO. The velocity of every particle can be calculated as Equation (
12):
where
is the velocity of the jth particle in subgroup ;
is the inertia weight;
, which is a random number;
and are named as acceleration coefficients. Usually, ;
is the best location of has flied;
is the best location of the entire subgroup .
However, after a series of experiments (see
Section 3.3.1), the fitness of the vessel boundary in the fundus image may be greater than the gradient of optic disc boundary, which is possible to interfere with the optimization results of the particles. Therefore, we take the attraction between particles in adjacent subgroups into account in order to solve this problem.
The modified velocity is calculated as Equation (
13).
As the system iterates, the individual agents, which are based on the interaction of the subgroup’s public search and the particle’s search, are drawn toward a global optimum. The position vector of each particle is updated as Equation (
14).
PP and GP are also updated as iteration proceeds. The updated rules are described by Equations (
15) and (
16).
2.5. Algorithm
SePSO evaluates the quality of particle positions by using the radial gradient value as the fitness value. On fundus diagrams, the location with high radial gradient values include the optic disc boundary, the optic cup boundary, and the vascular region. In order to segment the clear boundary of the optic disc and reduce the interference of blood vessels and optic cup located in the central area of the optic disc, the exploration area of the entire population is confined to a relatively narrow circular area. This exploration area can not only meet the exploration needs of particles but also avoid particles falling into local optimization as much as possible. In addition, the application of active shape models transforms image segmentation tasks into a set of extreme value problems that are easy to solve by PSO. To implement this mechanism, we divide the entire particle swarm into multiple subgroups pop, and at the same time, we divide the exploration space into multiple subspaces accordingly; each subgroup solves an extreme value problem, each particle on the subgroup corresponds to a feature point on the shape model, and all subgroups form a multi-group solution of the shape model. The quality of the shape model is determined by the fitness of all particles that make up the model at their current positions.
In the search for an optimal solution, each particle is represented by a triplet (, , and ), and shape model is defined by the position of a set of particles. The boundary of the disc is an approximate ellipse, and the position of adjacent particles on the shape model has some guiding significance for the particle. To take full advantage of this property, particles are attracted to the local optimal solution and the global optimal solution. Moreover, the movements of the particles are also affected by the attractions between adjacent particles. Shape model deforms as the iterative process progresses, ultimately finding the optimal solution.
The main flow of the proposed Algorithm 1 is shown in the pseudo-code.
Algorithm 1: Pseudo-code for the main particle management algorithm. |
input : A map of exploration area |
output: A set of points |
|
3. Results and Discussion
This section describes the hardware facilities, software, and dataset used in the experiment and, furthermore, includes the evaluation and performance metrics of the proposed approach.
3.1. Software and Datasets
All experimental results are tested on PyCharm 2021 free community version with Python 3.8.7, AMD “Zen 3” Core Architecture with 5600X CPU and 64-bit Operating System. In addition, the fundus images used for our experimentation belongs to public datasets provided below.
The Drishti-GS is public access and available for free [
21]. The dataset consists of 101 images, which is divided into 50 testing and 51 training images. The dataset is generated from Aravind eye hospital. There are four experts to segment the OD region manually, and all OD regions are fused together to generate the soft map. In this paper, we regard the region with 75% support rate as the true ground of OD.
Up to date, there are three releases of Rim-ONE datasets. The first one is segmented by five experts manually, which consists of 169 images. The second one consisting of 455 images segmented by one expert is classified into glaucoma (including the glaucoma suspicious images) and normal. The most recent one, which is used for our experimentation, consists of 159 images [
22], which is collected at the Hospital Universitario de Canarias and divided into 85 images of healthy subjects, 39 confirmed glaucoma individuals, and 35 that are suspicious subjects.
3.2. Performance Metrics
The performance of the proposed method for segmenting OD when compared with the ground truth is evaluated using many evaluation metrics that can be defined according to four parameters: , ,, and .
True Negative
is the region segmented as OD that proved to be not OD and is defined as Equation (
17):
where
is the optic disc region that is segmented;
is the region that belongs to ground truth;
is the region that belongs to the background.
False Negative
, which is the region segmented as not OD that proved to be OD, is defined in Equation (
18).
True positive
, which is the region segmented as OD that proved to be OD, is defined in Equation (
19).
False Positive
, which is the region segmented as OD that proved to be not OD, is defined in Equation (
20).
In this paper, the evaluation metrics such as Dice similarly, overlapping error, and accuracy are used to identify the level of accuracy of OD segmentation, which can be defined as Equations (
21)–(
23).
Accuracy: It is the measure of correctness or preciseness with respect to some standard [
23]. It is calculated as provided in Equation (
21).
Dice similarity: It is a metric that is used to calculate the similarity between two samples that may be images or any other data. It is calculated as provided in Equation (
22).
Overlapping error: Overlapping error
E is the one of the important indicators of image segmentation. In this paper, it is calculated using the detected boundary and the ground truth by Equation (
23).
3.3. Performance of Optic Disc Segmentation
3.3.1. Parameter Influence
In order to obtain the best results with proposed method, there are some important parameters that should be adjusted. These parameters are as follows: the number of subgroups
N, which affect the
in
Section 2.1;
,
,
, and
, which affect the position update as described in
Section 2.4; and the number of iterations.
Based on a large number of experiments on dataset, the proposed method produces the best solutions with the following parameter settings:
,
,
,
, and number of iteration = 100 (see
Table 1). The values of
,
,
,
,
,
, and
E produced by the proposed approach for optic disc segmentation are observed to be 84.88%, 0.73%, 99.27%, 15.12%, 92.28%, 90.35%, and 17.49% in the Drishti-GS dataset.
We have varied each parameter individually to observe its influence. Some of these parameters mainly affect the quality of the solutions, while some have more impact on the computation time needed to obtain the solutions.
The number of subgroups N: This parameter affects the number of points that make up the boundary. The higher the value
N, the closer the fitted shape is to the true boundary. However, too many subgroups increase the calculation time’s complexity. There are some experiments that show the impact of this parameter on accuracy and calculation time.
Table 2 provides
E,
and the calculation time for a different number of subgroups in Drishti-GS.
Figure 5 shows the optic disc segmentation in Drishti-GS with different numbers of subgroups. It can be seen clearly from
Table 2 and
Figure 5 that, when the number of subgroups equals to 50, good results can be achieved. In fact, if the number of subgroups is set to a higher value, better solutions can be obtained.
, , and : These parameters affect the velocity of particles.
and
are used to ensure that particles move toward the best global location. Usually,
in the traditional PSO algorithm. Therefore, the experiments start by setting these two parameters
and
to 2. The predict boundaries are not sufficient to fit ground truth boundary. The reason is that it is difficult to converge to optimal solutions of all the subgroups. Therefore, we introduce the attraction between adjacent particles by
.
Table 3 provides the
E,
and
for different parameter settings in Drishti-GS. It can be seen that the algorithm can performs optimally when
and
.
The inertia weight ω: To obtain a better accuracy of OD segmentation with proposed method, an inertia weight strategy is applied to our experiments. Inertia weight
is an important parameter in PSO, which significantly affects the convergence and exploration in PSO processes. Since the inception of inertia weight in PSO, a large number of variations of inertia weight strategy have been proposed [
24]. In this paper, we compared the constant inertia weight, linear descending inertia weight, random inertia weight, and chaotic random inertia weight based on Drishti-GS dataset.
Table 4 shows the different strategies of inertia weight. The parameter settings of all those experiments are
,
,
, and
.
Table 5 provides E, Acc, and Dice for inertia weights with different strategies. It can be observed that the algorithm can perform optimally with the chaotic random inertia weight, which is 0.75% higher in Acc than the linear descending inertia weight, 0.17% higher in Dice, and 0.28% lower in E than the constant inertia weight.
3.3.2. Comparison with Other Methods
A recent comparison of optic disc segmentation methods was presented in [
29] using Rim-ONE and Drishti-GS datasets. Those datasets contain disc segmentations of 169 and 101 images, and they are publicly available and are free.
Table 6 shows the evaluation results for disc segmentation using different methods in Rim-ONE and Drishti-GS datasets. Moreover, the information in
Table 6 is quoted from the article of N. Thakur et al. [
29] in 2019.
As we can see, the proposed SePSO algorithm performs better in the Drishit-GS dataset than the best method (region growing) in the performance parameter
. The algorithm performs better on the Rim-ONE dataset and 2.59% higher than the region-based growth algorithm that is optimal among the four algorithms and 1.81% higher on Drishti-GS dataset. To further show performance and increase the comparability of the proposed method, additional evaluation indicators are used, as shown in
Table 7.
4. Conclusions
In this paper, we propose an improved method based on particle swarm optimization, called SePSO, for optic disc segmentation in retinal fundus images. In the disc segmentation task, the deformation of the segmented contour is completed by changing the position of the particles, and the optimal contour is solved by iterative update. In addition, the constraint equations for particle position and velocity are optimized. The particles are additionally attracted by adjacent subgroups in addition to the attraction of local optimal solutions and global optimal solutions during flight. Based on Drishti-GS, we test the influence of different parameter of the proposed method on the segmentation effect.
Particles in subgroups can learn optimal solution information between adjacent populations in the process of optimization, which greatly enhances the anti-interference ability of particles. The proposed method has been tested using Rim-ONE and Drishti-GS datasets and compared to other state-of-the-art methods, such as methods based on superpixels, contours, thresholds, and region growth method. Experimental results show that the algorithm performs better on both datasets than the other four algorithms, which confirms its effectiveness and superiority.
In future studies, we aim to conduct the proposed SePSO approach for solving optic cup segmentation. The simultaneous division of OC and OD has great clinical medical value, and the segmentation of the OC will become the next research content of our work.