SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
Advanced Digital Image Processing
(EE-836)
National University of Sciences and
Technology (NUST)
School of Electrical Engineering and Computer Science
(SEECS)
Khawar Khurshid, 20121
Intro to Pattern
Recognition
Khawar Khurshid, 20122
What is a Pattern?
“A pattern is the opposite of a chaos; it is an entity vaguely
defined, that could be given a name.”
PR Definitions from Literature
“The assignment of a physical object or event to one of several pre-
specified categories” – Duda and Hart
Pattern Recognition is concerned with answering the question
“What is this?” –Morse
Examples of PR Applications
Optical Character Recognition (OCR)
– Sorting letters by postal code.
– Reconstructing text from printed
materials.
– Handwritten character recognition
Analysis and identification of human
patterns (Biometric Classification)
– Face recognition
– Handwriting recognition
– Finger prints and DNA mapping
– Iris scan identification
Examples of Pattern Recognition Problems
Computer aided diagnosis
– Medical imaging,
EEG, ECG signal
analysis
– Designed to assist (not
replace) physicians
Prediction systems
– Weather forecasting (based on satellite data).
– Analysis of seismic patterns
Other Examples
Speech and voice recognition/speaker identification.
Banking and insurance applications
– Credit cards applicants classified by income, credit worthiness,
mortgage amount, # of dependents, etc.
– Car insurance (pattern including make of car, # of accidents,
age, gender, driving habits, location, etc).
A Pattern Classification Example
A fish processing plant wants to automate the process of sorting incoming fish
according to species (salmon or sea bass)
The automation system consists of
– A conveyor belt for incoming products
– A vision system with an overhead CCD camera
– A computer to analyze images and control the robot arm
objects based on selected features
Recognize objects using
Computer vision, Image Processing and PR
Real
world
probabilistic techniques
Image Acquisition by
sensor
Image enhancement and
restoration
Filtering
Feature Extraction
Edge detection
Texture
Interest points
Classification and Recognition
Classification and interpretation of
Segmentation
Impose some order on group of
pixels to separate them from
each other
A Pattern Classification Example
“Sorting incoming Fish on a conveyor according to species using
optical sensing”
Purpose:
To classify the future samples based on the data of extracted
features from the training samples
Problem Analysis
Set up a camera and take some training samples to extract features
• Length
• Lightness
• Width
• Number and shape of fins
• Position of the mouth, etc…
– This is the set of all suggested features to explore for use in our
classifier!
Selection Criterion
Select the length of the fish as a possible feature for discrimination
The length is a poor feature alone!
Select the lightness as a possible feature.
Selection Criterion
Length or Lightness (weight), which one is a better feature?
No value of either feature will “classify” all fish correctly
Fish xT = [x1, x2]
Lightness Width
Selection Criterion and Decision Boundary
Adopt the lightness and add the width of the fish
Decision Boundary Selection
Which of the boundaries would you
choose?
Simple linear boundary (training error > 0)
Nonlinear complex boundary (tr. error = 0)
Simpler nonlinear boundary (tr. error > 0)
Ideally, the best decision boundary should be the one which provides
an optimal performance such as in the following figure:
However, the central aim of designing a classifier is to correctly
classify novel input (classify future samples)
Issue of generalization
Generalization and Decision Boundary
Selected decision boundary
A simpler but generalized boundary in this case may be the
simple nonlinear curve as shown below:
Further features can be added to enhance the performance
However redundancy in information may not be desirable
A classifier, intuitively, is designed to minimize classification error,
the total number of instances (fish) classified incorrectly.
– Is this the best objective (cost) function to minimize? What kinds
of error can be made? Are they all equally bad? What is the real
cost of making an error?
• Sea bass misclassified as salmon: Pleasant surprise for the
consumer, tastier fish
• Salmon misclassified as sea bass: Customer upset, paid too
much for inferior fish
– We may want to adjust our decision boundary to minimize overall
risk –in this case, second type error is more costly, so we may
want to minimize this error.
Adjustment of decision boundary
Adjustment of decision boundary
Error is minimized by moving the threshold to the left
Terminologies in PR
Features: a set of variables believed to carry discriminating and
characterizing information about the objects under consideration
Feature vector: A collection of d features, ordered in some
meaningful way into a d-dimensional column vector, that
represents the signature of the object to be identified.
Feature space: The d-dimensional space in which the feature
vectors lie. A d-dimensional vector in a d-dimensional space
constitutes a point in that space.
Terminologies in PR
Decision boundary:A boundary in the d-dimensional feature space
that separates patterns of different classes from each other.
Training Data: Data used during training of a classifier for which
the correct labels are known
Field Test Data: Unknown data to be classified –for measurements
from which the classifier is trained. The correct class of this data
are not known
Terminologies in PR
Cost Function: A quantitative measure that represents the cost of
making an error. The classifier is trained to minimize this
function.
Classifier: An algorithm which adjusts its parameters to find the
correct decision boundaries –through a learning algorithm using
a training dataset –such that a cost function is minimized.
Error: Incorrect labeling of the data by the classifier
Cost of error: Cost of making a decision, in particular an
incorrect one –not all errors are equally costly!
Training Performance: The ability / performance of the classifier
in correctly identifying the classes of the training data, which it
has already seen. It may not be a good indicator of the
generalization performance.
Cooperative vs. Uncooperative data
Good Features vs. Bad Features
Ideally, for a given group of patterns coming from the same class,
feature values should all be similar
For patterns coming from different classes, the feature values
should be different
Features Correlation
What is the cost of making a decision –what is the risk of
an incorrect decision?
Determine the right type of classifier, right type of
training algorithm and right type of classifier parameters.
How to choose a classifier that minimizes the risk and
maximizes the performance? Can we add prior
knowledge, context to the classifier?
Identify and extract features relevant to distinguishing sea
bass from salmon, but invariant to noise, occlusion
rotations, scale, shift. What if we already have irrelevant
features? Dimensionality reduction?
Separate & isolate fish from background image
CCD Camera on a conveyor belt
Fish
Components of Pattern Recognition System
Example of PR
Consider the problem of recognizing the letters L,P,O,E,Q
– Determine a sufficient set of features
– Design a tree-structured classifier
1
Bayesian Decision Theory
Bayes Rule
We now pose the following question: Given that the event A has
occurred. What is the probability that any single one of the event
B’s occur?
This is known as the Bayes rule
i
i i i
The Real World: The World of Many Dimensions
In most practical applications, we have more then one feature, and
therefore the random variable x must be replaced with a random
vector x. P(x) P(x)
The joint probability mass function P(x) still satisfies the axioms of
probability
The Bayes rule is then
While the notation changes only slightly, the implications are quite
substantial
Bayes Decision theory
Based on quantifying the trade offs betweens various classification
decisions using a probabilistic approach
The theory assumes:
– Decision problem can be posed in probabilistic terms
– All relevant probability values are known (in practice this is not
true)
The sea bass/salmon example
State of nature: w1: Sea bass, w2: Salmon
Assume that we know the probabilities of observing sea bass and
salmons, P(w1) and P(w2) (prior probabilities), for a particular
location of fishing and time of year
Based on this information, how would you guess that the type of
the next fish to be caught?
• Decide w1 if P(w1) > P(w2) otherwise decide w2
A reasonable decision rule?
If the catch of salmon and sea bass is equi-probable
P(w1) = P(w2) (uniform priors)
P(w1) + P( w2) = 1 (exclusivity and exhaustivity)
This rule will not be applicable
Class Conditional Probabilities
p(x|w1) and p(x|w2) describe the difference in lightness between
populations of sea bass and salmon
Posterior Probability
Suppose, we know P(w1), P(w2), p(x|w1) and p(x|w2) and that we have observed
the value of the feature (a random variable) x
– How would you decide on the “state of nature”–type of fish, based on this
info?
– Bayes theory allows us to compute the posterior probabilities from prior and
class-conditional probabilities
Posterior Probability: The
(conditional) probability of
correct class being ùj, given
that feature value x has been
observed
Likelihood: The (class-conditional) probability of
observing a feature value of x, given that the correct class is
wj. All things being equal, the category with higher class
conditional probability is more “likely”to be the correct
class.
Prior Probability:The total
probability of correct class
being class wj determined
based on prior experience
Evidence:The total
probability of observing
the feature value as x
j
Posterior Probabilities
Bayes rule allows us to compute the posterior probability (difficult to
determine) from prior probabilities, likelihood and the evidence (easier to
determine).
Posterior probabilities for
priors P(w1) = 2/3 and P(w2)
= 1/3. For example, given
that a pattern is measured
to have feature value x =14,
the probability it is in
category w2 is roughly 0.08,
and that it is in w1 is 0.92. At
every x, the posteriors sum
to 1.0.
Which class would you choose now?
What is probability of making an error with this decision?
Bayes Decision Rule
Decision given the posterior probabilities
X is an observation for which:
if P(w1 | x) > P(w2 | x) True state of nature = w1
if P(w1 | x) < P(w2 | x) True state of nature = w2
That is Choose the class that has the larger posterior probability !
If there are multiple features, x={x1, x2,…, xd} and multiple classes
Choose wi if P(wi| x) > P(wj| x) for all i = 1, 2, …, c
Error:
whenever we observe a particular x, the probability of error is :
P(error | x) = P(w1 | x) if we decide w2
P(error | x) = P(w2 | x) if we decide w1
Therefore:
P(error | x) = min [P(w1 | x), P(w2 | x)]
(Bayes decision)
Bayesian Decision Theory – Generalization
Generalization of the preceding ideas
– Use of more than one feature
– Use more than two states of nature
– Allowing other actions and not only decide on the state of
nature
– Unequal error cost
Allowing actions other than classification primarily allows the
possibility of rejection: refusing to make a decision in close or bad
cases!
The loss function states how costly each action taken is
Two-category classification
Definitions
a1 : deciding w1
a2 : deciding w2
eij = e(ai | wj), loss incurred for deciding wi when the true state of nature
is wj
Conditional risk:
R(a1 | x) = e11P(w1 | x) + e12P(w2 | x)
R(a2 | x) = e21P(w1| x) + e22P(w2 | x)
Our rule is the following:
if R(a1| x) < R(a2| x) action a1: “decide w1” is taken
End
Intro to Pattern
Recognition
Khawar Khurshid, 201239

