Lesson4-IntroPR
Lesson4-IntroPR
■ 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
ECG
Speech signal
What is pattern recognition?
People detection
ECG
Speech signal
Applications of pattern recognition
Face recognition
ECG
Paul
Alex
Bob
Speech signal
Applications of pattern recognition
ECG
Speech signal
Applications of pattern recognition
■ Education
■ Biology: fruit, leaf,…
■ Smart transportation: traffic light, traffic sign,…
Speech signal
Applications of pattern recognition
■ Security surveillance
ECG
■ Entertainment, sport
■ Agriculture
■ Commercial
■ Military technology: target recognition, satellite image analysis,…
… and more…
Speech signal
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
ECG
ECG
ECG
ECG
Speech signal
Challenges
■ Intra-class variability
■ ECG
Inter-class variability
Speech signal
Intra-class variability
Speech signal
Inter-class variability
Ex: lisianthus (hoa cát tường) and carnation (hoa cẩm chướng)
ECG
Speech signal
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: fish classification
Sea bass
Fish
Salmon
Problem analysis
n Set up a camera
ECG
n Take some sample images
Ø Length
Ø Lightness
Ø Width
Speech signal
Ø Number and shape of fins
n Classify fish
Implementation
ECG
To isolate fishes from one another
and from the background
Lightness is better
Feature selection
2D feature vector
■ Multiple features
■ LightnessECG
+ width Fish x = [x1, x2]
Lightness width
Combination is better
How many features?
ECG
ECG
System building
n Data:
Ø Images withECG
people (positive)
Ø Images without people (negative)
System building (cont)
n Feature extraction:
Human
Ø
ECG
HOG feature
n Classification:
Non-human
System building
n Detecting:
Ø
ECG
Sliding window
Ø Detecting a
person/non-person
within a sliding
window
(HOG+SVM)
System building
n Detecting:
Ø
ECG
Sliding window
Ø Detecting a
person/non-person
within a sliding
window
(HOG+SVM)
System building
n Detecting:
Ø
ECG
Sliding window
Ø Detecting a
person/non-person
within a sliding
window
(HOG+SVM)
System building (cont)
n Image pyramic:
Ø To change ECG
the window size
https://www.youtube.com/watch?v=sDByl84n5mY
Đọc thêm
■ Fruit recognition:
https://www.youtube.com/watch?v=cBOSGQo1A10
■ Grading fruit:
https://www.youtube.com/watch?v=a8UZkCQqzNQ
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?
Typical pattern recognition system
ECG
Testing data
The design cycle
ECG
1 2 3
5 4
Performance evaluation
Computational complexity evaluation
Bài tập
n Đề:
Tự động đánhECG
giá độ ngọt của quả xoài dựa vào màu sắc của vỏ
https://drive.google.com/drive/folders/1tZZ5MCpfXG0zwehCl-
_uFlFpkjn4kltL
Bài tập lớn số 1
n Đề: Xây dựng hệ thống tự động phát hiện đối tượng trong ảnh
ECG
n Phương pháp: grid-by-grid comparison
n Phạm vi:
n Bài nộp: báo cáo và code (pdf), riêng nhóm thuyết trình nộp thêm
file ppt đã chuyển pdf
■ 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?
Cross validation
ECG
Speech signal
Data splitting for cross validation
Dataset
ECG
Speech signal
Holdout method
ECG
Speech signal
K-fold cross validation method
ECG
Speech signal
K-fold cross validation
Leave-one-out cross validation method
ECG
Speech signal
Evaluation tools and metrics
n Confusion matrix
ECG
n Accuracy
n IoU
Confusion matrix
Speech signal
An example of confusion matrix
Speech signal
Recall, Precision, F1-score
ECG
Speech signal
An example of Recall, Precision, F1-score
ECG
n TP = 23, TN = 556
n FP = 12, FN = 1
ECG
Speech signal
Area under the curve
ECG
Speech signal
How to get ROC for multiclass classification model?
ECG
Speech signal
Intersection over Union (IoU) for object detection
Speech signal
Intersection over Union (IoU) for object detection
ECG
Speech signal
Intersection over Union (IoU) for object detection
ECG
Speech signal
Bài tập lớn số 2
n Đề: Phân loại rượu vang Ý bằng phương pháp template matching
n
ECG https://github.com/MukeshTirupathi/Wine-
Cơ sở dữ liệu:
Classifier-Italy?tab=readme-ov-file
n Bài nộp: báo cáo và code (pdf), riêng nhóm thuyết trình nộp thêm
ECG pdf
file ppt đã chuyển
Ø Nhóm
Ø Nhóm