Advances in DIP2
Transcript of Advances in DIP2
-
7/31/2019 Advances in DIP2
1/67
Advances in DIP( Fuzzy , Artificial Neural Networks,Expert System and Image Segmentation)
Minakshi Kumar
Photogrammetry and Remote Sensing Division ,Indian Institute of Remote Sensing
Dehradun
-
7/31/2019 Advances in DIP2
2/67
Fuzzy
ORIGIN:
Aristotle some 2000 years ago formulated Conventional Logicas the Law of Excluded Middle (ie., Crisp Set) , which hasdominated Western Logic ever since..
But the era was over..
Lotfi Zadeh, Professor, University of California at Berkley,had
first conceived the idea of Fuzzy Logic during 1960s as a way ofprocessing data by allowing partial set membership rather thancrisp set membership.
-
7/31/2019 Advances in DIP2
3/67
WHAT IS FUZZY LOGIC (FL).?
FL provides a simple way to arrive at adefinite conclusion based upon vague,
ambiguous, imprecise, noisy, or missing inputinformation.
FL is basically a multi-valued logic that allows
intermediate values to be defined betweenconventional evaluations like yes/no,
true/false, black/white etc. Notions like ratherwarm or pretty cold can be formulated
mathematically and processed by computers
-
7/31/2019 Advances in DIP2
4/67
Fuzzy Set Basics
Classical (crisp) sets: Membership in a set is all or nothing
Membership function cS: Universe {0, 1}
cS(x) = 1 iff x S
Fuzzy sets: Membership in a set is a degree
membership function cS
: Universe [0, 1]
rangeof real
numbers
-
7/31/2019 Advances in DIP2
5/67
Linguistic Characterizations of Degree of
Membership Consider the set of cold days in Dehradun
in December 2005. Was December 31 cold? It might have
been called one of:
very cold
sort of cold
not cold
The answer depends on the observer, time,
etc.
-
7/31/2019 Advances in DIP2
6/67
Sounds similar to probability, but isnt
Probability deals with uncertainty, likelihood
Fuzzy logic deals with ambiguity, vagueness
-
7/31/2019 Advances in DIP2
7/67
Fuzzy Membership
-
7/31/2019 Advances in DIP2
8/67
Membership Functions
A membership function (MF) is a curve that defineshow each point in the input space is mapped to amembership value (or degree of membership)between 0 and 1.
The input space is sometimes referred to as theuniverse of discourse, a fancy name for a simpleconcept.
It associates a weighting with each of the inputs thatare processed, define functional overlap between
inputs, and ultimately determines an output response. The rules use the input membership values as
weighting factors to determine their influence on the
fuzzy output sets of the final output conclusion.
-
7/31/2019 Advances in DIP2
9/67
Membership function plots
is a pile
# grains of sand
1
0
10 100 1000 10000 100000
-
7/31/2019 Advances in DIP2
10/67
Crisp vs. Fuzzy
Membership Functionsis a pile
grains of sand
fuzzycrisp
1
0
10 100 1000 10000 100000
-
7/31/2019 Advances in DIP2
11/67
Set of Tall people
-
7/31/2019 Advances in DIP2
12/67
-
7/31/2019 Advances in DIP2
13/67
More Crisp vs. Fuzzy
Membership Functions1
0
1
0
grade ofmembershipCrisp
universe of
possibilities
Fuzzy
1
0
1
0
Note: Universe can be continuous or discrete,
ordered or unordered.
-
7/31/2019 Advances in DIP2
14/67
Alternative Notation
-
7/31/2019 Advances in DIP2
15/67
Fuzzy-Set Operationsexpressed using membership functions
1
0
A B
Fuzzy OR (union) Fuzzy AND (intersection)
cA U B(x) = max(cA (x), cB(x)) cA B(x) = max(cA (x), cB(x))
1
0
A U B1
0
A B
-
7/31/2019 Advances in DIP2
16/67
Fuzzy Complement
(not the only possible model)
cA(x) = 1 - cA(x).
1
0A
A
-
7/31/2019 Advances in DIP2
17/67
Fuzzy Classification
Method
In traditional classification, information is
represented in a one-pixel -one - class method andits classification result is definite, i.e. a pixel belongsto a class.
In fuzzy classification, a pixel is considered havingdifferent membership grades obtained from fuzzyclassification indicate the area proportion of everycover classes in a mixed pixel.
As the traditional method, the fuzzy classificationcan also be divided into fuzzy supervised and fuzzyunsupervised classification.
-
7/31/2019 Advances in DIP2
18/67
Fuzzy Supervised Classification
Sample pixels should be chosen for
estimating fuzzy parameters beforeclassification, different to conventional
method, chosen sample need not be
sufficiently homogeneous. Fuzzy mean canbe expressed as
-
7/31/2019 Advances in DIP2
19/67
where n is the total number of sample pixels,
fc is membership of a pixel to class c, xi ispixel value of sample pixels. Fuzzy
covariance matrix can be expressed as
f f
-
7/31/2019 Advances in DIP2
20/67
After the fuzzy parameters are determined, everypixel is classified according to its spectral value.
To perform a fuzzy classification, the membershipfunction must be defined for each class,
In this work, the membership functions are defined
based on maximum likelihood classificationalgorithm with fuzzy and fuzzy covariance matrixreplacing the conventional mean and covariancematrix.
The following is the definition of membershipfunction for cover class c:
N is the pixel
vector dimension,m is number of
predefined
classes.
-
7/31/2019 Advances in DIP2
21/67
Fuzzy Unsupervised Classification
The fuzzy unsupervised classification can be
performed in many methods, in this work, k-
means clustering algorithm is adopted and isrun using iteration as following:
determine classification number k, 1
give a initial membership matrix
-
7/31/2019 Advances in DIP2
22/67
Fuzzy Unsupervised Classification
Cont calculate fuzzy clustering where centers of
every class
calculate new membership matrix U(t+1)
using formula
if the criterion is satisfied, stop the iteration.Otherwise, repeat process 3 to 5. Thecriterion of ending iteration can choose
-
7/31/2019 Advances in DIP2
23/67
Artificial neural Networks
Introduction of Neural Network:Introduction of Neural Network: Brain is a highly complex, nonlinear, and parallel computer. It
has structural constituents, known as neurons for computations.
Definition of Neural Network:Definition of Neural Network:
A neural network is a massively parallel distributed processormade up of simple processing units, which has a naturalpropensity for storing experimental knowledge and making itavailable for use. It resembles the brain in two respects;
Knowledge is acquired by the network from its environmentthrough a learning process.
Inter-neuron connection strengths, known as synaptic weights,are used to store the acquired knowledge.
The produre used to perform the learning process is called alearning algorithm, the function of which is to modify the synapticweights of the network in an orderly fashion to attain a desireddesign objective.
Th NTh NB i f NB i t f N
-
7/31/2019 Advances in DIP2
24/67
The Neuron:The Neuron:
The basic neuron consists of;
Synapses: are connectionsbetween neurons they are not
physical connections, but
miniscule gaps that allow
electric signals to jump across
from neuron to neuron.
Soma: these electrical signals
are then passed across to the
soma which performs some
operation and sends out itsown electrical signal to the
axon.
Axon: the axon then
distributes this signal to
dendrites.
Dendrites: carry the signals
out to the various synapses,and
the cycle repeats
Basic components of Neuron:Basic components of Neuron:
-
7/31/2019 Advances in DIP2
25/67
Artificial Neuron:Artificial Neuron:
Each neuron has a certain number of inputs.Each of which have a weight assigned to them.
The weights simply are an indication of how important the
coming signal for that input is.
The net value of the neuron is then calculated.
The net is simply the weighted sum, the sum of all the inputsmultiplied by their specific weight.
Each neuron has its own unique threshold value, and if the
net is greater than the threshold, the neuron fires(or output a
1), otherwise it stays quiet(outputs a 0).
The output is then fed into all the neurons it is connected to.
-
7/31/2019 Advances in DIP2
26/67
Architecture of Neural Network:Architecture of Neural Network:
The network consists of several layers of neurons
9An input layer
9Hidden layer
9Output layer
Hidden layer-because the user cannot see the inputs or outputs for those
layers.
Ups and downs of neural network:Ups and downs of neural network:
They are excellent as pattern classification/recognizers.
Neural Network can handle exceptions and abnormal input data.
The power of neural network lies in their ability to process
information in a parallel fashion but machines today are serial they
only execute on instruction at a time.
General Mechanism of Neural Network:General Mechanism of Neural Network:
-
7/31/2019 Advances in DIP2
27/67
Schematic representation of an neural network:
An artificial neuron is a model whose components have direct analogs to the
-
7/31/2019 Advances in DIP2
28/67
An artificial neuron is a model whose components have direct analogs to the
components of actual neuron.
The input signal are represented by x0, x1, ..xn.
Each of these inputs is modified by a weight (synaptic weight) whose
function is analogous to that of the synaptic junction in a biological neuron.
These weights can be either positive or negative.
The processing element consists of two parts
9The first part simply sums the weighted input resulting in a quantity I.
9The second part is effectively a non-linear filter, usually called the activation
function through which the combined signal flows.
Activation function be;
It can be threshold function that passes information, when the output of the
first part of the artificial neuron exceeds the threshold T.
(I) =1, I>T
0, I
-
7/31/2019 Advances in DIP2
29/67
Perceptron:Perceptron:
Perceptron is the most basic term used in ANN.
It can be single layered or multi-layered structure.
Single perceptron:Single perceptron:
The structure of a single perceptron is very simple.
There are two inputs, a bias and an output
In the perceptron, the most common form of learning is byadjusting the weights by the difference between the desired output
and the actual output.
i= x
i
= desired output actual output.
-
7/31/2019 Advances in DIP2
30/67
Linear associator neural network:Linear associator neural network:
The most elementary neural network is a linearassociator
The fundamental neuron sums the weighted inputs and
then subjects this sum to a nonlinear activation function tokeep the output with in reasonable range.
The architecture of a linear associator is a set of input
neurons that are connected to a set of output neurons. (i.e.,
a two =layer neural network)
When the activation functions of the neurons are linear,
this network is a linear associator
It is not very accurate, if two many items are stored in the
associators.
Learning:Learning:
-
7/31/2019 Advances in DIP2
31/67
Learning:Learning:
This talk about weights and thresholds.
Which leads to an obvious question, how are all these set?
Most popular training methods are;
Back-propagation
The delta rule
Kohonen learning
Learning rules can be categorized into two areas:
Supervised
Un-supervised
Supervised learning rules require a teacher.
Unsupervised learning do not require teacher because they produce their
own output, which is then further evaluated.
Learning and Recall:Learning and Recall:
-
7/31/2019 Advances in DIP2
32/67
e g d ec :g
Learning is the process of adapting the connection weights in an artificial
network to produce the desired output vector presented to the inputbuffer.
Recall is the process of accepting an input stimulus and producing an
output response in accordance with the network weight structure.
Recall is an integral part of the learning process since a desired response
to the network must be compared to the actual output to create an error
function.
In supervised learning, the artificial neural network is trained to give the
desired response to a specific input stimulus.
In graded learning, the output is graded as good or bad on a numerical
scale, and the connection weights are adjusted in accordance with thegrade.
In unsupervised learning there is no specific response sought, but rather
the response is based on the networks ability to organize itself.
BackBackPropagation:Propagation:
-
7/31/2019 Advances in DIP2
33/67
Back-propagation is a systematic method for training multiple (three or more) layer
artificial neural networks.
The problem with the perception is that it cannot express non-linear decisions.
The perceptron is basically a linear threshold device, which returns a certain value, 1
for example , if the dot product of the input vector and the associated weight vector plus
bias surpasses the threshold, and another value, -1 for example, if the threshold is not
reached.
For example:
If the dot product of the input vector and the associated weight plus the bias, is graphed it
is obviously linear.
More over, all the input vectors that will give a value greater than the threshold are
separated into one space, and those that will not, will be separated into another.
+ +
-
-
+
+-
-
Non-linear plotLinear plot
Multi-layer feed forward network normally consist of three or
-
7/31/2019 Advances in DIP2
34/67
Multi layer feed forward network normally consist of three or
four layers; with one output and minimum one hidden layer.
The raw values of input layer are fed to hidden layer.
Once the neurons for the hidden layer are computed, their
activations are then fed downstream to the next layer, until all
the activations eventually reach the output layer, in which each
output layer neuron is associated with a specific classification
category.
Thus in computing the values of each neuron in the hidden and
output layers one must first take the sum of the weighted sums
and the bias, and then apply sigmoid function to calculate the
neurons activation.
Then how does the network learn the problem? The solution is
by modifying all the weights.
How to modify the weights;How to modify the weights;
-
7/31/2019 Advances in DIP2
35/67
ow o od y e we g s;y g ;
Take partial derivative of the error of the network with
respect to each weight, we will learn a little about thedirection the error of the network is moving.
If the derivative is positive, this tells us that the error is
increasing when the weight is increasing, then add a negative
value to the weight and vice versa if the derivative is
negative.
Because the taking of these partial derivatives and then
applying them to each of the weights takes place starting
from the output layer to hidden layer weights, then the
hidden layer to input layer weights.
This algorithm has been called the Back Propagation
Algorithm.
Basic steps in backBasic steps in back propagation training for a multipropagation training for a multi layer neural network:layer neural network:
-
7/31/2019 Advances in DIP2
36/67
Basic steps in backBasic steps in back--propagation training for a multipropagation training for a multi--layer neural network:layer neural network:
1. Randomize the weights to small random values (both positive &
negative) to ensure that the network is not saturated by largevalues of weights.(if all weights start at equal values, and desired
performance requires unequal weights, the network would not
train at all)
2. Select a training pair from the training set.
3. Apply the input vector to network input.
4. Calculate the network output.
5. Calculate the error, the difference between the network output
and the desired output.
6. Adjust the weights of the network in a way that minimizes thiserror.
7. Repeat steps 2 6 for each pair of input output vectors in the
training set until the error fro the entire system is acceptably low.
Neural Networks
-
7/31/2019 Advances in DIP2
37/67
A NN is a machine learning approach inspired by the way in
which the brain performs a particular learning task:
Knowledge about the learning task is given in the form of
examples.
Inter neuron connection strengths (weights) are used to
store the acquired information (the training examples).
During the learning process the weights are modified in
order to model the particular learning task correctly on the
training examples.
Learning
-
7/31/2019 Advances in DIP2
38/67
Learning
Supervised Learning
Recognizing hand-written digits, pattern recognition,
regression.
Labeled examples(input , desired output)
Neural Network models: perceptron, feed-forward, radial
basis function, support vector machine.
Unsupervised Learning
Find similar groups of documents in the web, content
addressable memory, clustering.
Unlabeled examples(different realizations of the input alone)
Neural Network models: self organizing maps, Hopfield
networks.
Network architectures
-
7/31/2019 Advances in DIP2
39/67
Three different classes of network architectures
single-layer feed-forward neurons are organized
multi-layer feed-forward in acyclic layers
recurrent
The architecture of a neural network is linked with the learning
algorithm used to train
Single Layer Feed-forward
-
7/31/2019 Advances in DIP2
40/67
g y
Input layer
of
source nodes
Output layer
of
neurons
-
7/31/2019 Advances in DIP2
41/67
Recurrent network
-
7/31/2019 Advances in DIP2
42/67
Recurrent network
Recurrent Network with hidden neuron(s): unit
delay operatorz-1 implies dynamic system
z-1
z-1
z-1
input
hidden
output
Neural Network Architectures
-
7/31/2019 Advances in DIP2
43/67
The Neuron
-
7/31/2019 Advances in DIP2
44/67
The neuron is the basic information processing unit of a NN.It consists of:
1 A set ofsynapses orconnecting links, each link
characterized by a weight:
W1, W2, , Wm
2 An adderfunction (linear combiner) which computes
the weighted sum of the inputs:
3 Activation function (squashing function) for limiting
the amplitude of the output of theneuron.
==
m
1jjxwu
j
)(uy b+=
The Neuron
-
7/31/2019 Advances in DIP2
45/67
Input
signal
Synaptic
weights
Summing
function
Bias
b
ActivationfunctionLocal
Field
vOutput
y
x1
x2
xm
w2
wm
w1
M M
)(
Bias of a Neuron
-
7/31/2019 Advances in DIP2
46/67
Bias b has the effect of applying an affine transformation to u
v = u + b
vis the induced field of the neuron
v
u
==
m
1jjxwu
j
Bias as extra input
-
7/31/2019 Advances in DIP2
47/67
Input
signal
Synaptic
weights
Summing
function
Activation
functionLocal
Fieldv
Output
y
x1
x2
xm
w2
wm
w1
M M
)(
w0x0= +1
Bias is an external parameter of the neuron. Can bemodeled by adding an extra input.
bw
xwv jm
j
j
=
= =
0
0
Segmentation
-
7/31/2019 Advances in DIP2
48/67
Segmentation
is the process of dividing an image into regions of relatedcontent.
is a process of partitioning an image into some non-overlappingmeaningful homogeneous regions
process of subdividing or partitioning of an image intohomogeneous (with respect to some criterion of homogeneity)
and disjoint (non-overlapping, non uniform) regions of differentstatistical behaviour, called image segments
Segmentation
-
7/31/2019 Advances in DIP2
49/67
g
9Grouping together pixels that have similarproperties such as color, texture, motion, etc
9 Each pixels can be treated as a data point in thefeature space
Segmentation
-
7/31/2019 Advances in DIP2
50/67
g
These image regions or segments may be laterassociated with information labels, but thesegmentation process simply gives each region ageneric label (region 1, region 2, etc.).
In the context of earth remote sensing, these labelswould generally be a ground cover type or land use
category.The shape of an object can be described in terms of:
Its boundary requires image edge detection
The region it occupies requires image segmentation in
homogeneous regions, Image regions generally havehomogeneous characteristics (e.g. intensity, texture)
Segmentation Algorithms
-
7/31/2019 Advances in DIP2
51/67
Segmentation Algorithms
Segmentation algorithms are based on one of two basicproperties of intensity values - discontinuity and similarity.
First category is to partition an image based on abrupt changesin intensity, such as edges in an image.
Second category are based on partitioning an image into regionsthat are similar according to a predefined criteria. Histogram
Thresholding approach falls under this category.
Segmentation Approaches
-
7/31/2019 Advances in DIP2
52/67
g pp
Thresholding
Boundary Detection Region Growing
Thresholding
-
7/31/2019 Advances in DIP2
53/67
g
Suppose that the gray-level histogram corresponds to animage, f(x,y), composed of dark objects in a lightbackground, in such a way that object and backgroundpixels have gray levels grouped into two dominant modes.
One obvious way to extract the objects from the backgroundis to select a threshold T that separates these modes.
Then any point (x,y) for which f(x,y) > T is called an object
point, otherwise, the point is called a background point.
Gray Scale Image - bimodal
-
7/31/2019 Advances in DIP2
54/67
y g
Image of rice with black background Image histogram of rice
Segmented Image
-
7/31/2019 Advances in DIP2
55/67
Segmented Image
Image after segmentation
-
7/31/2019 Advances in DIP2
56/67
Region Growing
-
7/31/2019 Advances in DIP2
57/67
A simple approach to image segmentation is tostart from some pixels (seeds) representing
distinct image regions and to grow them, until
they cover the entire image
For region growing we need a rule describing a
growth mechanism and a rule checking the
homogeneity of the regions after each growth
step
Split / Merge
-
7/31/2019 Advances in DIP2
58/67
The opposite approach to region growing isregion shrinking ( splitting ).
It is a top-down approach and it starts with the
assumption that the entire image ishomogeneous
If this is not true , the image is split into four sub
images
This splitting procedure is repeated recursively
until we split the image into homogeneousregions
Split / Merge
-
7/31/2019 Advances in DIP2
59/67
If the original image is square N x N, having dimensions that
are powers of 2(N = 2n):
All regions produced but the splitting algorithm are squares
having dimensions M x M , where M is a power of 2 as well(M=2m,M
-
7/31/2019 Advances in DIP2
60/67
Quadtree
R1R0
R0
R3
R1R2
R00 R01 R02 R04
Split / Merge
-
7/31/2019 Advances in DIP2
61/67
Splitting techniques disadvantage, they
create regions that may be adjacent and
homogeneous, but not merged.
Split and Merge method It is an iterative
algorithm that includes both splitting andmerging at each iteration:
Boundary Based Segmentation
-
7/31/2019 Advances in DIP2
62/67
Methods based on Edge Detection
Filters
Sobel
Roberts
Kirsh
Laplace
Expert Systems
-
7/31/2019 Advances in DIP2
63/67
Expert Systems
Knowledge Based Information System(KBIS)
Expert System (ES):
A KBIS that uses its knowledge about a
specific area to act as an expert consultant
to the end user
Expert Systems
-
7/31/2019 Advances in DIP2
64/67
Expert Systems
Expert Systems and DSS:ES are built into a DSS to improve the
quality of decision making; helps add
structure to unstructured problems.
Support a specific problem domain.
Uses a knowledge database to support
decision making.
Characteristics of an Expert
-
7/31/2019 Advances in DIP2
65/67
System
Can explain their reasoning or suggesteddecisions.
Can display intelligent behavior.Can draw conclusions from complex
relationships.
Can deal with uncertainty.
Components of
-
7/31/2019 Advances in DIP2
66/67
Expert Systems
[Figure 11.7]
Advantages of ES
-
7/31/2019 Advances in DIP2
67/67
Advantages of ES
Serve in the absence of a real expert.
Provide consistent advice, unaffected bystress and time constraints.
Knowledge can be transferred andreproduced.
May be less expensive than an actual
expert, especially if the knowledge is used
over and over.