fundamentals of machine learning - princeton universityalaink/orf467f14/fundamentals of... ·...

71
Fundamentals of Machine Learning Chenyi Chen

Upload: others

Post on 07-Jul-2020

21 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Fundamentals of Machine Learning

Chenyi Chen

Page 2: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

What’s learning? • Example problem: face recognition

Prof. K Prof. F Prof. P Prof. V Chenyi

• Training data: a collection of images and labels (names)

Who is this guy?

• Evaluation criterion: correct labeling of new images

Page 3: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

What’s learning?

• Example problem: scene classification

road road sea mountain city

• a few labeled training images

What’s the label of this image?

• goal to label yet unseen image

Page 4: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Why learning?

• The world is very complicated • We don’t know the exact model/mechanism

between input and output • Find an approximate (usually simplified) model

between input and output through learning • Principles of learning are “universal” – society (e.g., scientific community) – animal (e.g., human) – machine

Page 5: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

A Taste of Machine Learning

Page 6: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 7: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 8: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 9: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

True label

Estimated label We want to minimize the difference between them!

Page 10: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 11: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 12: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 13: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 14: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 15: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 16: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 17: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Artificial Neural Network

Page 18: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 19: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 20: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 21: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Fundamentals of Computer Vision

Chenyi Chen

Page 22: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

What is Computer Vision?

• Input: images • Output: information about the world

Page 23: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

What is Computer Vision?

Example: • What is in this image? • Who is in this image? • Where are they? • What are they doing?

Page 24: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

What is Computer Vision?

Other questions: • What camera

settings were used? • Which pixels go

with which objects? • What is the scene

description in 3D?

Page 25: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 26: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Camera Projection

Page 27: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Camera Projection

Page 28: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Camera Projection

Page 29: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Point of observation

Figures © Stephen E. Palmer, 2002

Dimensionality Reduction Machine (3D to 2D)

3D world 2D image

What have we lost?

Slide by A. Efros

Page 30: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

A Tale of Two Coordinate Systems

“The World”

Camera

x

y

z

v

w

u

o

COP

Two important coordinate systems: 1. World coordinate system 2. Camera coordinate system

Page 31: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Geometric Transformations

Page 32: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

What is the geometric relationship between these two images?

?

Page 33: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Image alignment

Why don’t these image line up exactly?

Page 34: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

What is the geometric relationship between these two images?

Very important for creating mosaics!

Page 35: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

2D image transformations

These transformations are a nested set of groups • Closed under composition and inverse is a member

Page 36: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Projective Transformations / Homographies

Called a homography (or planar perspective map)

Page 37: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Image warping with homographies

image plane in front image plane below black area where no pixel maps to

Page 38: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Homographies

Page 39: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

A Quick Application: Lane Detection

Page 40: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Lane Detection

Page 41: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Lane Detection

Page 42: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Stereo Vision

Page 43: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 44: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 45: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

A Taste of Stereo Vision

Page 46: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 47: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 48: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Visual Odometry, Structure-from-Motion, 3D Street Scene Reconstruction

Page 49: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

KITTI Datasets

• Stereo images • Grayscale • Color • Rectified • 1382*512 • 10 FPS

Page 50: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Visual Odometry

• Visual odometry computes the trajectory of the vehicle only based on image sequences (LIBVISO2)

Page 51: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Depth Map • Disparity map is computed from grayscale stereo image pairs (LIBELAS) • Depth map can be derived from disparity map and camera model

Page 52: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Lane Detection

• Projecting lane markers on the road (Caltech Lane Detector)

Page 53: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

3D Street Scene Reconstruction

+

+

Page 54: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

3D Street Scene Reconstruction

• Dense reconstruction on run_70

Page 55: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Reconstruction with Non-Stereo Images/Structure-from-Motion

• Triangulation: tracking a same point in three (or more) frames, its spatial position can be determined

Figure courtesy of Jianxiong Xiao

Page 56: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Sparse Reconstruction with Non-Stereo Images

• Sparse reconstruction on run_70

Page 57: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Sparse Reconstruction with Non-Stereo Images

• run_1

Page 58: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Sparse Reconstruction with Non-Stereo Images

• run_9

Page 59: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Other Demos for Structure-from-Motion

• https://www.youtube.com/watch?v=i7ierVkXYa8

• https://www.youtube.com/watch?v=vpTEobpYoTg

Page 60: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Other Demos for Structure-from-Motion

Page 61: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Other Demos for Structure-from-Motion

Page 62: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

Deep Learning

Page 63: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 64: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 65: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 66: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 67: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 68: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 69: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 70: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •
Page 71: Fundamentals of Machine Learning - Princeton Universityalaink/Orf467F14/Fundamentals of... · 2014-09-16 · Fundamentals of Machine Learning Chenyi Chen . What’s learning? •

The end of all the fundamentals