Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural...

60
Pattern Recognition CSE 802 Michigan State University Spring 2008

Transcript of Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural...

Page 1: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition

CSE 802

Michigan State University

Spring 2008

Page 2: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition

“The real power of human thinking is based on recognizing patterns. The better computers get at pattern recognition, the more humanlike they will become”. Ray Kurzweil, NY Times, Nov 24, 2003

Page 3: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

What is a Pattern?“A pattern is the opposite of a chaos; it is an entity vaguely defined, that could be given a name.” (Watanabe)

Page 4: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

RecognitionIdentification of a pattern as a member of a category we already know, or we are familiar with

Classification (known categories)Clustering (creation of new categories)

Category “A”

Category “B”

ClassificationClustering

Page 5: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition

• Given an input pattern, make a decision about the “category” or “class” of the pattern

• Pattern recognition is a very broad subject with many applications

• In this course we will study a variety of techniques to solve P.R. problems and discuss their relative strengths and weaknesses

Page 6: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Class

A collection of “similar” (not necessarily identical) objects

A class is defined by class samples (paradigms, exemplars, prototypes, training/learning samples)

Inter-class variability

Intra-class variability

Page 7: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Class Model

Different descriptions, which are typically mathematical/statistical in form for each class/population

Given a pattern, choose the best-fitting model for it and then assign it to class associated with the model

Page 8: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Intra-class and Inter-class Variability

The letter “T” in different typefaces

Same face under different expression, pose….

Page 9: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Interclass SimilarityInterclass SimilarityInterclass Similarity

Identical twins

Characters that look similar

Page 10: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern RecognitionHaving been shown a few positive examples (and perhaps a few negative examples) of a pattern class, the system “learns” to tell whether or not a new object belongs in this class (Watanabe)

Inferring a generality from a few exemplars

COGNITION = Formation of new classesRECOGNITION = known classes

Page 11: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition Applications

Alphanumeric charactersOptical scanned imageCharacter recognition (page readers, zip code, license plate)

Tanks, airfieldsVisual, infrared, radar imagesAerial reconnaissance

Terrain forms, vegetation cover

Multispectral imagesNatural resource identification

Types of cardiac conditions, classes of brain conditions

EKG, EEG waveformsDetection and diagnosis of disease

Presence/absence of flaw, type of flaw

Ultrasound, eddy current, acoustic emission waveforms

Non-destructive testing

Spoken words, speaker identity

Speech waveformsSpeech recognition

OutputInputProblem

Page 12: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition Applications

Occurrence of the word in the database

Query word written by a userOnline handwriting retrieval

Owner of the fingerprint, fingerprint classes

Input image from fingerprint sensors

Fingerprint identification

Text relevant to the userKey words specified by a userWeb search

Identify objects, pose, assembly

3-D images (structured light, laser, stereo)

Manufacturing

Acceptable/unacceptableScanned image (visible, infrared)

Inspection (PC boards, IC masks, textiles)

Type of cellsSlides of blood samples, micro-sections of tissues

Identification and counting of cells

OutputInputProblem

Page 13: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition System

Challenges

RepresentationMatching

A pattern recognition system involves

TrainingTesting

Page 14: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Difficulties of Representation

John P. Frisby, Seeing. Illusion, Brian and Mind, Oxford University Press, 1980

How should we model a face to account for the large intra-class variability?

Page 15: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,
Page 16: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Difficulties of Representation

“How do you instruct someone (or some computer) to recognize caricatures in a magazine, let alone find a human figure in a misshapen piece of work?”“A program that could distinguish between male and female faces in a random snapshot would probably earn its author a Ph.D. in computer science.” (Penzias 1989)A representatin could consist of a vector of real-valued numbers, ordered list of attributes, parts and their relations….

Page 17: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Good Representation!

Should have some invariant properties (e.g., w.r.t. rotation, translation, scale…)Account for intra-class variationsAbility to discriminate pattern classes of interestRobustness to noise/occlusionLead to simple decision making (e.g., linear decision boundary)Low cost (affordable)

Page 18: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition SystemDomain-specific knowledge

Acquisition, representationData acquisition