Weitere ähnliche Inhalte

Was ist angesagt?

Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Simplilearn
 
Computer vision introduction
Computer vision  introduction Computer vision  introduction
Computer vision introduction Wael Badawy
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsMd. Main Uddin Rony
 
2005: Natural Computing - Concepts and Applications
2005: Natural Computing - Concepts and Applications2005: Natural Computing - Concepts and Applications
2005: Natural Computing - Concepts and ApplicationsLeandro de Castro
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning TutorialAmr Rashed
 
Deep Learning - CNN and RNN
Deep Learning - CNN and RNNDeep Learning - CNN and RNN
Deep Learning - CNN and RNNAshray Bhandare
 
Deep Learning in Computer Vision
Deep Learning in Computer VisionDeep Learning in Computer Vision
Deep Learning in Computer VisionSungjoon Choi
 
The fundamentals of Machine Learning
The fundamentals of Machine LearningThe fundamentals of Machine Learning
The fundamentals of Machine LearningHichem Felouat
 
An Introduction to Computer Vision
An Introduction to Computer VisionAn Introduction to Computer Vision
An Introduction to Computer Visionguestd1b1b5
 
Object Detection Beyond Mask R-CNN and RetinaNet I
Object Detection Beyond Mask R-CNN and RetinaNet IObject Detection Beyond Mask R-CNN and RetinaNet I
Object Detection Beyond Mask R-CNN and RetinaNet IWanjin Yu
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...Simplilearn
 
