Presentation is loading. Please wait.

Presentation is loading. Please wait.

School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Image Recognition COMP 112 2014 # 18.

Similar presentations


Presentation on theme: "School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Image Recognition COMP 112 2014 # 18."— Presentation transcript:

1 School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Image Recognition COMP 112 2014 # 18

2 COMP112 17: 2 Menu Graphics Image recognition AI and Perceptrons Admin

3 COMP112 17: 3 Image recognition Multiple tasks. Recognising an image as belonging to a category Determining if an image contains an instance of some category Identifying the objects in an image. Eg: character recognition Red eye correction. Face detection and face recognition. Pedestrian / hazard detection for cars Google image indexing

4 COMP112 17: 4 How? Matching against prototypes Classification: Match whole image distinguishing fixed categories vs identifying category, if there is anything at all. Detection: Sweep prototype across image and match at each point (Like convolution filter)

5 COMP112 17: 5 Matching prototypes.

6 COMP112 17: 6 Matching prototypes Problems: What prototypes? May need lots. How do you match? average difference of pixel values? Issues to address: scaling rotation brightness pose Red eye detection: Simple prototype: red circle surrounded by a dark region. May need several prototypes at different sizes.

7 COMP112 17: 7 Features Don’t use raw pixels. Compute a set of feature values describing the image remove variations in scale, rotation, brightness, etc. eg SIFT Compare computed feature vector to feature vector of prototypes. May still not be good enough! 3312748937194628298 … 6159281966941402832351279 … 5352

8 COMP112 17: 8 Classifiers Nicer to have a “classifier” function: input = features output = class label 3312748937194628298 … 6159 Classifier “Young girl” We can learn classifiers automatically from large datasets

9 COMP112 17: 9 Perceptrons Linear weighted threshold function Early kind of “Neural Network” Very efficient to compute. Features: weights Output node 3312748937194628298 … 6159 >> 6.4-18-4 Weights represent importance of features (positive or negative) “Yes”  i f i  w i >  Need a perceptron for each possible class Same formula as the convolution filter!

10 COMP112 17: 10 Problem: How do you work out the weights? Very simple learning algorithm: Until it is right: Present an example (+ve or –ve) If perceptron is correct, do nothing If –ve example and wrong active weights too high / threshold too low  Subtract feature vector from weight vector If +ve example and wrong active weights too low / threshold too high  Add feature vector to weight vector Very general learning mechanism! Learning Perceptrons

11 COMP112 17: 11 Problems with Perceptrons Learning algorithm guaranteed to converge, if instances are linearly separable! Many interesting tasks are not linearly separable. Tanks vs non-tanks Need to automatically learn higher level features “E” vs “not E” what should the weights be?

12 COMP112 17: 12 Standard “Neural Network” = multi-level perceptron. Very much more powerful Learning the weights is not so simple! But still possible. Neural Nets “Yes” >> 3312748937194628298 … 6159 ≻4≻4 3312748937194628298 … 61593312748937194628298 … 6159 ≻3≻3 3312748937194628298 … 61593312748937194628298 … 6159 ≻5≻5 3312748937194628298 … 61593312748937194628298 … 6159 ≻2≻2 3312748937194628298 … 61593312748937194628298 … 6159 ≻1≻1 3312748937194628298 … 6159 “Hidden” nodes represent new features.

13 COMP112 17: 13 Learning Neural Networks Learning NN classifiers: Present a training example (along with the correct answer) Compute how much to change each weight to bring the actual answer closer to the correct answer. Adjust weights Repeat a lot of times! Neural Nets are just one of many AI classifier learning mechanisms. Support Vector Machines, Decision Trees, Naïve Bayes, Bayesian Networks, …. All require good features to start with. The image recognition problem is not yet solved


Download ppt "School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Image Recognition COMP 112 2014 # 18."

Similar presentations


Ads by Google