Recognition Part I. CSE 576. What we have seen so far: Vision as Measurement Device. Real-time stereo on Mars. Physics-based Vision. Virtualized Reality. Structure from Motion. Slide Credit: Alyosha Efros. Visual Recognition. What does it mean to “see”? “What” is “where”, Marr 1982
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
One simple method: skin detection skin • Skin classifier • A pixel X = (R,G,B) is skin if it is in the skin region • But how to find this region? • Skin pixels have a distinctive range of colors • Corresponds to region(s) in RGB color space • for visualization, only R and G components are shown above
Skin classifier • Given X = (R,G,B): how to determine if it is skin or not? Skin detection • Learn the skin region from examples • Manually label pixels in one or more “training images” as skin or not skin • Plot the training data in RGB space • skin pixels shown in orange, non-skin pixels shown in blue • some skin pixels may be outside the region, non-skin pixels inside. Why?
Skin classification techniques Skin Skin • Skin classifier • Given X = (R,G,B): how to determine if it is skin or not? • Nearest neighbor • find labeled pixel closest to X • choose the label for that pixel • Data modeling • Model the distribution that generates the data (Generative) • Model the boundary (Discriminative)
Classification • Probabilistic • Supervised Learning • Discriminative vs. Generative • Ensemble methods • Linear models • Non-linear models
Probability continuous X discrete X • Basic probability • X is a random variable • P(X) is the probability that X achieves a certain value • or • Conditional probability: P(X | Y) • probability of X given that we already know Y
Thumbtack & Probabilities … D={xi|i=1…n}, P(D|θ) = ΠiP(xi |θ) • P(Heads) = , P(Tails) = 1- • Flips are i.i.d.: • Independent events • Identically distributed according to Binomial distribution • Sequence D of H Heads and T Tails
Maximum Likelihood Estimation • Data: Observed set D of H Heads and T Tails • Hypothesis:Binomial distribution • Learning: finding is an optimization problem • What’s the objective function? • MLE: Choose to maximize probability of D
But, how many flips do I need? 3 heads and 2 tails. = 3/5, I can prove it! What if I flipped 30 heads and 20 tails? Same answer, I can prove it! What’s better? Umm… The more the merrier???
What if I have prior beliefs? In the beginning After observations Observe flips e.g.: {tails, tails} • Wait, I know that the thumbtack is “close” to 50-50. What can you do for me now? • Rather than estimating a single , we obtain a distribution over possible values of
How to use Prior Data Likelihood Normalization Posterior Prior • Or equivalently: • Also, for uniform priors: reduces to MLE objective Use Bayes rule:
We like Gaussians because • Affine transformation (multiplying by scalar and adding a constant) are Gaussian • X ~ N(,2) • Y = aX + b Y ~ N(a+b,a22) • Sum of Gaussians is Gaussian • X ~ N(X,2X) • Y ~ N(Y,2Y) • Z = X+Y Z ~ N(X+Y, 2X+2Y) • Easy to differentiate
Learning a Gaussian • Collect a bunch of data • Hopefully, i.i.d. samples • e.g., exam scores • Learn parameters • Mean: μ • Variance: σ
MLE for Gaussian: • Log-likelihood of data: Prob. of i.i.d. samples D={x1,…,xN}:
Supervised Learning: find f Given: Training set {(xi,yi) | i= 1 … n} Find: A good approximation to f : X Y What is x? What is y?
Simple Example: Digit Recognition 0 1 2 1 Screw You, I want to use Pixels :D ?? • Input: images / pixel grids • Output: a digit 0-9 • Setup: • Get a large collection of example images, each labeled with a digit • Note: someone has to hand label all this data! • Want to learn to predict labels of new, future digit images • Features: ?
Lets take a probabilistic approach!!! • Can we directly estimate the data distribution P(X,Y)? • How do we represent these? How many parameters? • Prior, P(Y): • Suppose Y is composed of kclasses • Likelihood, P(X|Y): • Suppose X is composed of n binary features
Conditional Independence • X is conditionally independent of Y given Z, if the probability distribution for X is independent of the value of Y, given the value of Z • e.g., • Equivalent to:
Naïve Bayes • Naïve Bayes assumption: • Features are independent given class: • More generally:
The Naïve Bayes Classifier Y X1 X2 Xn • Given: • Prior P(Y) • n conditionally independent features X given the class Y • For each Xi, we have likelihood P(Xi|Y) • Decision rule:
Connexion au compte
Connectez-vous pour publier votre contenu sur SlideServe.