DBSCAN : A Clustering Algorithm
DBSCAN : A Clustering AlgorithmDBSCAN : A Clustering Algorithm
DBSCAN : A Clustering AlgorithmPınar Yahşi
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learningJohnson Ubah
 

Was ist angesagt? (20)

Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
 
Support vector machine-SVM's
Support vector machine-SVM'sSupport vector machine-SVM's
Support vector machine-SVM's
 
K - Nearest neighbor ( KNN )
K - Nearest neighbor  ( KNN )K - Nearest neighbor  ( KNN )
K - Nearest neighbor ( KNN )
 
Pattern recognition
Pattern recognitionPattern recognition
Pattern recognition
 
Computer vision introduction
Computer vision  introduction Computer vision  introduction
Computer vision introduction
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
 
2005: Natural Computing - Concepts and Applications
2005: Natural Computing - Concepts and Applications2005: Natural Computing - Concepts and Applications
2005: Natural Computing - Concepts and Applications
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning Tutorial
 
Computer Vision Introduction
Computer Vision IntroductionComputer Vision Introduction
Computer Vision Introduction
 
Deep Learning - CNN and RNN
Deep Learning - CNN and RNNDeep Learning - CNN and RNN
Deep Learning - CNN and RNN
 
Pattern recognition
Pattern recognitionPattern recognition
Pattern recognition
 
