Pattern Recognition
CSE 802 Michigan State University Spring 2017 Lecture 1, January 9, 2017
Pattern Recognition CSE 802 Michigan State University Spring 2017 - - PowerPoint PPT Presentation
Pattern Recognition CSE 802 Michigan State University Spring 2017 Lecture 1, January 9, 2017 Pattern Recognition The real power of human thinking is based on recognizing patterns. The better computers get at pattern recognition, the
CSE 802 Michigan State University Spring 2017 Lecture 1, January 9, 2017
“The
real power
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
“The problem of searching for patterns in data is a fundamental one and has a long and successful history.” Bishop
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
The act of taking as input sensed data (measurements) and taking an action based on the “category” or “class” of the pattern.
Jain CSE 802, Spring 2017
“A pattern is the opposite of a chaos; it is an entity vaguely defined, that could be given a name.” (Watanabe)
Jain CSE 802, Spring 2017
Identification of a pattern as a member of a category (class) we already know, or we are familiar with
n Classification (known categories) n Clustering (learning categories)
Category “A” Category “B” Classification Clustering
Jain CSE 802, Spring 2017
n A collection of similar (not necessarily
identical) objects
n A class is defined by class samples
(exemplars, prototypes)
n Intra-class variability n Inter-class similarity n How to define similarity?
Jain CSE 802, Spring 2017
Handwritten numerals
Jain CSE 802, Spring 2017
Identical twins Characters that look similar
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Labeled training samples for classifier design
Jain CSE 802, Spring 2017
Training samples are unlabeled
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
image.
appearance is captured by a bag-of-words model to describe the pet fur.
assigned to the cat or dog family and then to a breed, and a flat one, in which the breed is obtained directly.
https://www.robots.ox.ac.uk/~vgg/publications/2012/parkhi12a/parkhi12a.pdf
Oxford-IIIT Pet dataset: 7,349 images of cats & dogs of 37 different breeds: 25 dogs & 12 cats. ~200 images/ breed, split randomly into 50 for training, 50 for validation, and 100 for testing. Three tasks are defined:
for cats and a 25-class problem for dogs)
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Problem Input Output Speech recognition Speech waveforms Spoken words, speaker identity Non-destructive testing Ultrasound, eddy current, acoustic emission waveforms Presence/absence of flaw, type of flaw Medical waveform analysis EKG, EEG waveforms Types of cardiac conditions, classes of brain conditions Remote sensing Multispectral images Terrain forms, vegetation cover Aerial reconnaissance Visual, infrared, radar images Tanks, airfields Character recognition (page readers, zip code, license plate) scanned image Alphanumeric characters
Jain CSE 802, Spring 2017
Problem Input Output Identification and counting of cells Slides of blood samples, micro- sections of tissues Type of cells Industrial inspection (PC boards, IC masks, textiles) Scanned image (visible, infrared) Acceptable/unacceptable Factory automation 3-D images (structured light, laser, stereo) Identify objects, pose, assembly Web search Key words specified by a user Text relevant to the user Fingerprint identification Input image from fingerprint sensors Owner of the fingerprint, fingerprint classes Signature recognition (off-line, on-line) Signature Financial transactions
Jain CSE 802, Spring 2017
n Detect and read the license plates n Modules: (i) acquisition, (ii) enhancement,
(iii) segmentation, (iv) character recognition
n Accuracy, robustness & real-time
Jain CSE 802, Spring 2017
n
Plate localization: Isolate the plate in image
n
Preprocessing: Plate orientation and sizing;
n
Normalization: Adjust image brightness & contrast
n
Segmentation: Find individual characters
n
Character recognition: OCR
n
Post-processing: Rules for character placement
Jain CSE 802, Spring 2017
n Poor image resolution: plate too far; low-res. image n Motion blur n Low contrast: overexposure, reflection/shadows n Viewpoint variation and occlusion n Different fonts, background
n Challenges
n Pattern representation n Pattern classification
n System design
n System training or learning n System testing or evaluation
Jain CSE 802, Spring 2017
John P. Frisby, Seeing. Illusion, Brian and Mind, Oxford University Press, 1980
Jain CSE 802, Spring 2017
What facial features to use to account for the large intra-class variability?
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
n Invariance n Account for intra-class variations n Ability to discriminate classes of interest;
low inter-class similarity
n Robustness to noise, occlusion,.. n Provide simple decision making strategies n Low measurement cost; real-time
Jain CSE 802, Spring 2017
Invariant to
Not all invariant properties are needed for a given application
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
n Error rate; confusion matrix, RoC n Speed (throughput) n Cost n Robustness n Reject option n Return on Investment (RoI)
Jain CSE 802, Spring 2017
水
What if the system encounters a previously unseen class?
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Fruit Conveyor belt TV Camera Control unit Crates Movable Partition
Statistical Pattern Recognition, Anil K. Jain
http://researcher.watson.ibm.com/researcher/files/us-smiyaza/jhc-waiat.pdf http://researcher.watson.ibm.com/researcher/files/us-smiyaza/jhc-wacv.pdf
A test of 145 items, every item on the shelf, was performed, using all produce items available in a supermarket. Ten images per item was collected for a total of 1,450 images. Leave-one-out method for evaluation was used. For color & texture features combined, 84% of the time, correct produce class was selected, 96% of the time, the correct class was present in the top four choices.
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
(enhancement, segmentation)
Jain CSE 802, Spring 2017
Cut out each of the fish cards on this page, then follow your teacher’s instructions for sorting the fish into categories. After you have compared your classification system with your classmates, follow the steps in the fish key below to identify the names of the fish.
http://www-tc.pbs.org/wgbh/nova/education/activities/pdf/2215_reef.pdf Jain CSE 802, Spring 2017
Fish Key (Rule-based System, Decision Tree)
Step 1 If fish shape is long and skinny… then go to Step 2 If fish shape is not long and skinny… then go to step 3 Step 2 If the fish has pointed fins, it is a trumpet fish If the fish has smooth fins, it is a spotted moray eel Step 3 If fish has both eyes on top
step 4 If fish has one eye on each side of the head… then go to step 5 Step 4 If the fish has long whip-like tail, it is a spotted eagle ray If the fish has short, blunt tail, it is a peacock flounder Step 5 If fish has spots… then go to step 6 If fish does not have spots… then go to step 7 Step 6 If fish has chin “whiskers,” it is a spotted goat fish If fish does not have chin “whiskers,” it is a band-tail puffer Step 7 If fish has stripes… then go to step 8 If fish does not have stripes, it is a glassy sweeper Step 8 If fish has a v-shaped tail, it is a squirrel fish If fish has a blunt tail, it is a glass-eye snapper
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Representation: Fish Length as a Feature
Training samples
Jain CSE 802, Spring 2017
Overlap of these histograms is small compared to length feature
Jain CSE 802, Spring 2017
Joint distribution of two features leads to better separation Linear (simple) decision boundary; linear classifier
Jain CSE 802, Spring 2017
(Polynominal classifier)
What is the generalization ability of the classifier?
Jain CSE 802, Spring 2017
Simple decision boundaries are preferred
Jain CSE 802, Spring 2017
Occam’s Razor (William of Ockham (c. 1287–1347)
Jain CSE 802, Spring 2017
"If you have two equally likely solutions to a problem, choose the simplest"
features may be redundant
given features to use?
fact increase with too many features in the case of small number of training samples
Jain CSE 802, Spring 2017
n Template matching
n Class-specific shape & appearance models
n Statistical (geometric)
n Class-specific Prob. density function (pdf)
n Syntactic (structural)
n Class-specific grammar
n Neural networks
Jain CSE 802, Spring 2017
Template Input scene
Prototype
Jain CSE 802, Spring 2017
Corpus callosum shape training set Prototype and variation learning Prototype registration to the low-level segmented image Prototype warping
Jain CSE 802, Spring 2017
Preprocessing Feature extraction Classification Learning Feature selection Recognition Training pattern
Patterns + Class labels
Preprocessing
Jain CSE 802, Spring 2017
n Each pattern is represented as a point in d-
dimensional feature space
n Choice of features and their desired invariance
properties are domain-specific
n Good representation implies (i) small intra-class
variation, (ii) large interclass separation and (iii) simple decision boundary
x1 x2 x1 x2
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
n Instead of describing an object in terms of a
feature vector, describe it by its structure
n Complex objects are represented in terms of
simple primitives (shapes) and their relationship; parts-based representation (represent face as eyes, mouth, nose,…)
N M L T X Z
Scene Object Background D E
L T X Y Z M N D E
Jain CSE 802, Spring 2017
Preprocessing Primitives & relationship extraction Syntax analysis Grammatical inference Primitive selection Recognition Training pattern
Patterns + Class labels
Preprocessing
Jain CSE 802, Spring 2017
n Terminals:
VT={Ç,½,È,í, }
n Non-terminals:
VN={A,B,C,D,E,F}
n Pattern Classes:
Median Submedian Acrocentric Telocentric
Jain CSE 802, Spring 2017
Image of human chromosomes Hierarchical-structure description of a submedium chromosome
Jain CSE 802, Spring 2017
n Massive parallelism essential for complex
recognition tasks (speech & image recognition)
n Humans take only ~200ms. for most cognitive
tasks; this suggests parallel computation in human brain
n Biological networks achieve excellent recognition
performance via dense interconnection of simple computational elements (neurons)
n Number of neurons » 1010 – 1012 n Number of interconnections/neuron » 103 – 104 n Total number of interconnections » 1014
Jain CSE 802, Spring 2017
n Nodes are nonlinear, typically analog
where is internal threshold or offset
x1 x2 xd Y (output)
w1 wd
Jain CSE 802, Spring 2017
n Feed-forward networks with one or more
layers (hidden) between input & output nodes
n How many nodes & hidden layers? n Network training
. . . . . . . . .
d inputs First hidden layer NH1 input units Second hidden layer NH2 input units c outputs
Jain CSE 802, Spring 2017
Jain CSE 802, Spring 2017
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
n Graffiti alphabet
Jain CSE 802, Spring 2017
Pool the evidence from component recognizers; also known as classifier combination, mixture of experts, evidence accumulation
Jain CSE 802, Spring 2017
n Pattern recognition
n Automatic decision making n Assist human decision makers
n General-purpose PR is difficult; systems available
for constrained domains: mugshot face recognition
n No single recognition approach is optimal for all PR
problems; toolbox of classifiers
n Use of object models, constraints and context helps n Careful sensor design and feature extraction lead to
simple classifiers
Jain CSE 802, Spring 2017
n Fisher Linear Discriminant (1936) n Perceptron, Rumelhart (1958) n Adaptive multilayer networks, Widrow (1960s) n Backpropagation learning algorithm, Werbos (1974) n Artificial Intelligence (AI), McCarthy (1956) n Pattern recognition n Artificial neural networks n Data mining n Machine learning n Knowledge discovery, expert systems n Deep networks, convolution neural networks Jain CSE 802, Spring 2017
Recognition, Classification, Clustering, Regression
n Pattern class n Representation, feature set n Feature selection n Feature extraction n Linear transformation (PCA, LDA) n Feature invariance n Preprocessing n Segmentation n Training set n Validation set n Test set n Error rate n Reject rate n Curse of dimensionality Jain CSE 802, Spring 2017
n Supervised learning n Decision boundary n Classifier n unsupervised learning n Clustering n Density Estimation n Cost of misclassification/Risk n Feature space partitioning n Generalization (overfitting) n Contextual information n Combination of classifiers n Prior knowledge Jain CSE 802, Spring 2017