MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory...

22
MC949 - Computer Vision Lecture #7 Prof. Dr. Anderson Rocha Microsoft Research Faculty Fellow Affiliate Member, Brazilian Academy of Sciences Reasoning for Complex Data (Recod) Lab. Institute of Computing, University of Campinas (Unicamp) Campinas, SP, Brazil [email protected] http://www.ic.unicamp.br/~rocha

Transcript of MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory...

Page 1: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

MC949 - Computer Vision Lecture #7

Prof. Dr. Anderson Rocha

Microsoft Research Faculty Fellow Affiliate Member, Brazilian Academy of Sciences

Reasoning for Complex Data (Recod) Lab. Institute of Computing, University of Campinas (Unicamp)

Campinas, SP, Brazil

[email protected] http://www.ic.unicamp.br/~rocha

Page 2: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Machine Learning: Introductory Lesson

This lecture slides were made based on slides of several researchers such as James Hayes, Derek Hoiem, Alexei Efros, Steve Seitz, David Forsyth and many others. Many thanks to all of these authors.

Reading: PRML, Chapters 1, 6 and 7

Page 3: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

The  blue  and  green  colors  are  actually  the  same  

Page 4: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

h3p://blogs.discovermagazine.com/badastronomy/2009/06/24/the-­‐blue-­‐and-­‐the-­‐green/  

Page 5: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Machine  Learning:  Overview  

Slides: Isabelle Guyon, Erik Sudderth, Mark Johnson, Derek Hoiem

Photo: CMU Machine Learning - Department protests G20

Page 6: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Machine  learning:  Overview  

•  Core  of  ML:  Making  predicHons  or  decisions  from  Data.  

•  This  overview  will  not  go  in  to  depth  about  the  staHsHcal  underpinnings  of  learning  methods.  We’re  looking  at  ML  as  a  tool.  Take  MC906  (AI)  or  MC886  (ML).  

Page 7: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Impact  of  Machine  Learning  

 •  Machine  Learning  is  arguably  the  greatest  export  from  compuHng  to  other  scienHfic  fields.  

 

Page 8: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Machine  Learning  ApplicaHons  

Slide: Isabelle Guyon

Page 9: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Image  CategorizaHon  

Training  Labels  

Training Images

Classifier  Training  

Training

Image  Features  

Trained  Classifier  

Slide: Derek Hoiem

Page 10: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Image  CategorizaHon  

Training  Labels  

Training Images

Classifier  Training  

Training

Image  Features  

Image  Features  

Testing

Test Image

Trained  Classifier  

Trained  Classifier   Outdoor

Prediction

Slide: Derek Hoiem

Page 11: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

       Claim:              The  decision  to  use  machine  learning  is  more  important  than  the  choice  of  a  par'cular  learning  method.  

   

If  you  hear  somebody  talking  of  a  specific  learning  mechanism,  be  wary  (e.g.  YouTube  comment  "Oooh,  we  could  plug  this  in  to  a  Neural  network  and  blah  blah  blah“)  

Page 12: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Example:  Boundary  DetecHon  

•  Is  this  a  boundary?  

Page 13: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Image  features  

Training  Labels  

Training Images

Classifier  Training  

Training

Image  Features  

Trained  Classifier  

Slide: Derek Hoiem

Page 14: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

General  Principles  of  RepresentaHon  •  Coverage  

–  Ensure  that  all  relevant  info  is  captured  

•  Concision  – Minimize  number  of  features  without  sacrificing  coverage  

•  Directness  –  Ideal  features  are  independently  useful  for  predicHon  

Image Intensity

Slide: Derek Hoiem

Page 15: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Image  representaHons  

•  Templates  –  Intensity,  gradients,  etc.  

•  Histograms  – Color,  texture,  SIFT  descriptors,  etc.  

Slide: Derek Hoiem

Page 16: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Classifiers  

Training  Labels  

Training Images

Classifier  Training  

Training

Image  Features  

Trained  Classifier  

Slide: Derek Hoiem

Page 17: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Learning  a  classifier    Given  some  set  of  features  with  corresponding  labels,  learn  a  funcHon  to  predict  the  labels  from  the  features  

x x

x x

x

x x

x

o o

o

o

o

x2

x1 Slide: Derek Hoiem

Page 18: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

One  way  to  think  about  it…  

•  Training  labels  dictate  that  two  examples  are  the  same  or  different,  in  some  sense  

•  Features  and  distance  measures  define  visual  similarity  

•  Classifiers  try  to  learn  weights  or  parameters  for  features  and  distance  measures  so  that  visual  similarity  predicts  label  similarity  

Slide: Derek Hoiem

Page 19: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Slide: Erik Sudderth

Page 20: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Dimensionality  ReducHon  

•  PCA,  ICA,  LLE,  Isomap  

•  PCA  is  the  most  important  technique  to  know.    It  takes  advantage  of  correlaHons  in  data  dimensions  to  produce  the  best  possible  lower  dimensional  representaHon,  according  to  reconstrucHon  error.    

•  PCA  should  be  used  for  dimensionality  reducHon,  not  for  discovering  pa3erns  or  making  predicHons.  Don't  try  to  assign  semanHc  meaning  to  the  bases.  

Page 21: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Many  classifiers  to  choose  from  •  SVM  •  Neural  networks  •  Naïve  Bayes  •  Bayesian  network  •  LogisHc  regression  •  Randomized  Forests  •  Boosted  Decision  Trees  •  K-­‐nearest  neighbor  •  RBMs  •  Etc.    

Which is the best one?

Slide: Derek Hoiem

Page 22: MC949 - Computer Visionrocha/teaching/2012s1/mc949/aulas/20… · Machine Learning: Introductory Lesson This lecture slides were made based on slides of several researchers such as

Next  Two  Lectures:  

•  Monday  we'll  talk  about  clustering  methods    (k-­‐means,  mean  shif)  and  their  common  usage  in  computer  vision  -­‐-­‐  building  "bag  of  words”  representaHons  inspired  by  the  NLP  community.  We'll  be  using  these  models  for  the  next  project.  

•  Wednesday  we'll  focus  specifically  on  classificaHon  methods,  e.g.  nearest  neighbor,  naïve-­‐Bayes,  decision  trees,  linear  SVM,  Kernel  methods.  We’ll  use  these  for  the  next  projects.