continuous-valued quaternionic hopfield neural …valle/pdffiles/talk17bracisa.pdf · fidelis...
TRANSCRIPT
Continuous-Valued Quaternionic Hopfield NeuralNetwork for Image Retrieval: A Color Space Study
Fidelis Zanetti de Castro andMarcos Eduardo Valle*
Department of Applied MathematicsInstitute of Mathematics, Statistics, and
Scientific ComputingUniversity of Campinas - Brazil
4 October 2017
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 1 / 25
Hopfield Model and Quaternionic Networks
The Hopfield neural network is a famous model that implementsassociative memory and solves optimization problems.
In the past years, the Hopfield network have been extended toquaternions.
Quaternionic neural networks treat four-dimensional data as a singleentity. Applications include control, signal and image processing,classification, and prediction.
We know only one paper on quaternionic Hopfield neural network(QHNN) for color images retrieval. Here, a color is converted into aquaternion using the RGB space.
There exists, however, other color spaces besides the RGB!
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 2 / 25
Quaternions
A quaternion is an hypercomplex number
q = q0 + q1i + q2j + q3k,
where i2 = j2 = k2 = ijk = −1 are the hyper-imaginary units.
The conjugate and the norm of a quaternion q are
q̄ = q0 − q1i− q2j− q3k,
and|q| =
√q2
0 + q21 + q2
2 + q23 .
We say that q is a unit quaternion if |q| = 1. We denote by S the setof all unit quaternions, that is,
S = {q : |q| = 1}.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 3 / 25
Phase-Angle Representation
Alternatively, a quaternion can be written using the phase-anglerepresentation:
q = |q|eiφekψejθ,
where φ ∈ [−π, π), θ ∈[−π
2 ,π2
), and ψ ∈
[−π
4 ,π4
].
The phase-angle representation is derived from the relationshipbetween quaternions and rotations in R3.
Note thatq = eiφekψejθ,
is a unit quaternion!
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 4 / 25
Discrete-Time Bipolar Hopfield Neural Network
The discrete-time bipolar Hopfield network is defined by
xi(t + ∆t) =
{sgn
(vi(t)
), vi(t) 6= 0,
xi(t), vi(t) = 0,
where
vi(t) =n∑
j=1
wijxj(t),
is the activation potential of the i-th neuron, sgn is the signumfunction, and
xi(t) ∈ {−1,+1},
is the state of the i-th neuron.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 5 / 25
Quaternionic Hopfield Neural Network
The discrete-time continuous-valued quaternionic Hopfield network(QHNN) is given by
xi(t + ∆t) =
{vi(t)/|vi(t)|, vi(t) 6= 0,xi(t), vi(t) = 0,
where
vi(t) =n∑
j=1
wijxj(t),
is the quaternionic activation potential of the i-th neuron and its statexi(t) is an unit quaternion.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 6 / 25
Like traditional Hopfield network, a QHNN always settles at astationary state if the synaptic weights satisfy
wij = w̄ji and wii ≥ 0, ∀i , j .
A QHNN can implement an associative memory as follows:Given quaternionic vectors u1, . . . ,up whose components are unitquaternions, define the synaptic weight matrix by
W = UU†,
where U = [u1, . . . ,up] is a n × p matrix and U† denotes itsMoore-Penrose generalized inverse.
Given an initial state vector x(0), the network evolves to anequilibrium y = limt→∞ x(t) which corresponds to the vector recalledby the associative memory.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 7 / 25
Suppose we want to store the following color images of size 64× 64:
We need a correspondence between colors and unit quaternions!
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 8 / 25
The RGB Color Space
In the RGB space CRGB, a color c = (r ,g,b) is characterized by theamount of red (r), green (g), and blue (b) intensities.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 9 / 25
From CRGB to S and vice-versa
In the paper, we provide the mapping FRGB for the conversion fromCRGB to S and vice-versa. Basically, c = (r ,g,b)→ eiφekψejθ bysetting
r ∈ [0,1]→ φ ∈ [−π + τ, π − τ ] ≈ [−π, π)
g ∈ [0,1]→ ψ ∈ [−π4
+ τ,π
4− τ ] ≈ (−π
4,π
4)
b ∈ [0,1]→ θ ∈ [−π2
+ τ,π
2− τ ] ≈ [−π
2,π
2)
The red channel is mapped into a circle! Different colors aremapped to very close quaternions!
The distortion caused by the transformation of CRGB into S is
δRGB = supc1 6=c2
∆Eab(c1,c2)
|FRGB(c1)− FRGB(c2)|≈ 393,240.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 10 / 25
Illustrative Example
We synthesized a QHNN/RGB designed for the storage of{uξRGB : ξ = 1, . . . ,12}, where uξRGB ∈ S4096
3 is obtained applyingFRGB in an entry-wise manner.
We presented images corrupted by• Gaussian noise with variance σ2 = 0.01,• Impulsive noise with probability p = 0.05.
The following shows the corrupted images and retrieved images.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 11 / 25
Gaussian noise Impulsive noise
Inpu
tIm
age
∆Eab = 29.89 ∆Eab = 1.98
QH
NN
/RG
B
∆Eab = 19.52 ∆Eab = 6.21
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 12 / 25
The HSV Color Space
In the HSV space CHSV , a color c = (h, s, v) is characterized bythree subjective attributes: hue (H), saturation (S), and value (V).
Hue represents the dominant color as perceived by an observer. It isan angle from 0 to 360 degrees.
Saturation s ∈ [0,1], is the relative purity of white light mixed with ahue.
The value v ∈ [0,1], also called lightness, describes how dark thecolor is.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 13 / 25
The HSV Color Space
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 14 / 25
From CHSV to S and vice-versa
In the paper, we provide the mapping FHSV for the conversion fromCHSV to S and vice-versa. Basically,
h ∈ [0,360)→ φ ∈ [−π, π)
s ∈ [0,1]→ ψ ∈ [−π4
+ τ,π
4− τ ] ≈ (−π
4,π
4)
v ∈ [0,1]→ θ ∈ [−π2
+ τ,π
2− τ ] ≈ [−π
2,π
2)
Since hue is an angle, there is a one-to-one correspondencebetween h and the phase-angle φ.
The distortion δHSV caused by the mapping FHSV is
δHSV = supc1 6=c2
∆Eab(c1,c2)
|FHSV (c1)− FHSV (c2)|≈ 6,368.
Recall that δRGB ≈ 393,240.Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 15 / 25
Illustrative Example
For example, we synthesized a QHNN/HSV designed for the storageof 12 color images.
Upon presentation of the images corrupted by• Gaussian noise with variance σ2 = 0.01,• Impulsive noise with probability p = 0.05,we obtained the following:
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 16 / 25
Gaussian noise Impulsive noise
Inpu
tIm
age
∆Eab = 29.89 ∆Eab = 1.98
QH
NN
/HS
V
∆Eab = 9.74 ∆Eab = 11.29
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 17 / 25
The CIE-LAB and CIE-HCL Color Space
In the CIE-LAB space, the Euclidean distance between two pointsresembles the color difference perceived by the human brain.
A color c = (L,a,b) ∈ CLAB has the following interpretation:• The coordinate L ∈ [0,100] represents the lightness,• The coordinates a and b correspond to the green-red positions,• The coordinates a and b correspond to the blue-yellow positions.
The CIE-HCL CHCL space is obtained by writing the CIE-LAB usingcylindrical coordinates.
A color is represented by c = (}, c,L), where L is the lightness, c isthe chroma, and } is the hue.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 18 / 25
From CRGB to S and vice-versa
In the paper, we provide the mapping FHCL for the conversion fromCHCL to S and vice-versa. Basically,
} ∈ [−π, π)→ φ ∈ [−π, π)
c ∈ [−300,300]→ ψ ∈ [−π4
+ τ,π
4− τ ] ≈ (−π
4,π
4)
L ∈ [0,100]→ θ ∈ [−π2
+ τ,π
2− τ ] ≈ [−π
2,π
2)
The distortion caused by the mapping FHCL is
δHCL = supc1 6=c2
∆Eab(c1,c2)
|FHCL(c1)− FHCL(c2)|≈ 4,103.
Recall that
δRGB ≈ 393,240 and δHSV ≈ 6,368.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 19 / 25
Gaussian noise Impulsive noise
Inpu
tIm
age
∆Eab = 29.89 ∆Eab = 1.98
QH
NN
/HC
L
∆Eab = 27.65 ∆Eab = 6.60
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 20 / 25
Computational Experiments
We synthesized QHNN/RGB, QHNN/HSV, andQHNN/HCL,designed for the storage of the 12 color images.
We probed the memories with images corrupted by either• Gaussian noise with variance σ2 varying from 10−3 to 0.25.• Impulsive noise with probability r ∈ [10−3,1].
The following images show the average ∆Eab error by the noiseintensity.
The average ∆Eab was obtained by corrupting each original colorimage 10 times.
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 21 / 25
Gaussian Noise
10
15
20
25
30
35
40
45
10-3
10-2
10-1
Average error
Gaussian noise
InputCV-QHNN/RGBCV-QHNN/HSVCV-QHNN/HCL
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 22 / 25
Impulsive Noise
0
5
10
15
20
25
10-3
10-2
10-1
100
Average error
Impulsive noise
InputCV-QHNN/RGBCV-QHNN/HSVCV-QHNN/HCL
Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 23 / 25
Concluding Remarks
In this paper, we investigated the performance of the quaternionicHopfield neural network (CV-QHNN) for the storage and retrieval ofcolor images using the color spaces: RGB, HSV, and CIE-HCL.
The color conversion plays an important role in the noise toleranceof a quaternionic network and requires further investigation.
Preliminary computational experiments showed that theCV-QHNN/HSV can be used for the removal of Gaussian noise.
In the future, we plan to investigate applications of the quaternionicHopfield neural networks for color imagery processing and analysis.
Thank you!Marcos Eduardo Valle (Unicamp) Quaternionic Hopfield Network 4 October 2017 24 / 25