Deep Learning in Computer Vision
Deep Learning in Computer VisionDeep Learning in Computer Vision
Deep Learning in Computer Vision
 
The fundamentals of Machine Learning
The fundamentals of Machine LearningThe fundamentals of Machine Learning
The fundamentals of Machine Learning
 
An Introduction to Computer Vision
An Introduction to Computer VisionAn Introduction to Computer Vision
An Introduction to Computer Vision
 
Pattern recognition
Pattern recognitionPattern recognition
Pattern recognition
 
Object Detection Beyond Mask R-CNN and RetinaNet I
Object Detection Beyond Mask R-CNN and RetinaNet IObject Detection Beyond Mask R-CNN and RetinaNet I
Object Detection Beyond Mask R-CNN and RetinaNet I
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
 
ML Basics
ML BasicsML Basics
ML Basics
 
DBSCAN : A Clustering Algorithm
DBSCAN : A Clustering AlgorithmDBSCAN : A Clustering Algorithm
DBSCAN : A Clustering Algorithm
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learning
 

Ähnlich wie 12 pattern recognition

Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learningbutest
 
Quality of Multimedia Experience: Past, Present and Future
Quality of Multimedia Experience: Past, Present and FutureQuality of Multimedia Experience: Past, Present and Future
Quality of Multimedia Experience: Past, Present and FutureTouradj Ebrahimi
 
[UMAP2013] Recommendation with Differential Context Weighting
[UMAP2013] Recommendation with Differential Context Weighting[UMAP2013] Recommendation with Differential Context Weighting
[UMAP2013] Recommendation with Differential Context WeightingYONG ZHENG
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data MiningKai Koenig
 
NIPS2007: structured prediction
NIPS2007: structured predictionNIPS2007: structured prediction
NIPS2007: structured predictionzukun
 
talalalsubaie-1220737011220266-9.pdf
talalalsubaie-1220737011220266-9.pdftalalalsubaie-1220737011220266-9.pdf
talalalsubaie-1220737011220266-9.pdfsomeyamohsen2
 
Automatic System for Detection and Classification of Brain Tumors
Automatic System for Detection and Classification of Brain TumorsAutomatic System for Detection and Classification of Brain Tumors
Automatic System for Detection and Classification of Brain TumorsFatma Sayed Ibrahim
 
A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...Yao Wu
 
Lec14: Evaluation Framework for Medical Image Segmentation
Lec14: Evaluation Framework for Medical Image SegmentationLec14: Evaluation Framework for Medical Image Segmentation
Lec14: Evaluation Framework for Medical Image SegmentationUlaş Bağcı
 
Datamining intro-iep
Datamining intro-iepDatamining intro-iep
Datamining intro-iepaaryarun1999
 
Using rule based classifiers for the predictive analysis of breast cancer rec...
Using rule based classifiers for the predictive analysis of breast cancer rec...Using rule based classifiers for the predictive analysis of breast cancer rec...
Using rule based classifiers for the predictive analysis of breast cancer rec...Alexander Decker
 
11.using rule based classifiers for the predictive analysis of breast cancer ...
11.using rule based classifiers for the predictive analysis of breast cancer ...11.using rule based classifiers for the predictive analysis of breast cancer ...
11.using rule based classifiers for the predictive analysis of breast cancer ...Alexander Decker
 

Ähnlich wie 12 pattern recognition (20)

Pattern-Analysis (1).pdf
Pattern-Analysis (1).pdfPattern-Analysis (1).pdf
Pattern-Analysis (1).pdf
 
