Introduction to pattern recognition
■ Outline:
1. What is pattern recognition?
2. How to perform pattern recognition?
3. Some examples
4. Components of a pattern recognition system
5. How to evaluate a pattern recognition system?
Introduction
■ Outline:
1. What is pattern recognition?
2. How to perform pattern recognition?
3. Some examples
4. Components of a pattern recognition system
5. How to evaluate a pattern recognition system?
Examples of patterns
What is pattern recognition?
▪ One of the most common applications of machine learning
▪ Important component of AI systems
▪ Aiming to give human perception capabilities to machines
▪ Process of recognizing regularities in data by using machine
learning algorithms, based on statistical information,
historical data, or the machine’s memory.
▪ During recognition given objects are assigned to prescribed
classes
Applications of pattern recognition
People detection
Applications of pattern recognition
Face recognition
Paul
Alex
Bob
Applications of pattern recognition
License plate recognition
Applications of pattern recognition
■ OCR (Optical Character Recognition): handwritten, printed text,…
■ Biometrics: face, finger prints, speech,…
■ Medical diagnosis: X-ray, MRI analysis,…
■ Biology: fruit, leaf,…
■ Education
■ Smart transportation: traffic light, traffic sign,…
Applications of pattern recognition
■ Security surveillance
■ Entertainment, sport
■ Agriculture
■ Commercial
■ Military technology: target recognition, satellite image analysis,…
and more…
Introduction
■ Outline:
1. What is pattern recognition?
2. How to perform pattern recognition?
3. Some examples
4. Components of a pattern recognition system
5. How to evaluate a pattern recognition system?
Grid-by-grid comparison
From: Talal Alsubaie
Grid-by-grid comparison
From: Talal Alsubaie
Grid-by-grid comparison
From: Talal Alsubaie
Grid-by-grid comparison
From: Talal Alsubaie
The statistical way
■ Problems with grid-by-grid comparison: too costly
■ Solution: artificial intelligence/machine learning
■ Two phases: learning and classification
Learning: learn the rule from data (supervised and unsupervised)
Classification: decide a pattern to a known category/class
Variability challenges
■ Intra-class
Ex: different typefaces of
letter “T”
Variability challenges
Inter-class
Ex: lisianthus (hoa cát tường) and carnation (hoa cẩm chướng)
Introduction
■ Outline:
1. What is pattern recognition?
2. How to perform pattern recognition?
3. Some examples
4. Components of a pattern recognition system
5. How to evaluate a pattern recognition system?
Example 1
Sea bass
Fish
Salmon
Problem analysis
Set up a camera
Take some sample images
Note physical differences (features):
Length
Lightness
Width
Number and shape of fins
Position of the mouth, etc…
Classify fish
Implementation
To isolate fishes from one another
and from the background
To reduce the data by measuring
certain features
To discriminate salmon and sea
bass (by statistical, by machine
learning)
Feature selection
■ Sea bass is generally longer than salmon Length becomes
a feature.
Length is a poor feature
Feature selection
■ Lightness feature: better than length feature but not adequate
■ Move the decision boundary toward smaller values of lightness to
reduce the number of sea bass that are classified as salmon
Lightness is better
Feature selection
■ Multiple features
■ Lightness + width Fish x = [x1, x2]
Lightness width
Combination is better
How many features
■ More is not always better
■ There could be redundancy
■ Over complication can occur
Classification model selection
There is a tradeoff between complexity of the decision rules and
their performances to unknown patterns.
Generalization: The ability of the classifier to produce correct
results on novel patterns.
Simplify the decision boundary!
Example 2
System building
Data:
Images with people (positive)
Images without people (negative)
System building
Modeling:
Human
HOG features
SVM classification model
Non-human
System building
Detecting:
Sliding window
Detecting a
person/non-person
within a sliding
window
(HOG+SVM)
System building
Detecting:
Sliding window
Detecting a
person/non-person
within a sliding
window
(HOG+SVM)
System building
Image pyramic:
To change the window size
https://www.youtube.com/watch?v=sDByl84n5mY
Introduction
■ Outline:
1. What is pattern recognition?
2. How to perform pattern recognition?
3. Some examples
4. Components of a pattern recognition system
5. How to evaluate a pattern recognition system?
Pattern recognition system
Testing data
The design cycle
Performance evaluation
Computational complexity evaluation
Teachable machine
■ https://teachablemachine.withgoogle.com/
■ A web-based tool that:
makes creating machine learning models (for sites, apps,…) fast,
easy, and accessible to everyone – no coding requires
teaches a model to recognize images (from files/webcam), sounds
(MP3, *.wav), poses (from files/webcam)
How to use teachable machine
https://youtu.be/DFBbSTvtpy4 https://youtu.be/n-zeeRLBgd0?t=50
https://youtu.be/CO67EQ0ZWgA
■ Fruit recognition:
https://www.youtube.com/watch?v=cBOSGQo1A10
■ Grading fruit:
https://www.youtube.com/watch?v=a8UZkCQqzNQ
■ Lung cancer prediction:
https://www.youtube.com/watch?v=JfZIJzWWhI0