camera, ultrasound, MRI,….Preprocessing

Image enhancement/restoration, segmentationRepresentation

Features: color, shape, textureDecision making

Statistical/geometric pattern recognitionsyntactic/structural pattern recognitionArtificial neural networks

Post-processing/Context

Page 19: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Pattern Recognition System Performance

Error rate (Prob. of misclassification) on independent test samplesSpeedCostRobustnessReject optionReturn on investment

Page 20: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,
Page 21: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Fingerprint ClassificationFingerprint Classification

Assign fingerprints into one of pre-specified types

Plain Arch Tented Arch Right Loop Left Loop

Accidental Pocket Whorl Plain Whorl Double Loop

Page 22: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Fingerprint EnhancementFingerprint Enhancement

Noisy image Enhanced image

• To address the problem of poor quality fingerprints

Page 23: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Segmentation: Face DetectionSegmentation: Face Detection

*Theo Pavlidis, http://home.att.net/~t.pavlidis/comphumans/comphuman.htm

Page 24: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Games Magazine, September 2001

Segmentation: Face DetectionSegmentation: Face Detection

Page 25: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Fish Classification

Preprocessing will involve image enhancement, separating touching/occluding fishes and finding the boundary of the fish

Page 26: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Length FeatureTraining (design or learning) Samples

Page 27: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Lightness Feature

Overlap in the histograms is small compared to length feature

Page 28: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Two-dimensional Feature Space (Representation)

Two features together are better than individual features

Cost of misclassification?

Page 29: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Complex Decision Boundary

Issue of generalization

Page 30: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Boundary With Good Generalization

Simplify the decision boundary!

Page 31: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Feature Selection/extraction

• How many features and which ones to use in constructing the decision boundary?

• Some features may be redundant!

• Curse of dimensionality—problems with too many features especially when we have a small number of training samples

Page 32: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Fruit Sorter

cherries

apples

lemons grapefruits

Decision boundaries

diameter

redness

Castleman, Digital Image Processing, Prentice-Hall, 1979

Page 33: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

General Purpose P.R. System

• Humans have the ability to switch rapidly and seamlessly between different pattern recognition tasks

• It is very difficult to design a device that is capable of performing a variety of different classification tasks

Page 34: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Cat vs. Dog

Page 35: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Access control for water in areas with water shortage (e.g. Australian outback); wildlife vs. livestockInstall a gate that opens only when livestock enters

Identify livestock using a PR systemRugged outdoor camera captures the imageEdge detection and outline tracingMatch to a library of existing shape templatesOpen the gate when there is a match

Prototype system by Dunn et al., U. South Queensland, Australia. Claim that Sheep & goats can be separated with ~100% accuracy

Sheep Vs. Goat

Vision Systems Design, November 2007 (www.vision-systems.com)

AllowDeny

Page 36: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Supervised Classification

Training samples are labeled

Page 37: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Unsupervised Classification

Training samples are unlabeled

Page 38: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Models for Pattern Recognition

Template matching

Statistical (geometric)

Syntactic (structural)

Artificial neural networks (biologically motivated?)

Hybrid approach

Page 39: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Template Matching

Template

Input scene

Page 40: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Deformable Template: Corpus Callosum SegmentationShape training set Prototype and

variation learning

Prototype registration to the low-level segmented image

Prototype warping

Page 41: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Statistical Pattern Recognition

Preprocessing Feature extraction Classification

LearningFeature selection

Recognition

Training

pattern

Patterns+

Class labels

Preprocessing

Page 42: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Each pattern is represented as a point in the d-dimensional feature spaceFeatures and their desired invariance properties are domain-specific

Good representation leads to small intraclass variation, large interclass separation & simple decision rule

Representation

x1

x2

x1

x2

Page 43: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Invariant Representation

Invariance to

• Translation

• Rotation

• Scale

• Skew

• Deformation

• Color

Page 44: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Structural Patten Recognition

Decision-making when features are non-numeric or structuralDescribe complicated objects in terms of simple primitives and structural relationship

Y

N

M

LT

X

Z

Scene

Object Background

D E

L T X Y Z

M ND E