Classification
ClassificationClassification
Classification
 
Pattern Recognition
Pattern RecognitionPattern Recognition
Pattern Recognition
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Quality of Multimedia Experience: Past, Present and Future
Quality of Multimedia Experience: Past, Present and FutureQuality of Multimedia Experience: Past, Present and Future
Quality of Multimedia Experience: Past, Present and Future
 
PPT s09-machine vision-s2
PPT s09-machine vision-s2PPT s09-machine vision-s2
PPT s09-machine vision-s2
 
forest-cover-type
forest-cover-typeforest-cover-type
forest-cover-type
 
[UMAP2013] Recommendation with Differential Context Weighting
[UMAP2013] Recommendation with Differential Context Weighting[UMAP2013] Recommendation with Differential Context Weighting
[UMAP2013] Recommendation with Differential Context Weighting
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data Mining
 
NIPS2007: structured prediction
NIPS2007: structured predictionNIPS2007: structured prediction
NIPS2007: structured prediction
 
talalalsubaie-1220737011220266-9.pdf
talalalsubaie-1220737011220266-9.pdftalalalsubaie-1220737011220266-9.pdf
talalalsubaie-1220737011220266-9.pdf
 
Recognition
RecognitionRecognition
Recognition
 
Es1
Es1Es1
Es1
 
Clustering
ClusteringClustering
Clustering
 
Automatic System for Detection and Classification of Brain Tumors
Automatic System for Detection and Classification of Brain TumorsAutomatic System for Detection and Classification of Brain Tumors
Automatic System for Detection and Classification of Brain Tumors
 
A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...
 
Lec14: Evaluation Framework for Medical Image Segmentation
Lec14: Evaluation Framework for Medical Image SegmentationLec14: Evaluation Framework for Medical Image Segmentation
Lec14: Evaluation Framework for Medical Image Segmentation
 
Datamining intro-iep
Datamining intro-iepDatamining intro-iep
Datamining intro-iep
 
Using rule based classifiers for the predictive analysis of breast cancer rec...
Using rule based classifiers for the predictive analysis of breast cancer rec...Using rule based classifiers for the predictive analysis of breast cancer rec...
Using rule based classifiers for the predictive analysis of breast cancer rec...
 
11.using rule based classifiers for the predictive analysis of breast cancer ...
11.using rule based classifiers for the predictive analysis of breast cancer ...11.using rule based classifiers for the predictive analysis of breast cancer ...
11.using rule based classifiers for the predictive analysis of breast cancer ...
 

Kürzlich hochgeladen

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Kürzlich hochgeladen (20)

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

