Generative learning methods for bags of features

Slides:



Advertisements
Similar presentations
Topic models Source: Topic models, David Blei, MLSS 09.
Advertisements

Tamara Berg Object Recognition – BoF models Recognizing People, Objects, & Actions 1.
Information retrieval – LSI, pLSI and LDA
Bayes Rule The product rule gives us two ways to factor a joint probability: Therefore, Why is this useful? –Can get diagnostic probability P(Cavity |
Part 1: Bag-of-words models by Li Fei-Fei (Princeton)
Marco Cristani Teorie e Tecniche del Riconoscimento1 Teoria e Tecniche del Riconoscimento Estrazione delle feature: Bag of words Facoltà di Scienze MM.
1 Part 1: Classical Image Classification Methods Kai Yu Dept. of Media Analytics NEC Laboratories America Andrew Ng Computer Science Dept. Stanford University.
Statistical Topic Modeling part 1
CS4670 / 5670: Computer Vision Bag-of-words models Noah Snavely Object
Bag-of-features models. Origin 1: Texture recognition Texture is characterized by the repetition of basic elements or textons For stochastic textures,
Unsupervised and Weakly-Supervised Probabilistic Modeling of Text Ivan Titov April TexPoint fonts used in EMF. Read the TexPoint manual before.
Discriminative and generative methods for bags of features
Bag-of-features models Many slides adapted from Fei-Fei Li, Rob Fergus, and Antonio Torralba.
Generative Topic Models for Community Analysis
Beyond bags of features: Part-based models Many slides adapted from Fei-Fei Li, Rob Fergus, and Antonio Torralba.
Probabilistic inference
Assuming normally distributed data! Naïve Bayes Classifier.
Bayes Rule How is this rule derived? Using Bayes rule for probabilistic inference: –P(Cause | Evidence): diagnostic probability –P(Evidence | Cause): causal.
Beyond bags of features: Adding spatial information Many slides adapted from Fei-Fei Li, Rob Fergus, and Antonio Torralba.
Lecture 28: Bag-of-words models
Agenda Introduction Bag-of-words model Visual words with spatial location Part-based models Discriminative methods Segmentation and recognition Recognition-based.
Expectation Maximization Method Effective Image Retrieval Based on Hidden Concept Discovery in Image Database By Sanket Korgaonkar Masters Computer Science.
Beyond bags of features: Adding spatial information Many slides adapted from Fei-Fei Li, Rob Fergus, and Antonio Torralba.
Latent Dirichlet Allocation a generative model for text
CSE 221: Probabilistic Analysis of Computer Systems Topics covered: Statistical inference (Sec. )
Bag-of-features models
Unsupervised discovery of visual object class hierarchies Josef Sivic (INRIA / ENS), Bryan Russell (MIT), Andrew Zisserman (Oxford), Alyosha Efros (CMU)
Generative learning methods for bags of features
Object Recognition: Conceptual Issues Slides adapted from Fei-Fei Li, Rob Fergus, Antonio Torralba, and K. Grauman.
A Bayesian Hierarchical Model for Learning Natural Scene Categories L. Fei-Fei and P. Perona. CVPR 2005 Discovering objects and their location in images.
Probabilistic Latent Semantic Analysis
Naïve Bayes Classification Debapriyo Majumdar Data Mining – Fall 2014 Indian Statistical Institute Kolkata August 14, 2014.
Topic models for corpora and for graphs. Motivation Social graphs seem to have –some aspects of randomness small diameter, giant connected components,..
An Introduction to Action Recognition/Detection Sami Benzaid November 17, 2009.
Language Modeling Approaches for Information Retrieval Rong Jin.
Object recognition. Object Classes Individual Recognition.
Discriminative and generative methods for bags of features
CSE 221: Probabilistic Analysis of Computer Systems Topics covered: Statistical inference.
Review: Probability Random variables, events Axioms of probability
Step 3: Classification Learn a decision rule (classifier) assigning bag-of-features representations of images to different classes Decision boundary Zebra.
Introduction to Machine Learning for Information Retrieval Xiaolong Wang.
Example 16,000 documents 100 topic Picked those with large p(w|z)
Topic Models in Text Processing IR Group Meeting Presented by Qiaozhu Mei.
Text Classification, Active/Interactive learning.
Bag-of-features models. Origin 1: Texture recognition Texture is characterized by the repetition of basic elements or textons For stochastic textures,
Empirical Research Methods in Computer Science Lecture 7 November 30, 2005 Noah Smith.
ECE 5984: Introduction to Machine Learning Dhruv Batra Virginia Tech Topics: –Unsupervised Learning: Kmeans, GMM, EM Readings: Barber
A Model for Learning the Semantics of Pictures V. Lavrenko, R. Manmatha, J. Jeon Center for Intelligent Information Retrieval Computer Science Department,
Latent Dirichlet Allocation D. Blei, A. Ng, and M. Jordan. Journal of Machine Learning Research, 3: , January Jonathan Huang
An Introduction to Latent Dirichlet Allocation (LDA)
Context-based vision system for place and object recognition Antonio Torralba Kevin Murphy Bill Freeman Mark Rubin Presented by David Lee Some slides borrowed.
Latent Dirichlet Allocation
Discovering Objects and their Location in Images Josef Sivic 1, Bryan C. Russell 2, Alexei A. Efros 3, Andrew Zisserman 1 and William T. Freeman 2 Goal:
Towards Total Scene Understanding: Classification, Annotation and Segmentation in an Automatic Framework N 工科所 錢雅馨 2011/01/16 Li-Jia Li, Richard.
CS654: Digital Image Analysis
Design and Implementation of Speech Recognition Systems Fall 2014 Ming Li Special topic: the Expectation-Maximization algorithm and GMM Sep Some.
2005/09/13 A Probabilistic Model for Retrospective News Event Detection Zhiwei Li, Bin Wang*, Mingjing Li, Wei-Ying Ma University of Science and Technology.
Text-classification using Latent Dirichlet Allocation - intro graphical model Lei Li
A PPLICATIONS OF TOPIC MODELS Daphna Weinshall B Slides credit: Joseph Sivic, Li Fei-Fei, Brian Russel and others.
Text Classification and Naïve Bayes Formalizing the Naïve Bayes Classifier.
Unsupervised Learning Part 2. Topics How to determine the K in K-means? Hierarchical clustering Soft clustering with Gaussian mixture models Expectation-Maximization.
Bayesian inference, Naïve Bayes model
B. Freeman, Tomasz Malisiewicz, Tom Landauer and Peter Foltz,
The topic discovery models
Context-based vision system for place and object recognition
The topic discovery models
The topic discovery models
Unsupervised Learning II: Soft Clustering with Gaussian Mixture Models
Topic Models in Text Processing
Part 1: Bag-of-words models
Presentation transcript:

Generative learning methods for bags of features Model the probability of a bag of features given a class Many slides adapted from Fei-Fei Li, Rob Fergus, and Antonio Torralba

Generative methods We will cover two models, both inspired by text document analysis: Naïve Bayes Probabilistic Latent Semantic Analysis

The Naïve Bayes model Assume that each feature is conditionally independent given the class wi: ith feature in the image N: number of features in the image Csurka et al. 2004

The Naïve Bayes model Assume that each feature is conditionally independent given the class wi: ith feature in the image N: number of features in the image W: size of visual vocabulary n(w): number of features with index w in the image Csurka et al. 2004

The Naïve Bayes model Assume that each feature is conditionally independent given the class No. of features of type w in training images of class c Total no. of features in training images of class c p(w | c) = Csurka et al. 2004

The Naïve Bayes model Assume that each feature is conditionally independent given the class No. of features of type w in training images of class c + 1 Total no. of features in training images of class c + W p(w | c) = (Laplace smoothing to avoid zero counts) Csurka et al. 2004

The Naïve Bayes model MAP decision: (you should compute the log of the likelihood instead of the likelihood itself in order to avoid underflow) Csurka et al. 2004

The Naïve Bayes model “Graphical model”: c w N Csurka et al. 2004

Probabilistic Latent Semantic Analysis = α1 + α2 + α3 Image zebra grass tree “visual topics” T. Hofmann, Probabilistic Latent Semantic Analysis, UAI 1999

Probabilistic Latent Semantic Analysis Unsupervised technique Two-level generative model: a document is a mixture of topics, and each topic has its own characteristic word distribution w d z document topic word P(z|d) P(w|z) T. Hofmann, Probabilistic Latent Semantic Analysis, UAI 1999

Probabilistic Latent Semantic Analysis Unsupervised technique Two-level generative model: a document is a mixture of topics, and each topic has its own characteristic word distribution w d z T. Hofmann, Probabilistic Latent Semantic Analysis, UAI 1999

The pLSA model Probability of word i in document j (known) Probability of word i given topic k (unknown) Probability of topic k given document j (unknown) For that we will use a method called probabilistic latent semantic analysis. pLSA can be thought of as a matrix decomposition. Here is our term-document matrix (documents, words) and we want to find topic vectors common to all documents and mixture coefficients P(z|d) specific to each document. Note that these are all probabilites which sum to one. So a column here is here expressed as a convex combination of the topic vectors. What we would like to see is that the topics correspond to objects. So an image will be expressed as a mixture of different objects and backgrounds.

Codeword distributions The pLSA model documents topics documents p(wi|dj) p(wi|zk) p(zk|dj) words words topics = For that we will use a method called probabilistic latent semantic analysis. pLSA can be thought of as a matrix decomposition. Here is our term-document matrix (documents, words) and we want to find topic vectors common to all documents and mixture coefficients P(z|d) specific to each document. Note that these are all probabilites which sum to one. So a column here is here expressed as a convex combination of the topic vectors. What we would like to see is that the topics correspond to objects. So an image will be expressed as a mixture of different objects and backgrounds. Observed codeword distributions (M×N) Codeword distributions per topic (class) (M×K) Class distributions per image (K×N)

Learning pLSA parameters Maximize likelihood of data: Observed counts of word i in document j We use maximum likelihood approach to fit parameters of the model. We write down the likelihood of the whole collection and maximize it using EM. M,N goes over all visual words and all documents. P(w|d) factorizes as on previous slide the entries in those matrices are our parameters. n(w,d) are the observed counts in our data M … number of codewords N … number of images Slide credit: Josef Sivic

Inference Finding the most likely topic (class) for an image: We use maximum likelihood approach to fit parameters of the model. We write down the likelihood of the whole collection and maximize it using EM. M,N goes over all visual words and all documents. P(w|d) factorizes as on previous slide the entries in those matrices are our parameters. n(w,d) are the observed counts in our data

Inference Finding the most likely topic (class) for an image: Finding the most likely topic (class) for a visual word in a given image: We use maximum likelihood approach to fit parameters of the model. We write down the likelihood of the whole collection and maximize it using EM. M,N goes over all visual words and all documents. P(w|d) factorizes as on previous slide the entries in those matrices are our parameters. n(w,d) are the observed counts in our data

Topic discovery in images J. Sivic, B. Russell, A. Efros, A. Zisserman, B. Freeman, Discovering Objects and their Location in Images, ICCV 2005

From single features to “doublets” Run pLSA on a regular visual vocabulary Identify a small number of top visual words for each topic Form a “doublet” vocabulary from these top visual words Run pLSA again on the augmented vocabulary J. Sivic, B. Russell, A. Efros, A. Zisserman, B. Freeman, Discovering Objects and their Location in Images, ICCV 2005

From single features to “doublets” Ground truth All features “Face” features initially found by pLSA One doublet Another doublet “Face” doublets J. Sivic, B. Russell, A. Efros, A. Zisserman, B. Freeman, Discovering Objects and their Location in Images, ICCV 2005

Summary: Generative models Naïve Bayes Unigram models in document analysis Assumes conditional independence of words given class Parameter estimation: frequency counting Probabilistic Latent Semantic Analysis Unsupervised technique Each document is a mixture of topics (image is a mixture of classes) Can be thought of as matrix decomposition Parameter estimation: Expectation-Maximization