Pattern Recognition CSE 802 Michigan State University Spring 2008
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
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)
Recognition Identification 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 Classification Clustering
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
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
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
Intra-class and Inter-class Variability The letter T in different typefaces Same face under different expression, pose.
Interclass Similarity Characters that look similar Identical twins
Pattern Recognition Having 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 classes RECOGNITION = known classes
Pattern Recognition Applications Problem Speech recognition Non-destructive testing Detection and diagnosis of disease Natural resource identification Aerial reconnaissance Character recognition (page readers, zip code, license plate) Input Speech waveforms Ultrasound, eddy current, acoustic emission waveforms EKG, EEG waveforms Multispectral images Visual, infrared, radar images Optical scanned image Output Spoken words, speaker identity Presence/absence of flaw, type of flaw Types of cardiac conditions, classes of brain conditions Terrain forms, vegetation cover Tanks, airfields Alphanumeric characters
Pattern Recognition Applications Web search Problem Identification and counting of cells Inspection (PC boards, IC masks, textiles) Manufacturing Fingerprint identification Online handwriting retrieval Input Slides of blood samples, microsections of tissues Scanned image (visible, infrared) 3-D images (structured light, laser, stereo) Key words specified by a user Input image from fingerprint sensors Query word written by a user Type of cells Output Acceptable/unacceptable Identify objects, pose, assembly Text relevant to the user Owner of the fingerprint, fingerprint classes Occurrence of the word in the database
Pattern Recognition System Challenges Representation Matching A pattern recognition system involves Training Testing
Difficulties of Representation How should we model a face to account for the large intra-class variability? John P. Frisby, Seeing. Illusion, Brian and Mind, Oxford University Press, 1980
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.
Good Representation! Should have some invariant properties (e.g., w.r.t. rotation, translation, scale ) Account for intra-class variations Ability to discriminate pattern classes of interest Robustness to noise/occlusion Lead to simple decision making (e.g., linear decision boundary) Low cost (affordable)
Pattern Recognition System Domain-specific knowledge Acquisition, representation Data acquisition camera, ultrasound, MRI,. Preprocessing Image enhancement/restoration, segmentation Representation Features: color, shape, texture Decision making Statistical/geometric pattern recognition syntactic/structural pattern recognition Artificial neural networks Post-processing/Context
Pattern Recognition System Performance Error rate (Prob. of misclassification) on independent test samples Speed Cost Robustness Reject option Return on investment
Fingerprint Classification Assign fingerprints into one of pre-specified types Plain Arch Tented Arch Right Loop Left Loop Accidental Pocket Whorl Plain Whorl Double Loop
Fingerprint Enhancement To address the problem of poor quality fingerprints Noisy image Enhanced image
Segmentation: Face Detection *Theo Pavlidis, http://home.att.net/~t.pavlidis/comphumans/comphuman.htm
Segmentation: Face Detection Games Magazine, September 2001
Fish Classification Preprocessing will involve image enhancement, separating touching/occluding fishes and finding the boundary of the fish
Length Feature Training (design or learning) Samples
Lightness Feature Overlap in the histograms is small compared to length feature
Two-dimensional Feature Space (Representation) Cost of misclassification? Two features together are better than individual features
Complex Decision Boundary Issue of generalization
Boundary With Good Generalization Simplify the decision boundary!
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
Fruit Sorter redness Decision boundaries cherries apples lemons grapefruits Castleman, Digital Image Processing, Prentice-Hall, 1979 diameter
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
Cat vs. Dog
Sheep Vs. Goat Access control for water in areas with water shortage (e.g. Australian outback); wildlife vs. livestock Install a gate that opens only when livestock enters Deny Allow Identify livestock using a PR system Rugged outdoor camera captures the image Edge detection and outline tracing Match to a library of existing shape templates Open 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 Vision Systems Design, November 2007 (www.vision-systems.com)
Supervised Classification Training samples are labeled
Unsupervised Classification Training samples are unlabeled
Models for Pattern Recognition Template matching Statistical (geometric) Syntactic (structural) Artificial neural networks (biologically motivated?) Hybrid approach
Template Matching Template Input scene
Deformable Template: Corpus Callosum Segmentation Shape training set Prototype and variation learning Prototype registration to the low-level segmented image Prototype warping
Statistical Pattern Recognition pattern Preprocessing Feature extraction Classification Recognition Training Patterns + Class labels Preprocessing Feature selection Learning
Representation Each pattern is represented as a point in the d- dimensional feature space Features and their desired invariance properties are domain-specific x 2 x 2 x 1 Good representation leads to small intraclass variation, large interclass separation & simple decision rule x 1
Invariant Representation Invariance to Translation Rotation Scale Skew Deformation Color
Structural Patten Recognition Decision-making when features are nonnumeric or structural Describe complicated objects in terms of simple primitives and structural relationship Scene N M L T Y X Z Object Background D E M N D E L T X Y Z
Syntactic Pattern Recognition pattern Preprocessing Primitive, relation extraction Syntax, structural analysis Recognition Training Patterns + Class labels Preprocessing Primitive selection Grammatical, structural inference
Chromosome Grammars Terminals: V T ={,,,, } Non-terminals: V N ={A,B,C,D,E,F} Pattern Classes: Median Submedian Acrocentric Telocentric
Chromosome Grammars Image of human chromosomes Hierarchical-structure description of a submedium chromosome
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 10 10 10 12 Number of interconnections/neuron 10 3 10 4 Total number of interconnections 10 14
Artificial Neural Networks Nodes in neural networks are nonlinear, typically analog x 1 x 2 x d w 1 w d Y (output) where is internal threshold or offset
Multilayer Perceptron Feed-forward nets with one or more layers (hidden) between the input and output nodes A three-layer net can generate arbitrary complex decision regions.. d inputs... First hidden layer NH 1 input units These nets can be trained by backpropagation training algorithm... Second hidden layer NH 2 input units. c outputs
Utilizing Context How m ch info mation are y u mi sing Qvest
Constraining the Problem Graffiti alphabet 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
Comparing Pattern Recognition Models Template Matching Assumes very small intra-class variability Learning is difficult for deformable templates Syntactic Primitive extraction is sensitive to noise Describing a pattern in terms of primitives is difficult Statistical Assumption of density model for each class Neural Network Parameter tuning and local minima in learning In practice, statistical and neural network approaches work well
Super Classifier Pool the evidence from component recognizers (classifier combination, mixture of experts, evidence accumulation)
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.
Approaches to Statistical Pattern Recognition Prior Information COMPLETE INCOMPLETE Bayes Decision Theory Supervised Learning Unsupervised Learning Parametric Approach Nonparametric Approach Parametric Approach Non-parametric Approach "Optimal" Rules Plug-in Rules Density Estimation Geometric Rules (K-NN,MLP) Mixture Resolving Cluster Analysis (Hard, Fuzzy)
Summary Pattern recognition is extremely useful for Automatic decision making Assisting human decision makers Pattern recognition is a very difficult problem Successful systems have been built in wellconstrained domains No single technique/model is suited for all pattern recognition problems Use of object models, constraints, and context is necessary for identifying complex patterns Careful sensor design and feature extraction can lead to simple classifiers
Key Concepts Pattern class Representation Feature extraction Feature selection Invariance (rotation, translation, scale, deformation) Preprocessing Segmentation Training samples Test samples Error rate Reject rate Curse of dimensionality
Key Concepts Supervised classification Decision boundary unsupervised classification (clustering) Density Estimation Cost of misclassification/risk Feature space partitioning Generalization/overfitting Contextual information Multiple classifiers Prior knowledge