12 pattern recognition

  • 1. Advanced Digital Image Processing (EE-836) National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science (SEECS) Khawar Khurshid, 20121
  • 3. What is a Pattern? “A pattern is the opposite of a chaos; it is an entity vaguely defined, that could be given a name.”
  • 4. PR Definitions from Literature “The assignment of a physical object or event to one of several pre- specified categories” – Duda and Hart Pattern Recognition is concerned with answering the question “What is this?” –Morse
  • 5. Examples of PR Applications Optical Character Recognition (OCR) – Sorting letters by postal code. – Reconstructing text from printed materials. – Handwritten character recognition Analysis and identification of human patterns (Biometric Classification) – Face recognition – Handwriting recognition – Finger prints and DNA mapping – Iris scan identification
  • 6. Examples of Pattern Recognition Problems Computer aided diagnosis – Medical imaging, EEG, ECG signal analysis – Designed to assist (not replace) physicians Prediction systems – Weather forecasting (based on satellite data). – Analysis of seismic patterns
  • 7. Other Examples Speech and voice recognition/speaker identification. Banking and insurance applications – Credit cards applicants classified by income, credit worthiness, mortgage amount, # of dependents, etc. – Car insurance (pattern including make of car, # of accidents, age, gender, driving habits, location, etc).
  • 8. A Pattern Classification Example A fish processing plant wants to automate the process of sorting incoming fish according to species (salmon or sea bass) The automation system consists of – A conveyor belt for incoming products – A vision system with an overhead CCD camera – A computer to analyze images and control the robot arm
  • 9. objects based on selected features Recognize objects using Computer vision, Image Processing and PR Real world probabilistic techniques Image Acquisition by sensor Image enhancement and restoration Filtering Feature Extraction Edge detection Texture Interest points Classification and Recognition Classification and interpretation of Segmentation Impose some order on group of pixels to separate them from each other
  • 10. A Pattern Classification Example “Sorting incoming Fish on a conveyor according to species using optical sensing”
  • 11. Purpose: To classify the future samples based on the data of extracted features from the training samples Problem Analysis Set up a camera and take some training samples to extract features • Length • Lightness • Width • Number and shape of fins • Position of the mouth, etc… – This is the set of all suggested features to explore for use in our classifier!
  • 12. Selection Criterion Select the length of the fish as a possible feature for discrimination
  • 13. The length is a poor feature alone! Select the lightness as a possible feature. Selection Criterion Length or Lightness (weight), which one is a better feature? No value of either feature will “classify” all fish correctly
  • 14. Fish xT = [x1, x2] Lightness Width Selection Criterion and Decision Boundary Adopt the lightness and add the width of the fish
  • 15. Decision Boundary Selection Which of the boundaries would you choose? Simple linear boundary (training error > 0) Nonlinear complex boundary (tr. error = 0) Simpler nonlinear boundary (tr. error > 0)
  • 16. Ideally, the best decision boundary should be the one which provides an optimal performance such as in the following figure: However, the central aim of designing a classifier is to correctly classify novel input (classify future samples) Issue of generalization Generalization and Decision Boundary
  • 17. Selected decision boundary A simpler but generalized boundary in this case may be the simple nonlinear curve as shown below: Further features can be added to enhance the performance However redundancy in information may not be desirable
  • 18. A classifier, intuitively, is designed to minimize classification error, the total number of instances (fish) classified incorrectly. – Is this the best objective (cost) function to minimize? What kinds of error can be made? Are they all equally bad? What is the real cost of making an error? • Sea bass misclassified as salmon: Pleasant surprise for the consumer, tastier fish • Salmon misclassified as sea bass: Customer upset, paid too much for inferior fish – We may want to adjust our decision boundary to minimize overall risk –in this case, second type error is more costly, so we may want to minimize this error. Adjustment of decision boundary
  • 19. Adjustment of decision boundary Error is minimized by moving the threshold to the left
  • 20. Terminologies in PR Features: a set of variables believed to carry discriminating and characterizing information about the objects under consideration Feature vector: A collection of d features, ordered in some meaningful way into a d-dimensional column vector, that represents the signature of the object to be identified. Feature space: The d-dimensional space in which the feature vectors lie. A d-dimensional vector in a d-dimensional space constitutes a point in that space.
  • 21. Terminologies in PR Decision boundary:A boundary in the d-dimensional feature space that separates patterns of different classes from each other. Training Data: Data used during training of a classifier for which the correct labels are known Field Test Data: Unknown data to be classified –for measurements from which the classifier is trained. The correct class of this data are not known
  • 22. Terminologies in PR Cost Function: A quantitative measure that represents the cost of making an error. The classifier is trained to minimize this function. Classifier: An algorithm which adjusts its parameters to find the correct decision boundaries –through a learning algorithm using a training dataset –such that a cost function is minimized. Error: Incorrect labeling of the data by the classifier Cost of error: Cost of making a decision, in particular an incorrect one –not all errors are equally costly! Training Performance: The ability / performance of the classifier in correctly identifying the classes of the training data, which it has already seen. It may not be a good indicator of the generalization performance.
  • 24. Good Features vs. Bad Features Ideally, for a given group of patterns coming from the same class, feature values should all be similar For patterns coming from different classes, the feature values should be different
  • 26. What is the cost of making a decision –what is the risk of an incorrect decision? Determine the right type of classifier, right type of training algorithm and right type of classifier parameters. How to choose a classifier that minimizes the risk and maximizes the performance? Can we add prior knowledge, context to the classifier? Identify and extract features relevant to distinguishing sea bass from salmon, but invariant to noise, occlusion rotations, scale, shift. What if we already have irrelevant features? Dimensionality reduction? Separate & isolate fish from background image CCD Camera on a conveyor belt Fish Components of Pattern Recognition System
  • 27. Example of PR Consider the problem of recognizing the letters L,P,O,E,Q – Determine a sufficient set of features – Design a tree-structured classifier 1
  • 29. Bayes Rule We now pose the following question: Given that the event A has occurred. What is the probability that any single one of the event B’s occur? This is known as the Bayes rule i i i i
  • 30. The Real World: The World of Many Dimensions In most practical applications, we have more then one feature, and therefore the random variable x must be replaced with a random vector x. P(x) P(x) The joint probability mass function P(x) still satisfies the axioms of probability The Bayes rule is then While the notation changes only slightly, the implications are quite substantial
  • 31. Bayes Decision theory Based on quantifying the trade offs betweens various classification decisions using a probabilistic approach The theory assumes: – Decision problem can be posed in probabilistic terms – All relevant probability values are known (in practice this is not true)
  • 32. The sea bass/salmon example State of nature: w1: Sea bass, w2: Salmon Assume that we know the probabilities of observing sea bass and salmons, P(w1) and P(w2) (prior probabilities), for a particular location of fishing and time of year Based on this information, how would you guess that the type of the next fish to be caught? • Decide w1 if P(w1) > P(w2) otherwise decide w2 A reasonable decision rule? If the catch of salmon and sea bass is equi-probable P(w1) = P(w2) (uniform priors) P(w1) + P( w2) = 1 (exclusivity and exhaustivity) This rule will not be applicable
  • 33. Class Conditional Probabilities p(x|w1) and p(x|w2) describe the difference in lightness between populations of sea bass and salmon
  • 34. Posterior Probability Suppose, we know P(w1), P(w2), p(x|w1) and p(x|w2) and that we have observed the value of the feature (a random variable) x – How would you decide on the “state of nature”–type of fish, based on this info? – Bayes theory allows us to compute the posterior probabilities from prior and class-conditional probabilities Posterior Probability: The (conditional) probability of correct class being ùj, given that feature value x has been observed Likelihood: The (class-conditional) probability of observing a feature value of x, given that the correct class is wj. All things being equal, the category with higher class conditional probability is more “likely”to be the correct class. Prior Probability:The total probability of correct class being class wj determined based on prior experience Evidence:The total probability of observing the feature value as x j
  • 35. Posterior Probabilities Bayes rule allows us to compute the posterior probability (difficult to determine) from prior probabilities, likelihood and the evidence (easier to determine). Posterior probabilities for priors P(w1) = 2/3 and P(w2) = 1/3. For example, given that a pattern is measured to have feature value x =14, the probability it is in category w2 is roughly 0.08, and that it is in w1 is 0.92. At every x, the posteriors sum to 1.0. Which class would you choose now? What is probability of making an error with this decision?
  • 36. Bayes Decision Rule Decision given the posterior probabilities X is an observation for which: if P(w1 | x) > P(w2 | x) True state of nature = w1 if P(w1 | x) < P(w2 | x) True state of nature = w2 That is Choose the class that has the larger posterior probability ! If there are multiple features, x={x1, x2,…, xd} and multiple classes Choose wi if P(wi| x) > P(wj| x) for all i = 1, 2, …, c Error: whenever we observe a particular x, the probability of error is : P(error | x) = P(w1 | x) if we decide w2 P(error | x) = P(w2 | x) if we decide w1 Therefore: P(error | x) = min [P(w1 | x), P(w2 | x)] (Bayes decision)
  • 37. Bayesian Decision Theory – Generalization Generalization of the preceding ideas – Use of more than one feature – Use more than two states of nature – Allowing other actions and not only decide on the state of nature – Unequal error cost Allowing actions other than classification primarily allows the possibility of rejection: refusing to make a decision in close or bad cases! The loss function states how costly each action taken is
  • 38. Two-category classification Definitions a1 : deciding w1 a2 : deciding w2 eij = e(ai | wj), loss incurred for deciding wi when the true state of nature is wj Conditional risk: R(a1 | x) = e11P(w1 | x) + e12P(w2 | x) R(a2 | x) = e21P(w1| x) + e22P(w2 | x) Our rule is the following: if R(a1| x) < R(a2| x) action a1: “decide w1” is taken