Introduction

Download Report

Transcript Introduction

Introduction to Pattern Recognition for human ICT
Introduction
2014. 9. 5
Hyunki Hong
Contents
• What is pattern recognition?
• Components of pattern recognition system
• Pattern recognition apporaches
What is pattern recognition?
• Definitions from the literature
–“The assignment of a physical object or event to one of several
pre-specified categories”
–Duda and Hart
–“A problem of estimating density functions in a high-dimensional
space and dividing the space into the regions of categories or
classes”
– Fukunaga
–“Given some examples of complex signals and the correct
decisions for them, make decisions automatically for a stream
of future examples”
–Ripley
–“The science that concerns the description or classification
(recognition) of measurements”
–Schalkoff
–“The process of giving names ω to observations x” –Schurmann
– Pattern Recognition is concerned with answering the question
“What is this?”
–Morse
Examples of pattern recognition
problems
• Machine vision
– Visual inspection, Automatic target recognition
– Imaging device detects ground target
– Classification into “friend” or “foe ”
• Character recognition
– Automated mail sorting, processing bank checks
– Scanner captures an image of the text
– Image is converted into constituent characters.
• Speech recognition
– Human Computer Interaction
– Microphone records acoustic signal
– Speech signal is classified into phonemes and/or words.
Related fields and application areas for PR
• Related fields
–
–
–
–
–
–
–
–
–
–
–
–
–
–
Adaptive signal processing
Machine learning
Artificial neural networks
Robotics and vision
Cognitive sciences
Mathematical statistics
Nonlinear optimization
Exploratory data analysis
Fuzzy and genetic systems
Detection & estimation theory
Formal languages
Structural modeling
Biological cybernetics
Computational neuroscience
• Applications
–
–
–
–
–
–
–
–
–
–
–
–
–
Image processing
Computer vision
Speech recognition
Multimodal interfaces
Automated target recognition
Optical character recognition
Seismic analysis
Man and machine diagnostics
Fingerprint identification
Industrial inspection
Financial forecast
Medical diagnosis
ECG signal analysis
Electrocardiogram(심전도)
Components of a pattern recognition system
• A basic pattern classification system contains
– A sensor
– A preprocessing mechanism
– A feature extraction mechanism (manual or automated)
– A classification algorithm
– A set of examples (training set) already classified or described
Types of prediction problems
• Classification
– The PR problem of assigning an object to a class
– The output of the PR system is an integer label.
ex) classifying a product as “good” or “bad” in a quality control test
회귀분석: 관찰된 연속형 변수들에 대해 독립변수와 종속변수 사이의 상관관계를
• Regression
나타내는 선형 관계식을 구하는 기법
– A generalization of a classification task
– The output of the PR system is a real-valued number
ex) predicting the share value of a firm based on past performance
and stock market indicators
• Clustering
– The problem of organizing objects into meaningful groups
– The system returns a (sometimes hierarchical) grouping of objects
ex) organizing life forms into a taxonomy of species
• Description
– The problem of representing an object in terms of a series of
primitives
– The PR system produces a structural or linguistic description
Features and patterns
• Feature
– Feature is any distinctive aspect, quality or characteristic.
- Features may be symbolic (i.e., color) or numeric (i.e., height)
– Definitions
1. The combination of 𝑑 features is a 𝑑-dim column vector called a
feature vector.
2. The 𝑑-dimensional space defined by the feature vector is called the
feature space.
3. Objects are represented as points in feature space; the result is a
scatter plot.
Features and patterns
• Pattern
– Pattern is a composite of traits or features characteristic of an
individual.
– In classification tasks, a pattern is a pair of variables {𝑥, 𝜔}
where
1. 𝑥 is a collection of observations or features (feature vector)
2. 𝜔 is the concept behind the observation (label)
• What makes a “good” feature vector?
– The quality of a feature vector is related to its ability to
discriminate examples from different classes
1. Examples from the same class should have similar feature values.
2. Examples from different classes have different feature values.
• More feature properties
Classifiers
• The task of a classifier is to partition feature space
into class-labeled decision regions.
– Borders between decision regions are called decision
boundaries.
– The classification of feature vector 𝑥 consists of determining
which decision region it belongs to, and assign 𝑥 to this class
• A classifier can be represented as a set of
discriminant functions.
– The classifier assigns a feature vector 𝑥 to class 𝜔𝑖 if 𝑔𝑖(𝑥)>𝑔j(𝑥)
∀𝑗 ≠ 𝑖
Pattern recognition approaches
• Statistical
– Patterns classified based on an underlying statistical model of
the features
: The statistical model is defined by a family of classconditional probability density functions 𝑝(𝑥|𝜔𝑖) (Probability
of feature vector 𝑥 given class 𝜔𝑖)
• Neural
– Classification is based on the response of a network of
processing units (neurons) to an input stimuli (pattern).
:“Knowledge” is stored in the connectivity and strength of the
synaptic weights.
– Trainable, non-algorithmic, black-box strategy
– Very attractive since
1. It requires minimum a priori knowledge
2. with enough layers and neurons, ANNs can create any
Artificial neural network
complex decision region
Pattern recognition approaches
• Syntactic
– Patterns classified based on measures of structural similarity
:“Knowledge” is represented by means of formal grammars or
relational descriptions (graphs).
– Used not only for classification, but also for description
: Typically, syntactic approaches formulate hierarchical
descriptions of complex patterns built up from simpler sub
patterns.
Example: neural, statistical and
structural OCR
[Schalkoff, 1992]
A simple pattern recognition problem
• Consider the problem of recognizing the letters L, P,
O, E, Q
– Determine a sufficient set of features
– Design a tree-structured classifier
The pattern recognition design cycle
• Data collection
– Probably the most time-intensive component of a PR project
– How many examples are enough?
• Feature choice
– Critical to the success of the PR problem
: “Garbage in, garbage out”
– Requires basic prior knowledge
• Model choice
– Statistical, neural and structural approaches
– Parameter settings
The pattern recognition design cycle
• Training
– Given a feature set and a “blank” model, adapt the model to
explain the data
– Supervised, unsupervised and reinforcement learning
• Evaluation
– How well does the trained model do?
– Overfitting vs. generalization
• Consider the following scenario
– A fish processing plan wants to automate the process of
sorting incoming fish according to species (salmon or sea
bass)
– The automation system consists of
1. a conveyor belt for incoming products
2. two conveyor belts for sorted products
3. a pick-and-place robotic arm
4. a vision system with an overhead CCD camera
5. a computer to analyze images and control the robot arm
Duda, Hart and Stork, 2001]
• Sensor
– The vision system captures an image as a new fish enters the
sorting area.
• Preprocessing
– Image processing algorithms, e.g., adjustments for average
intensity levels, segmentation to separate fish from
background
• Feature extraction
– Suppose we know that, on the average, sea bass is larger than
salmon
: From the segmented image we estimate the length of the fish
• Classification
– Collect a set of examples from both species.
– Compute the distribution of lengths for both classes.
– Determine a decision boundary (threshold) that minimizes the
classification error.
• Improving the performance of our PR system
– Determined to achieve a recognition rate of 95%, we try a
number of features
1. Width, area, position of the eyes w.r.t. mouth...
2. only to find out that these features contain no discriminatory
information
– Finally we find a “good” feature: average intensity of the
scales
– We combine “length” and “ average intensity
of the scales ” to improve class separability.
– We compute a linear discriminant function to separate the two
classes, and obtain a classification rate of 95.7%.
• Cost vs. classification rate
– Our linear classifier was designed to minimize the overall
misclassification rate.
– Is this the best objective function for our fish processing
plant?
1. The cost of misclassifying salmon as sea bass is that the end
customer will occasionally find a tasty piece of salmon when he
purchases sea bass.
2. The cost of misclassifying sea bass as salmon is an end customer
upset when he finds a piece of sea bass purchased at the price of
salmon.
– Intuitively, we could adjust the decision boundary
to minimize
the issue
of generalization
this cost function.
1) 패턴인식이란?
주어진 입력 데이터(패턴)를 어떤 기준에 따라 몇 개 패턴
의 그룹(클래스)로 나누고, 각 데이터가 어떤 그룹에 해당
하는 지를 결정하는 것
숫자인식
표정인식
얼굴인식
Smile
Person 1
Normal
Surprise
Person 2
Person 3
Anger
2) 패턴인식의 기본적 접근 방법 1
(방법1) 구조적 특징에 의한 패턴 정의 및 인식
얼굴인식/표정인식을 위해
필요한 구조적 특징은?
(구조적 인식 방법의 한
계)
3) 패턴인식의 기본적 접근 방법 2
원형 영상
(template)
(방법2) 탬플릿 매칭
클래스
d1
d3=min{di}
d2
d3
d4
1
2
입력 데이터
3
4
…
24
4) 패턴인식의 어려움
조명
변형
표정
변형
원형 영상
(template)
기타
변형
패턴의 변형
25
5) 기계학습의 필요성
패턴의 다양한 변형이 존재
패턴인식을 어렵게 하는 주요 원인
보다 정교한 방법이 필요
“기계학습”
인간이 갖고 있는 고유의 지능적 기능인 학습 능력을
기계를 통해 구현하는 방법
주어진 데이터들을 분석하여 그로부터 일반적인 규칙
이나 새로운 지식을 자동적으로 추출해 내는 방법론
개발
예) 데이터를 이용한 학습
숫자 “5”의 다양한 변형
통계적 정보(평균량)의 활용
평균영상
27
6) 패턴인식의 처리과정
학습단계 (Learning Stage)
학습
데이터 집합
학습(데이터 분석)
Learning classifier
/ Data analysis
전처리
Preprocessing
특징추출
Feature extraction
결정경계
Decision boundary
분류/인식
테스트
데이터
Classification /
Recognition
인식단계 (Recognition Stage)
인식
결과
7) 패턴인식의 개발 단계
데이터 수집
Data collection
데이터 전처리
Data
preprocessing
데이터 분석
Data analysis
특징 추출기 및
분류기 개발
Development of
feature extractor
& classifier
수정/보완
성능 평가
Performance
evaluation
7-1) 데이터
데이터의 표현
n차원 열벡터
데이터의 분포 특성
x2
2차원 데이터 집합의 산점도:
- 가우시안 분포를 따름
- 평균 [3,3]
- 공분산 [[1,0]T,[0,1]T]
- 데이터(샘플) 개수: 50개
x1
7-2) 데이터 분포
(a) 모집단의 확률밀도함수
(b) 등고선으로 표시된 밀도함수
7-3) 데이터 분포
(c) 모집단의 데이터 분포
(d) 4개의 표본 집합
8) 특징추출
• 입력데이터를 그대로 사용하는 대신 각 패턴의 특성을 잘
표현해 줄 수 있는 핵심 정보만 추출하여 사용
• 비용(계산, 메모리)의 증가 및 잡음 등으로 인한 문제 해결
의 어려움을 감소시키는 효과
(a) 원영상
(b) 격자특징
12x12
(c) 수직히스토그램
(d) 방향특징
8) 특징추출
• 사영에 의한 특징추출
x (데이터)
u
xTu (특징값)
어떤 방향으로 사영하는 것이 좋은가?
 차원 감소의 목적이 아닌 인식을 위한 핵심 정보를 추출하는 것이 중요
 주어진 데이터의 분포 특성을 가장 잘 나타낼 수 있는 방향을 선정
