Pattern Recognition CSE 802 Michigan State University Spring 2017 - - PowerPoint PPT Presentation

pattern recognition
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Pattern Recognition

CSE 802 Michigan State University Spring 2017 Lecture 1, January 9, 2017

slide-2
SLIDE 2

Pattern Recognition

“The

real power

  • f

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

slide-3
SLIDE 3

Jain CSE 802, Spring 2017

slide-4
SLIDE 4

Pattern Recognition

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

slide-5
SLIDE 5

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)

Jain CSE 802, Spring 2017

slide-6
SLIDE 6

Recognition

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

slide-7
SLIDE 7

Pattern Class

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

slide-8
SLIDE 8

Handwritten numerals

Intra-Class Variability

Jain CSE 802, Spring 2017

slide-9
SLIDE 9

Inter-class Similarity

Identical twins Characters that look similar

Jain CSE 802, Spring 2017

slide-10
SLIDE 10

Cat vs. Dog: 2-class Classification

Jain CSE 802, Spring 2017

slide-11
SLIDE 11

(Supervised) Classification

Labeled training samples for classifier design

Jain CSE 802, Spring 2017

slide-12
SLIDE 12

Clustering: Unsupervised Classification

Training samples are unlabeled

Jain CSE 802, Spring 2017

slide-13
SLIDE 13

Jain CSE 802, Spring 2017

  • 1. Use shape and appearance to classify a pet breed automatically from an

image.

  • 2. Shape is captured by a deformable part model detecting the pet face;

appearance is captured by a bag-of-words model to describe the pet fur.

  • 3. Automatically segmenting the animal in the image.
  • 4. Two classification approaches: a hierarchical one, in which a pet is first

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

slide-14
SLIDE 14

Problem Definition & Data

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:

  • Pet family classification (Cat vs Dog, a 2- class problem)
  • Breed classification given the family (a 12-class problem

for cats and a 25-class problem for dogs)

  • Breed and family classification (a 37-class problem)

Jain CSE 802, Spring 2017

slide-15
SLIDE 15

Example Images of Cats & Dogs

Jain CSE 802, Spring 2017

slide-16
SLIDE 16

Segmentation: Foreground v. Background

Jain CSE 802, Spring 2017

slide-17
SLIDE 17

Feature Extraction

Jain CSE 802, Spring 2017

slide-18
SLIDE 18

Classification Performance

Jain CSE 802, Spring 2017

slide-19
SLIDE 19

Pattern Recognition Applications

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

slide-20
SLIDE 20

Pattern Recognition Applications

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

slide-21
SLIDE 21

License Plate Reading System

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

slide-22
SLIDE 22

Processing Steps

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

slide-23
SLIDE 23

Challenges

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

slide-24
SLIDE 24

Pattern Recognition System

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

slide-25
SLIDE 25

Representation

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?

slide-26
SLIDE 26

Jain CSE 802, Spring 2017

slide-27
SLIDE 27

Jain CSE 802, Spring 2017

slide-28
SLIDE 28

Representation: Desirable Properties

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

slide-29
SLIDE 29

Invariant Representation

Invariant to

  • Translation
  • Rotation
  • Scale
  • Skew
  • Deformation
  • Color

Not all invariant properties are needed for a given application

Jain CSE 802, Spring 2017

slide-30
SLIDE 30

Jain CSE 802, Spring 2017

slide-31
SLIDE 31

System Performance

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

slide-32
SLIDE 32

Reject Option

What if the system encounters a previously unseen class?

Jain CSE 802, Spring 2017

slide-33
SLIDE 33

Jain CSE 802, Spring 2017

Fruit Conveyor belt TV Camera Control unit Crates Movable Partition

Fruit Sorter

Statistical Pattern Recognition, Anil K. Jain

slide-34
SLIDE 34

Veggie Vision: A Produce Recognition System

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

slide-35
SLIDE 35

Pattern Recognition System

Jain CSE 802, Spring 2017

slide-36
SLIDE 36

Fish Classification: Salmon v. Sea Bass

  • Preprocessing

(enhancement, segmentation)

  • Separate touching
  • r occluding fishes
  • Extract fish contour

