CSSE463: Image Recognition Day 31 Today: Bayesian classifiers Today: Bayesian classifiers Tomorrow: project day. Tomorrow: project day. Questions? Questions?

Slides:



Advertisements
Similar presentations
Pseudo-Relevance Feedback For Multimedia Retrieval By Rong Yan, Alexander G. and Rong Jin Mwangi S. Kariuki
Advertisements

CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu Lecture 27 – Overview of probability concepts 1.
Naïve Bayes. Bayesian Reasoning Bayesian reasoning provides a probabilistic approach to inference. It is based on the assumption that the quantities of.
ECE 8443 – Pattern Recognition LECTURE 05: MAXIMUM LIKELIHOOD ESTIMATION Objectives: Discrete Features Maximum Likelihood Resources: D.H.S: Chapter 3 (Part.
Applied Probability Lecture 5 Tina Kapur
Lecture 14 – Neural Networks
Support Vector Machines and Kernel Methods
Hidden Markov Model 11/28/07. Bayes Rule The posterior distribution Select k with the largest posterior distribution. Minimizes the average misclassification.
1 Chapter 12 Probabilistic Reasoning and Bayesian Belief Networks.
Predictive Automatic Relevance Determination by Expectation Propagation Yuan (Alan) Qi Thomas P. Minka Rosalind W. Picard Zoubin Ghahramani.
Berkeley Vision GroupNIPS Vancouver Learning to Detect Natural Image Boundaries Using Local Brightness,
CSSE463: Image Recognition Day 17 Sunset detector spec posted. Sunset detector spec posted. Homework tonight: read it, prepare questions! Homework tonight:
5/30/2006EE 148, Spring Visual Categorization with Bags of Keypoints Gabriella Csurka Christopher R. Dance Lixin Fan Jutta Willamowski Cedric Bray.
Computer vision: models, learning and inference
Thanks to Nir Friedman, HU
Bayesian Classification with a brief introduction to pattern recognition Modified from slides by Michael L. Raymer, Ph.D.
Bayesian Learning for Conditional Models Alan Qi MIT CSAIL September, 2005 Joint work with T. Minka, Z. Ghahramani, M. Szummer, and R. W. Picard.
Review Rong Jin. Comparison of Different Classification Models  The goal of all classifiers Predicating class label y for an input x Estimate p(y|x)
CS Bayesian Learning1 Bayesian Learning. CS Bayesian Learning2 States, causes, hypotheses. Observations, effect, data. We need to reconcile.
Review: Probability Random variables, events Axioms of probability
Exercise Session 10 – Image Categorization
ECSE 6610 Pattern Recognition Professor Qiang Ji Spring, 2011.
ECE 8443 – Pattern Recognition LECTURE 06: MAXIMUM LIKELIHOOD AND BAYESIAN ESTIMATION Objectives: Bias in ML Estimates Bayesian Estimation Example Resources:
ECE 8443 – Pattern Recognition LECTURE 03: GAUSSIAN CLASSIFIERS Objectives: Normal Distributions Whitening Transformations Linear Discriminants Resources.
A Comparison Between Bayesian Networks and Generalized Linear Models in the Indoor/Outdoor Scene Classification Problem.
ECE 8443 – Pattern Recognition Objectives: Error Bounds Complexity Theory PAC Learning PAC Bound Margin Classifiers Resources: D.M.: Simplified PAC-Bayes.
URL:.../publications/courses/ece_8443/lectures/current/exam/2004/ ECE 8443 – Pattern Recognition LECTURE 15: EXAM NO. 1 (CHAP. 2) Spring 2004 Solutions:
Naïve Bayes Classifier. Red = Yellow = Mass = Volume = Apple Sensors, scales, etc… 8/29/03Bayesian Classifier2.
Chapter 4: Pattern Recognition. Classification is a process that assigns a label to an object according to some representation of the object’s properties.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Image Recognition COMP # 18.
CSSE463: Image Recognition Day 11 Lab 4 (shape) tomorrow: feel free to start in advance Lab 4 (shape) tomorrow: feel free to start in advance Test Monday.
Probability Course web page: vision.cis.udel.edu/cv March 19, 2003  Lecture 15.
Bayesian Classification Using P-tree  Classification –Classification is a process of predicting an – unknown attribute-value in a relation –Given a relation,
1 Pattern Recognition: Statistical and Neural Lonnie C. Ludeman Lecture 8 Sept 23, 2005 Nanjing University of Science & Technology.
ECE 471/571 – Lecture 2 Bayesian Decision Theory 08/25/15.
Review: Probability Random variables, events Axioms of probability Atomic events Joint and marginal probability distributions Conditional probability distributions.
CSSE463: Image Recognition Day 31 Today: Bayesian classifiers Today: Bayesian classifiers Tomorrow: Out-of-class project workday Tomorrow: Out-of-class.
Guest lecture: Feature Selection Alan Qi Dec 2, 2004.
Chapter 20 Classification and Estimation Classification – Feature selection Good feature have four characteristics: –Discrimination. Features.
Naïve Bayes Classification Material borrowed from Jonathan Huang and I. H. Witten’s and E. Frank’s “Data Mining” and Jeremy Wyatt and others.
CSSE463: Image Recognition Day 11 Due: Due: Written assignment 1 tomorrow, 4:00 pm Written assignment 1 tomorrow, 4:00 pm Start thinking about term project.
A New Method for Crater Detection Heather Dunlop November 2, 2006.
The Uniform Prior and the Laplace Correction Supplemental Material not on exam.
Cell Segmentation in Microscopy Imagery Using a Bag of Local Bayesian Classifiers Zhaozheng Yin RI/CMU, Fall 2009.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Classification COMP Seminar BCB 713 Module Spring 2011.
12/1/2009 Liu, Cheng Yang, Hsiu-Han Han, Seung Yeob 1 CS 590 Project Indoor/Outdoor Classification December 1, 2009 Liu, Cheng Yang, Hsiu-Han Han, Seung.
CMPS 142/242 Review Section Fall 2011 Adapted from Lecture Slides.
Naïve Bayes Classification Recitation, 1/25/07 Jonathan Huang.
Objectives: Loss Functions Risk Min. Error Rate Class. Resources: DHS – Chap. 2 (Part 1) DHS – Chap. 2 (Part 2) RGO - Intro to PR MCE for Speech MCE for.
Text Classification and Naïve Bayes Formalizing the Naïve Bayes Classifier.
CSSE463: Image Recognition Day 34
CSSE463: Image Recognition Day 11
Alan Qi Thomas P. Minka Rosalind W. Picard Zoubin Ghahramani
Lecture 14: Introduction to Recognition
Data Mining Lecture 11.
Lecture 26: Faces and probabilities
CSSE463: Image Recognition Day 27
CSSE463: Image Recognition Day 17
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
Pattern Recognition and Image Analysis
CSSE463: Image Recognition Day 31
LECTURE 23: INFORMATION THEORY REVIEW
CSSE463: Image Recognition Day 27
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
Parametric Methods Berlin Chen, 2005 References:
Learning From Observed Data
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
CSSE463: Image Recognition Day 34
Presentation transcript:

CSSE463: Image Recognition Day 31 Today: Bayesian classifiers Today: Bayesian classifiers Tomorrow: project day. Tomorrow: project day. Questions? Questions?

Exam 3 Thursday Closed book, notes, computer Closed book, notes, computer BUT you may bring notes (index card or 1-side of paper) BUT you may bring notes (index card or 1-side of paper) You may also want a calculator. You may also want a calculator. Pdf of review questions ? Pdf of review questions ? Not cumulative: focus is k-means and later. Not cumulative: focus is k-means and later. More hints tomorrow? More hints tomorrow?

Bayesian classifiers Use training data Use training data Calculate the probabilities of each feature. Calculate the probabilities of each feature. If 2 classes: If 2 classes: Classes   and   Classes   and   Say, circles vs. non-circles Say, circles vs. non-circles A single feature, x A single feature, x Both classes equally likely Both classes equally likely Both types of errors equally bad Both types of errors equally bad Where should we set the threshold between classes? Here? Where should we set the threshold between classes? Here? Where in graph are 2 types of errors? Where in graph are 2 types of errors? x p(x) P(x|  1 ) Non-circles P(x|  2 ) Circles Detected as circles Q1-4

What if we have prior information? Bayesian probabilities say that if we only expect 10% of the objects to be circles, that should affect our classification Bayesian probabilities say that if we only expect 10% of the objects to be circles, that should affect our classification Q5-8

Bayesian classifier in general Bayes rule: Bayes rule: Verify with example Verify with example For classifiers: For classifiers: x = feature(s) x = feature(s)  i = class  i = class P(  |x) = posterior probability P(  |x) = posterior probability P(  ) = prior P(  ) = prior P(x) = unconditional probability P(x) = unconditional probability Find best class by maximum a posteriori (MAP) priniciple. Find class i that maximizes P(  i |x). Find best class by maximum a posteriori (MAP) priniciple. Find class i that maximizes P(  i |x). Denominator doesn’t affect calculations Denominator doesn’t affect calculations Example: Example: indoor/outdoor classification indoor/outdoor classification Learned from examples (histogram) Learned from training set (or leave out if unknown) Fixed

Indoor vs. outdoor classification I can use low-level image info (color, texture, etc) I can use low-level image info (color, texture, etc) But there’s another source of really helpful info! But there’s another source of really helpful info!

Camera Metadata Distributions Exposure Time Flash Subject Distance Scene Brightness

Why we need Bayes Rule Problem: We know conditional probabilities like P(flash was on | indoor) We want to find conditional probabilities like P(indoor | flash was on, exp time = 0.017, sd=8 ft, SVM output) Let  = class of image, and x = all the evidence. More generally, we know P( x |  ) from the training set (why?) But we want P(  | x)

Using Bayes Rule P(  |x) = P(x|  )P(  )/P(x) The denominator is constant for an image, so P(  |x) =  P(x|  )P(  ) Q9

Using Bayes Rule P(  |x) = P(x|  )P(  )/P(x) The denominator is constant for an image, so P(  |x) =  P(x|  )P(  ) We have two types of features, from image metadata (M) and from low-level features, like color (L) Conditional independence means P(x|  ) = P(M|  )P(L|  ) P(  |X) =  P(M|  ) P(L|  ) P(  ) P(  |X) =  P(M|  ) P(L|  ) P(  ) From histogramsFrom SVM Priors (initial bias)

Bayesian network Efficient way to encode conditional probability distributions and calculate marginals Efficient way to encode conditional probability distributions and calculate marginals Use for classification by having the classification node at the root Use for classification by having the classification node at the root Examples Examples Indoor-outdoor classification Indoor-outdoor classification Automatic image orientation detection Automatic image orientation detection

Indoor vs. outdoor classification SVM KL Divergence Color Features SVM Texture Features EXIF header Each edge in the graph has an associated matrix of conditional probabilities

Effects of Image Capture Context Recall for a class C is fraction of C classified correctly

Orientation detection See IEEE TPAMI paper See IEEE TPAMI paper Hardcopy or posted Hardcopy or posted Also uses single-feature Bayesian classifier (answer to #1-4) Also uses single-feature Bayesian classifier (answer to #1-4) Keys: Keys: 4-class problem (North, South, East, West) 4-class problem (North, South, East, West) Priors really helped here! Priors really helped here! You should be able to understand the two papers (both posted) You should be able to understand the two papers (both posted)