Page 45: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Syntactic Pattern Recognition

Preprocessing

Primitive, relation

extraction

Syntax, structural analysis

Grammatical, structural inference

Primitive selection

Recognition

Training

pattern

Patterns+

Class labels

Preprocessing

Page 46: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Chromosome Grammars

Terminals:VT={∩,⏐,∪,⎨, }Non-terminals: VN={A,B,C,D,E,F}Pattern Classes:

Median Submedian

Acrocentric Telocentric

Page 47: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Chromosome Grammars

Image of human chromosomes

Hierarchical-structure description of a submedium chromosome

Page 48: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Artificial Neural Networks

Massive parallelism is essential for complex pattern recognition tasks (e.g., speech and image recognition)

Humans take only a few hundred milliseconds for most cognitive tasks; this suggests parallel computation in human brain

Biological networks achieve excellent recognition performance via dense interconnection of simple computational elements (neurons)

Number of neurons ≈ 1010 – 1012

Number of interconnections/neuron ≈ 103 – 104

Total number of interconnections ≈ 1014

Page 49: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Artificial Neural Networks

Nodes in neural networks are nonlinear, typically analog

where is internal threshold or offset

x1x2

xd

Y (output)

w1

wd

Page 50: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Feed-forward nets with one or more layers (hidden) between the input and output nodesA three-layer net can generate arbitrary complex decision regions

These nets can be trained by back-propagation training algorithm

Multilayer Perceptron

.

.

.

.

.

.

.

..

d inputs First hidden layerNH1 input units

Second hidden layerNH2 input units

c outputs

Page 51: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

How m chinfo mation are

y u mi sing

Utilizing Context

Qvest

Page 52: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Constraining the Problem

GRAFFITI’S MODIFIED alphabet is largely based on single pen strokes, starting at the dots. As soon as the pen is lifted from the screen, the letter is immediately translated into normal text. The letter “X” is the exception

Graffiti alphabet

Page 53: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Comparing Pattern Recognition Models

Template MatchingAssumes very small intra-class variabilityLearning is difficult for deformable templates

SyntacticPrimitive extraction is sensitive to noiseDescribing a pattern in terms of primitives is difficult

StatisticalAssumption of density model for each class

Neural NetworkParameter tuning and local minima in learning

In practice, statistical and neural network approaches work well

Page 54: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

“Super Classifier”

Pool the evidence from component recognizers (classifier combination, mixture of experts, evidence accumulation)

Page 55: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Statistical Pattern Recognition• Patterns represented in a feature space• Statistical model for pattern generation in feature space

• Given training patterns from each class, goal is to partition the feature space.

Page 56: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Approaches to Statistical Pattern Recognition

Bayes DecisionTheory

COMPLETE

"Optimal"Rules

Plug-in Rules

ParametricApproach

Density Estimation

GeometricRules

(K-NN,MLP)

NonparametricApproach

SupervisedLearning

MixtureResolving

ParametricApproach

ClusterAnalysis

(Hard, Fuzzy)

Non-parametric Approach

UnsupervisedLearning

INCOMPLETE

Prior Information

Page 57: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Summary

Pattern recognition is extremely useful forAutomatic decision makingAssisting human decision makers

Pattern recognition is a very difficult problemSuccessful systems have been built in well-constrained domainsNo single technique/model is suited for all pattern recognition problemsUse of object models, constraints, and context is necessary for identifying complex patternsCareful sensor design and feature extraction can lead to simple classifiers

Page 58: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,
Page 59: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Key Concepts

Pattern classRepresentationFeature extractionFeature selection Invariance (rotation, translation, scale, deformation)PreprocessingSegmentationTraining samplesTest samplesError rateReject rateCurse of dimensionality

Page 60: Pattern Recognition - Michigan State Universitycse802/notes/802intro_course.pdfArtificial Neural Networks Massive parallelism is essential for complex pattern recognition tasks (e.g.,

Key Concepts

Supervised classificationDecision boundary unsupervised classification (clustering)Density Estimation Cost of misclassification/RiskFeature space partitioningGeneralization/overfittingContextual informationMultiple classifiersPrior knowledge