9) 분류
분류(classification)
데이터 집합 X = {x1, x2, … , xN}가 주어졌을 때, 각 데이
터 xi에 해당하는 클래스 라벨 y(xi)를 결정하는 것
결정경계(decision boundary)
클래스를 구분해주는 직선/곡선/면
판별함수 g(x) = 0과 같은 함수식으로 정의되는 입력공간상
의 경계면
9-1) 결정경계
x1
결정경계
C1
g(x1, x2) = x1-x2 = 0
오분류된
데이터
C2
x2
9-2) 분류율과 오차
• 성능 평가 척도
분류율(%) =
분류오차(%) =
학습오차
테스트오차
분류 성공 데이터 개수
전체 데이터 개수
분류 실패 데이터 개수
전체 데이터 개수
x 100
x 100
9-2) 분류율과 오차
일반화오차
– 이론적 성능 분석을 위해서는 중요
– 실제 응용에서는 계산 불가
∵ 전체 데이터 집합의 확률밀도함수를 모름
– 테스트오차  “경험오차”
• 테스트오차는 일반화오차의 경험적 근사에 불과
9-2) 분류율과 오차
5-분절 교차검증법의 처리 과정의 예
Etrain(X-X1)
X2
X3
X4
X5
X1
Etest(X1)
Etrain(X-X2)
X1
X3
X4
X5
X2
Etest(X2)
Etrain(X-X3)
X1
X2
X4
X5
X3
Etest(X3)
Etrain(X-X4)
X1
X2
X3
X5
X4
Etest(X4)
Etrain(X-X5)
X1
X2
X3
X4
X5
Etest(X5)
mean
Ecv
교차
검증
오차
10) 분류와 군집화
분류(classification)
군집화(clustering)
주어진 데이터 집합을 이미 정의
된 몇 개의 클래스로 구분하는 문
제
입력 데이터의 분포 특성(입력값
의 유사성)을 분석하여 임의의 복
수 개의 그룹으로 나누는 것
입력 데이터와 각 데이터의 클래
스 라벨이 함께 제공  {xi,
y(xi)}
클래스에 대한 정보 없이 단순히
입력값만 제공  {xi}
숫자인식, 얼굴인식 등
영상분리
Bayes classifier
K-Nearest Neighbor method
Multilayer perceptrons
Support Vector Machine
K-means clustering
Learning Vector Quantization
Hierarchical clustering
Self Organizing feature Map
10) 분류와 군집화
C1
C3
분류
C1
C3
군집화
10) 교사학습, 비교사학습
교사학습(supervised learning)
분류기
학습시에 인식기가 내야 할 원하는 출력값을 미리 알
려주는 교사가 존재하는 형태
6장 최소제곱법, 퍼셉트론 학습
11장 다층퍼셉트론을 위한 오류역전파 학습 알고리즘
비교사학습(unsupervised learning)
군집화
학습시 인식기의 원하는 출력값에 대한 정보 없이 학
습이 이루어지는 형태
10장 가우시안 혼합모델을 위한 EM 학습법
11장 자기조직화 특징맵의 학습법
11) 분류기 복잡도와 과다적합
(a)
C1
(b)
C1
학습데이터
C2
Linear decision
Boundary g(x)
선형결정경계
(c)
C2
Mis-classified
area
C1
비선형결정경계
(d)
테스트데이터
C2
Nonlinear
decision
Boundary
g(x)
C2
C1
11) 분류기 복잡도와 과다적합
과다적합(overfitting)
분류기가 학습데이터에 대해서만 지나치게 적합한 형태로 결정경계
가 형성되는 바람직하지 못한 현상
학습데이터의 확률적 잡음과 학습데이터 개수의 부족에 기인
분류기의 복잡도를 적절히 조정하는 방법이 필요
학습의 조기 종료 방법
정규화항을 가진 오차함수를 사용하는 방법
모델선택 방법
12) 패턴인식의 응용
응용
분야
문자인식/
문서인식
숫자인식, PDA, 전자사전, ATM 등
생체인식
생체정보(지문,얼굴,홍채) 신원확인
뇌신호 처리
MEG, EEG, BCI
생물정보학
마이크로어레이, 염기서열 분석
로봇비전
객체인식, 초음파/적외선 신호 분석
의료정보
임상 데이터, MRI, CT, 초음파
금융데이터분석
홈쇼핑, 주식 데이터, 보험회사 등
…