Jain CSE 802, Spring 2017

slide-37
SLIDE 37

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

slide-38
SLIDE 38

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

  • f the head… then go to

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

slide-39
SLIDE 39

Jain CSE 802, Spring 2017

slide-40
SLIDE 40

Representation: Fish Length as a Feature

Training samples

Jain CSE 802, Spring 2017

slide-41
SLIDE 41

Fish Lightness as a Feature

Overlap of these histograms is small compared to length feature

Jain CSE 802, Spring 2017

slide-42
SLIDE 42

Two-dimensional Feature Space

Joint distribution of two features leads to better separation Linear (simple) decision boundary; linear classifier

Jain CSE 802, Spring 2017

slide-43
SLIDE 43

Complex Decision Boundary

(Polynominal classifier)

What is the generalization ability of the classifier?

Jain CSE 802, Spring 2017

slide-44
SLIDE 44

Good Generalization & Good Accuracy

Simple decision boundaries are preferred

Jain CSE 802, Spring 2017

slide-45
SLIDE 45

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"

slide-46
SLIDE 46

Feature Selection & Extraction

  • Feature selection: which subset to use? Some

features may be redundant

  • Feature extraction: which combination of

given features to use?

  • Curse of dimensionality—Error rate may in

fact increase with too many features in the case of small number of training samples

Jain CSE 802, Spring 2017

slide-47
SLIDE 47

Pattern Recognition Models

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

slide-48
SLIDE 48

Rigid Template Matching

Template Input scene

Prototype

Jain CSE 802, Spring 2017

slide-49
SLIDE 49

Deformable Template

Corpus callosum shape training set Prototype and variation learning Prototype registration to the low-level segmented image Prototype warping

Jain CSE 802, Spring 2017

slide-50
SLIDE 50

Statistical Pattern Recognition

Preprocessing Feature extraction Classification Learning Feature selection Recognition Training pattern

Patterns + Class labels

Preprocessing

Jain CSE 802, Spring 2017

slide-51
SLIDE 51

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

Representation

x1 x2 x1 x2

Jain CSE 802, Spring 2017

slide-52
SLIDE 52

Jain CSE 802, Spring 2017

slide-53
SLIDE 53

Jain CSE 802, Spring 2017

slide-54
SLIDE 54

Jain CSE 802, Spring 2017

slide-55
SLIDE 55

Structural Patten Recognition

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

slide-56
SLIDE 56

Syntactic Pattern Recognition

Preprocessing Primitives & relationship extraction Syntax analysis Grammatical inference Primitive selection Recognition Training pattern

Patterns + Class labels

Preprocessing

Jain CSE 802, Spring 2017

slide-57
SLIDE 57

Chromosome Grammars

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

slide-58
SLIDE 58

Chromosome Grammars

Image of human chromosomes Hierarchical-structure description of a submedium chromosome

Jain CSE 802, Spring 2017

slide-59
SLIDE 59

Neural Networks

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

slide-60
SLIDE 60

Neuron

n Nodes are nonlinear, typically analog

where is internal threshold or offset

x1 x2 xd Y (output)

w1 wd

Jain CSE 802, Spring 2017

slide-61
SLIDE 61

n Feed-forward networks with one or more

layers (hidden) between input & output nodes

n How many nodes & hidden layers? n Network training

Neural Networks

. . . . . . . . .

d inputs First hidden layer NH1 input units Second hidden layer NH2 input units c outputs

Jain CSE 802, Spring 2017

slide-62
SLIDE 62

How m ch info mation are y u mi sing

Context: Post-processing

Qvest

Jain CSE 802, Spring 2017

slide-63
SLIDE 63

Constraining the Recognition 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

n Graffiti alphabet

Jain CSE 802, Spring 2017

slide-64
SLIDE 64

Super Classifier

Pool the evidence from component recognizers; also known as classifier combination, mixture of experts, evidence accumulation

Jain CSE 802, Spring 2017

slide-65
SLIDE 65

Summary

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

slide-66
SLIDE 66

Same Problems, Many Approaches

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

slide-67
SLIDE 67

Key Concepts

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

slide-68
SLIDE 68

Key Concepts

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