Professional Documents
Culture Documents
10 19113-Sdufenbed 570597-787762
10 19113-Sdufenbed 570597-787762
DOI: 10.19113/sdufenbed.570597
(Alınış / Received: 27.05.2019, Kabul / Accepted: 30.07.2019, Online Yayınlanma / Published Online: 30.08.2019)
Keywords Absract: Edge detection is one of the most basic stages of image processing and
Edge detection, have been used in many areas. Its purpose is to determine the pixels formed the
Receptive field, objects. Many researchers have aimed to determine objects' edges correctly, like as
Spiking neuronal network they are determined by the human eye. In this study, a new edge detection technique
based on spiking neural network is proposed. The proposed model has a different
receptor structure than the ones found in literature and also does not use gray level
values of the pixels in the receptive field directly. Instead, it takes the gray level
differences between the pixel in the center of the receptive field and others as input.
The model is tested by using BSDS train dataset. Besides, the obtained results are
compared with the results calculated by Canny edge detection method.
Anahtar Kelimeler Özet: Kenar algılama, görüntü işlemenin en temel aşamalarından biridir ve birçok
Kenar algılama, farklı alanda kullanılmaktadır. Kenar belirleme yöntemlerinin amacı görüntüyü
Alıcı bölge, oluşturan pikselleri belirlemektir. Çoğu araştırmacı, insan gözünün belirlediği gibi
İğnecikli sinir ağları nesnelerin kenarlarını doğru algılamayı hedeflemiştir. Bu çalışmada, iğnecikli sinir
ağ yapısına dayalı yeni bir kenar algılama tekniği önerilmiştir. Önerilen model,
literatürde bulunanlardan farklı bir alıcı yapısına sahiptir ve doğrudan alıcı alandaki
piksellerin gri seviye değerlerini kullanmamaktadır. Bunun yerine, girdi olarak alıcı
alanın ortasındaki piksel ile diğerleri arasındaki gri seviye farklarını kullanarak
kenar algılama işlemini gerçekleştirmektedir. Geliştirilen model, BSDS öğrenme veri
seti kullanılarak test edilmiştir. Ayrıca, elde edilen sonuçlar Canny kenar algılama
yöntemi yardımıyla hesaplananlar ile karşılaştırılmıştır.
circular receptive fields. In an another study, a bio- neuronal coding, memory or neuron’s dynamics [28,
inspired model called The Perceptual boundaRy 30, 31]. The model is also more useful as compared to
rEcurrent dEtection Neural (PREEN) in the recurrent HH model, if the model is applied to large-scale
interactions of the early visual areas was proposed by neuronal networks in terms of computational
Diaz-Pernas et al. [22] to detect color natural scenes complexity [19]. It is well known that the variation of
boundaries. They concluded that the proposed model ion channels (Na+ and K+) conductance at the HH
gives better results as compared with the best model have vital effects in spike generation [32]. By
algorithms for some images in Berkeley taking into this consideration, conductance-based IF
Segmentation Test Dataset. A computational model, model was conceived [33].
named as COF, is developed for the orientation-
selective cell in the primary visual cortex - V1 [23]. In In the conductance based integrate-and-fire model,
a recent study, Yedjour et al. [18] have proposed a the time evolution of the membrane potential (𝑣(𝑡))
SNN using Hodgkin-Huxley (HH) model for edge is given as follows [19, 28, 34-36]:
detection. They analyzed the performance of the
model by using five different edge detection methods. 𝑐𝑚
𝑑𝑣(𝑡)
= 𝑔𝑙 (𝐸𝑙 − 𝑣(𝑡)) +..
Although it is stated that the model is evaluated with 𝑑𝑡
𝑗 𝑗 (1)
𝑤 𝑔𝑠𝑦𝑛 (𝑡)
BSDS images and gives more successful results than ..∑𝑗 (𝐸𝑠𝑦𝑛 − 𝑣(𝑡))
𝐴
the classical models, it is seen that the techniques 𝑠𝑦𝑛
612
M. O. Incetas, R. Uzun Arslan / Edge Detection Using Integrate and Fire Neuron Model
fields, gray level values are not directly used, instead divided by subheadings. It should provide a concise
the absolute difference between the gray level values and precise description of the experimental results,
of pixels shown with yellow and the gray level value their interpretation as well as the experimental
of center pixel is utilized. Besides, the blue pixels are conclusions that can be drawn.
ignored and the gray level values of these pixels are
taken as zero. These four different receptive field As stated before, the conductance based IF neuron
allow the determination of edges in different model is simple and easy to analyze as compared
directions by making synaptic connections with four with HH neuron model. Therefore, aforementioned
different neurons in the intermediate layer. network model is carried out based on conductance
based IF neuron model. In the model, (x, y)
represents the pixel coordinate in the RFs and each
pixel in RFs can be defined as the absolute difference
of gray level values (𝐺𝑥,𝑦 ). For the receptive fields
peak conductance value of each pixel is calculated by
the following expressions.
Figure 2. Proposed SNN structure where 𝐺𝑥𝑐 ,𝑦𝑐 is the gray level value of the center pixel
in RFs, 𝑅𝑥,𝑦 is the absolute difference of center pixel
The output of these neurons was summed by each gray level 𝐺𝑥𝑐 ,𝑦𝑐 and its neighbor pixel gray level 𝐺𝑥,𝑦 .
neuron in the output layer to obtain corresponding
𝑞𝑥,𝑦 is the peak conductance and 𝛼 is the
neuron's firing rate. Any direction edge within the
input image can be obtained by means of the firing normalization coefficient.
rates of the neurons at the output layer. To put a finer
point on it, as shown from Figure 2, the preferred Since the synaptic connections are based on the
network model has four parallel arrays that have the absolute difference between the gray level values, the
same dimension with the receptor layer and have peak synaptic conductance value of a neighboring
flagged as N1, N2, N3 and N4 for only one output pixel having the same value with the center pixel will
neuron. These layers linked to receptor layer by be 0 (zero). Hence, the all-synaptic connections have
changeable weight matrices help one to fulfill the been assumed as excitatory synapse. When all the
processing of the edges (right, left, up and down). pixels in the RFs had the same value, there would not
The size of these weight matrices can be changed by be found any spike because all of the peak
taking into consideration the receptive field’s width. conductance would be equal zero.
For instance, neuron N1 links to the receptive field
(RF) through a synaptic connection (wN1) and gives For a neuron in the intermediate layer (e.g. N 1), the
an output if there is an edge. wN1 contains synapses following equations are given:
which are enhances the membrane potential. 𝑠𝑦𝑛
𝑑𝑔𝑥,𝑦 (𝑡) 1 𝑠𝑦𝑛
=− 𝑔 (𝑡) + 𝑞𝑥,𝑦 (4)
If all of the pixels within the RF have the same gray 𝑑𝑡 𝜏𝑠𝑦𝑛 𝑥,𝑦
level value, the absolute value of the difference
between the gray level values of the neighboring 𝑐𝑚
𝑑𝑣𝑁1 (𝑡)
= 𝑔𝑙 (𝐸𝑙 − 𝑣𝑁1 (𝑡)) +
pixels and the gray level values of the center pixel will 𝑑𝑡
𝑁1 𝑠𝑦𝑛
𝑤𝑥,𝑦 (𝑡)𝑔𝑥,𝑦 (𝑡) (5)
be 0. This will not change the membrane potential of ∑(𝑥,𝑦)∈𝑅𝐹1 (𝐸𝑠𝑦𝑛 − 𝑣𝑁1 (𝑡))
𝐴𝑠𝑦𝑛
neuron N1, thus neuron N1 will not fire any spike. On
the other hand, if the image in the RF has an upper
Where 𝑐𝑚 is the membrane capacitance, 𝑔𝑙
edge, the N1 will fire spike with the help of synaptic
represents the membrane conductance and 𝐸𝑙 is
connections found just below the center.
reversal potential of the membrane. 𝐸𝑠𝑦𝑛 is the
One can think that wN1 is like a filter that find the reversal potential of the synapses connected to RF 1.
𝑠𝑦𝑛
upper-edge within the receptive field. Similarly, 𝑔𝑥,𝑦 represents the conductance of the synapse
within the receptive field, the down-edge can be corresponding to the pixel in RF and 𝐴𝑠𝑦𝑛 is the
detected by neuron N2 with the synaptic matrix with membrane patch area connected to the synapse. 𝑤𝑥,𝑦 𝑁1
wN2; the left-edge can be detected by neuron N3 with shows the weight of the synapses and calculates as:
the synaptic matrix with wN3; and the right-edge can
be detected by neuron N4 with the synaptic matrix 0 𝑖𝑓 (𝑦 − 𝑦𝑐 ) ≠ 1
with wN4. Finally, the neuron in the output layer sums
𝑁1
𝑤𝑥,𝑦 ={ −
(𝑥−𝑥𝑐 )2 (𝑦−𝑦𝑐 )2
−
(6)
𝛿𝑥 𝛿𝑦
the all of the outputs of these neurons at the 𝑤𝑚𝑎𝑥 𝑒 𝑖𝑓 (𝑦 − 𝑦𝑐 ) = 1
intermediate layer and can elicit any direction edge
within the receptive fields (RFs). This section may be
613
M. O. Incetas, R. Uzun Arslan / Edge Detection Using Integrate and Fire Neuron Model
Where (xc , 𝑦𝑐 ) gives the center of the RF1, (δx , 𝛿𝑦 ) are compared with the Canny edge detector known as the
constants and wmax are the maximum weight for most common edge detection method.
synapses. Similarly, these equations are also valid
and should be calculated for other neurons at the
intermediate layer (that is N 2, N3, N4). If 𝑣(𝑡) reaches
a certain threshold 𝑣𝑡ℎ (spiking threshold), it is
instantaneously reset to a lower value 𝑣𝑟 (reset
potential) for a time 𝜏𝑟𝑒𝑓 (refractory time) and a
spike occurs. Let 𝑆𝑁𝑖 (𝑡) gives a spike train, which is
fired by neuron 𝑖; Figure 3. The result of the edge detection
1 𝑖𝑓 𝑛𝑒𝑢𝑟𝑜𝑛 𝑖 𝑓𝑖𝑟𝑒𝑠 𝑎 𝑠𝑝𝑖𝑘𝑒 𝑎𝑡 𝑡𝑖𝑚𝑒 𝑡 In Figure 4, the first row shows 3 images in BSDS
𝑆𝑁𝑖 (𝑡) = {
0 𝑖𝑓 𝑡ℎ𝑒𝑟𝑒 𝑖𝑠 𝑛𝑜 𝑠𝑝𝑖𝑘𝑒 𝑎𝑡 𝑡𝑖𝑚𝑒 𝑡 (7) Train dataset. The edges of these images that are
determined by the users manually are displayed at
Finally, each neuron in the output layer (𝑁(𝑥 ′ , 𝑦 ′ )) is the second row of the figure. The results, which were
defined by the following equations [19]: determined by using the proposed model and Candy
edge detection method, are given in the third and
𝑠𝑦𝑛
𝑔𝑥 ′,𝑦′ (𝑡) 1 𝑠𝑦𝑛 fourth rows of the figure, respectively. Both of these
=− 𝑔 ′ ′ (𝑡) + (𝑤𝑁1 𝑆𝑁1 (𝑡) methods are quite successful for these images. The
𝑑𝑡 𝜏𝑠𝑦𝑛 𝑥 ,𝑦 (8)
+ 𝑤𝑁2 𝑆𝑁2 (𝑡) + 𝑤𝑁3 𝑆𝑁3 (𝑡) success of the proposed model as F-score were
+ 𝑤𝑁4 𝑆𝑁4 (𝑡)) 0.7681, 0.7369 and 0.9536 by column order, whereas
the success of the Candy edge detection method was
𝑑𝑣𝑥 ′ ,𝑦′ (𝑡) obtained 0.7372, 0.7135 and 0.9542, respectively.
𝑐𝑚 = 𝑔𝑙 (𝐸𝑙 − 𝑣𝑥 ′ ,𝑦′ (𝑡))
𝑑𝑡
𝑠𝑦𝑛
𝑔𝑥 ′ ,𝑦′ (𝑡) (9)
+ (𝐸𝑠𝑦𝑛 − 𝑣𝑥 ′ ,𝑦′ (𝑡))
𝐴𝑠𝑦𝑛
614
M. O. Incetas, R. Uzun Arslan / Edge Detection Using Integrate and Fire Neuron Model
calculated by proposed model are 0.6006, 0.0955 and although there is a slight difference in the calculated
0.1648, whereas they are computed as 0.8718, F-score values. For this reason, it is planned to make
0.0864 and 0.1572 by Candy edge detection method. changes on the network structure in order to
increase the Recall values in future studies.
References
615
M. O. Incetas, R. Uzun Arslan / Edge Detection Using Integrate and Fire Neuron Model
616