CSSE463: Image Recognition Day 17

Slides:



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

Applied Probability Lecture 5 Tina Kapur
CS 590M Fall 2001: Security Issues in Data Mining Lecture 3: Classification.
CSSE463: Image Recognition Day 17 Sunset detector spec posted. Sunset detector spec posted. Homework tonight: read it, prepare questions! Homework tonight:
Bayesian Classification with a brief introduction to pattern recognition Modified from slides by Michael L. Raymer, Ph.D.
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)
Exercise Session 10 – Image Categorization
Lecture 2: Bayesian Decision Theory 1. Diagram and formulation
Sergios Theodoridis Konstantinos Koutroumbas Version 2
A Comparison Between Bayesian Networks and Generalized Linear Models in the Indoor/Outdoor Scene Classification Problem.
CSSE463: Image Recognition Day 31 Today: Bayesian classifiers Today: Bayesian classifiers Tomorrow: project day. Tomorrow: project day. Questions? Questions?
URL:.../publications/courses/ece_8443/lectures/current/exam/2004/ ECE 8443 – Pattern Recognition LECTURE 15: EXAM NO. 1 (CHAP. 2) Spring 2004 Solutions:
Chapter 4: Pattern Recognition. Classification is a process that assigns a label to an object according to some representation of the object’s properties.
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.
CSSE463: Image Recognition Day 31 Today: Bayesian classifiers Today: Bayesian classifiers Tomorrow: Out-of-class project workday Tomorrow: Out-of-class.
Chapter 20 Classification and Estimation Classification – Feature selection Good feature have four characteristics: –Discrimination. Features.
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.
Cell Segmentation in Microscopy Imagery Using a Bag of Local Bayesian Classifiers Zhaozheng Yin RI/CMU, Fall 2009.
Bayesian Conditional Random Fields using Power EP Tom Minka Joint work with Yuan Qi and Martin Szummer.
CMPS 142/242 Review Section Fall 2011 Adapted from Lecture Slides.
Naïve Bayes Classification Recitation, 1/25/07 Jonathan Huang.
Text Classification and Naïve Bayes Formalizing the Naïve Bayes Classifier.
Applied statistics Usman Roshan.
CSSE463: Image Recognition Day 14
Bayesian inference, Naïve Bayes model
MIRA, SVM, k-NN Lirong Xia. MIRA, SVM, k-NN Lirong Xia.
CSSE463: Image Recognition Day 34
CSSE463: Image Recognition Day 11
Lecture 14: Introduction to Recognition
Data Mining Lecture 11.
Object detection as supervised classification
Announcements Project 1 artifact winners
Lecture 26: Faces and probabilities
CSSE463: Image Recognition Day 20
CSSE463: Image Recognition Day 11
CSSE463: Image Recognition Day 27
CHAPTER 7 BAYESIAN NETWORK INDEPENDENCE BAYESIAN NETWORK INFERENCE MACHINE LEARNING ISSUES.
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 14
CS4670: Intro to Computer Vision
CSSE463: Image Recognition Day 15
Midterm Exam Closed book, notes, computer Format:
CSSE463: Image Recognition Day 15
CSSE463: Image Recognition Day 14
CSSE463: Image Recognition Day 31
CSSE463: Image Recognition Day 15
CSSE463: Image Recognition Day 14
CSSE463: Image Recognition Day 27
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
Pull 2 samples of 10 pennies and record both averages (2 dots).
CSSE463: Image Recognition Day 15
Announcements Project 2 artifacts Project 3 due Thursday night
Announcements Project 4 out today Project 2 winners help session today
Parametric Methods Berlin Chen, 2005 References:
CSSE463: Image Recognition Day 16
CSSE463: Image Recognition Day 14
Where are we? We have covered: Project 1b was due today
Announcements Artifact due Thursday
CSSE463: Image Recognition Day 15
Nonparametric density estimation and classification
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
CSSE463: Image Recognition Day 11
CSSE463: Image Recognition Day 11
CSSE463: Image Recognition Day 16
CSSE463: Image Recognition Day 34
Announcements Artifact due Thursday
MIRA, SVM, k-NN Lirong Xia. MIRA, SVM, k-NN Lirong Xia.
The “Margaret Thatcher Illusion”, by Peter Thompson
Presentation transcript:

CSSE463: Image Recognition Day 17 Today: Bayesian classifiers Tomorrow: Lightning talks and exam questions Weds night: Lab due Thursday: Exam Bring your calculator. Questions?

Exam Thursday Closed book, notes, computer BUT you may bring notes (1-side of paper) You may also want a calculator. Similar to the written assignment in format: Some questions from daily quizzes Some extensions of quizzes Some applications of image-processing algorithms Some questions asking about process you followed in lab Also a few Matlab-specific questions Write 2-3 lines of code to… Pdf of review questions posted in Slides folder under day 18. Also, looking at Voronai diagrams for nearest neighbor classifiers will help: http://ai6034.mit.edu/fall07/index.php?title=Demonstrations

Bayesian classifiers Use training data If 2 classes: Assume that you know probabilities of each feature. If 2 classes: Classes w1 and w2 Say, circles vs. non-circles A single feature, x Both classes equally likely Both types of errors equally bad Where should we set the threshold between classes? Here? Where in graph are 2 types of errors? p(x) P(x|w1) P(x|w2) Circles Non-circles x 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 Q5-8

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

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

Camera Metadata Distributions Subject Distance Flash Scene Brightness Exposure Time Subject Distance

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 w = class of image, and x = all the evidence. More generally, we know P( x | w ) from the training set (why?) But we want P(w | x)

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

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

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

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

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

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