instructor: noah snavely - cornell university · instructor •noah snavely...

76
CS5670: Intro to Computer Vision Instructor: Noah Snavely

Upload: others

Post on 21-May-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

CS5670: Intro to Computer VisionInstructor: Noah Snavely

Page 2: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Instructor

• Noah Snavely ([email protected])

• Research interests:

– Computer vision and graphics

– 3D reconstruction and visualization of Internet photo collections

– Deep learning for computer graphics

– Virtual reality video

Page 3: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Today

1. What is computer vision?

2. Course overview

3. Image filtering

Page 4: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Today

• Readings

– Szeliski, Chapter 1 (Introduction)

Page 5: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Every image tells a story

• Goal of computer vision: perceive the “story” behind the picture

• Compute properties of the world

– 3D shape

– Names of people or objects

– What happened?

Page 6: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The goal of computer vision

Page 7: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Can the computer match human perception?

• Yes and no (mainly no)– computers can be better at

“easy” things– humans are much better at

“hard” things

• But huge progress has been made– Accelerating in the last 4

years due to deep learning– What is considered “hard”

keeps changing

Page 8: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Human perception has its shortcomings

Sinha and Poggio, Nature, 1996

Page 9: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

But humans can tell a lot about a scene from a little information…

Source: “80 million tiny images” by Torralba, et al.

Page 10: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 11: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The goal of computer vision

Page 12: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The goal of computer vision• Compute the 3D shape of the world

Page 13: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The goal of computer vision

• Recognize objects and people

Terminator 2, 1991

Page 14: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 16: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

sky

building

flag

wallbanner

bus

cars

bus

face

street lamp

slide credit: Fei-Fei, Fergus & Torralba

Page 17: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The goal of computer vision• “Enhance” images

Page 18: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 19: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The goal of computer vision

• Forensics

Source: Nayar and Nishino, “Eyes for Relighting”

Page 20: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Source: Nayar and Nishino, “Eyes for Relighting”

Page 21: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Source: Nayar and Nishino, “Eyes for Relighting”

Page 22: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 23: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The goal of computer vision• Improve photos (“Computational Photography”)

Inpainting / image completion (image credit: Hays and Efros)

Super-resolution (source: 2d3)

Low-light photography (credit: Hasinoff et al., SIGGRAPH ASIA 2016)

Page 24: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Why study computer vision?

• Billions of images/videos captured per day

• Huge number of useful applications

• The next slides show the current state of the art

Page 25: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Optical character recognition (OCR)

Digit recognition, AT&T labshttp://www.research.att.com/~yann/

• If you have a scanner, it probably came with OCR software

License plate readershttp://en.wikipedia.org/wiki/Automatic_number_plate_recognition

Source: S. SeitzAutomatic check processing

Sudoku grabberhttp://sudokugrab.blogspot.com/

Page 26: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Face detection

• Nearly all cameras detect faces in real time

– (Why?)

Page 27: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Face Recognition

Page 28: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Face recognition

Who is she? Source: S. Seitz

Page 29: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Vision-based biometrics

“How the Afghan Girl was Identified by Her Iris Patterns” Read the story

Source: S. Seitz

Page 30: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Leaf Recognition

Page 31: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Bird Identification

Merlin Bird ID (based on Cornell Tech technology!)

Page 32: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Special effects: camera tracking

Boujou, 2d3

Page 33: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

The Matrix movies, ESC Entertainment, XYZRGB, NRC

Special effects: shape capture

Source: S. Seitz

Page 34: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Pirates of the Carribean, Industrial Light and Magic

Special effects: motion capture

Source: S. Seitz

Page 35: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

3D face tracking w/ consumer cameras

Snapchat Lenses

Face2Face system (Thies et al.)

Page 36: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Sports

Sportvision first down lineNice explanation on www.howstuffworks.com

Source: S. Seitz

Page 37: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Vision-based interaction (and games)

Nintendo Wii has camera-based IRtracking built in. See Lee’s work atCMU on clever tricks on using it tocreate a multi-touch display!

Assistive technologies

Page 38: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Kinect

Page 39: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Smart cars

• Mobileye

• Tesla Autopilot

• Safety features in many high-end cars

Page 40: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Self-driving cars

Google Waymo

Page 41: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Robotics

NASA’s Mars Curiosity Roverhttps://en.wikipedia.org/wiki/Curiosity_(rover)

Amazon Picking Challengehttp://www.robocup2016.org/en/events

/amazon-picking-challenge/

Amazon Prime Air

Page 42: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Medical imaging

Image guided surgeryGrimson et al., MIT

3D imagingMRI, CT

Source: S. Seitz

Page 43: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 44: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Virtual & Augmented Reality

6DoF head tracking Hand & body tracking

3D-360 video capture3D scene understanding

Page 45: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

My own work

• Automatic 3D reconstruction from Internet photo collections

“Statue of Liberty”

3D model

Flickr photos

“Half Dome, Yosemite” “Colosseum, Rome”

Page 46: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Photosynth

Page 47: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

City-scale reconstruction

Reconstruction of Dubrovnik, Croatia, from ~40,000 images

Page 48: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Current state of the art

• You just saw examples of current systems.

– Most of these are less than 5 years old

• This is a very active research area, and rapidly changing

– Many new apps in the next 5 years

• To learn more about vision applications and companies

– David Lowe maintains an excellent overview of vision companies

• http://www.cs.ubc.ca/spider/lowe/vision.html

Page 49: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Why is computer vision difficult?

Viewpoint variation

IlluminationScale

Page 50: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Why is computer vision difficult?

Intra-class variation

Background clutter

Motion (Source: S. Lazebnik)

Occlusion

Page 51: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Challenges: local ambiguity

slide credit: Fei-Fei, Fergus & Torralba

Page 52: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

But there are lots of cues we can exploit…

Source: S. Lazebnik

Page 53: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Bottom line• Perception is an inherently ambiguous problem

– Many different 3D scenes could have given rise to a particular 2D picture

– We often need to use prior knowledge about the structure of the world

Image source: F. Durand

Page 54: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 55: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 56: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 57: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

CS5670: Introduction to Computer VIsion

Page 58: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Teaching Assistant

• Zhengqi Li ([email protected])

• Office hours:

When: TuTh 3:30 – 5pm

Where: Bear Hug

(starting next week)

Page 59: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Important notes

• Textbook:

Rick Szeliski, Computer Vision: Algorithms and Applications

online at: http://szeliski.org/Book/

• Course webpage: http://www.cs.cornell.edu/courses/cs5670/2017sp/

• Announcements/grades via Piazza/CMShttps://piazza.com/class#fall2013/cs46705670

https://cms.csuglab.cornell.edu/

Page 60: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Course requirements

• Prerequisites—these are essential!

– Data structures

– A good working knowledge of Python programming

– Linear algebra

– Vector calculus

• Course does not assume prior imaging experience

– computer vision, image processing, graphics, etc.

Page 61: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Course overview (tentative)1. Low-level vision

– image processing, edge detection, feature detection, cameras, image formation

2. Geometry and algorithms– projective geometry, stereo,

structure from motion, Markov random fields

3. Recognition– face detection / recognition,

category recognition, segmentation

4. Light, color, and reflectance

Page 62: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

1. Low-level vision

• Basic image processing and image formation

Filtering, edge detection

* =

Feature extraction Image formation

Page 63: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Project: Hybrid images from image pyramids

G 1/4

G 1/8

Gaussian 1/2

Page 64: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 65: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and
Page 66: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Project: Feature detection and matching

Page 67: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

2. Geometry

Projective geometry

Stereo

Multi-view stereo Structure from motion

Page 68: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Project: Creating panoramas

Page 69: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Project: Photometric Stereo

Page 70: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

3. Recognition

Sources: D. Lowe, L. Fei-Fei

Face detection and recognitionSingle instance recognition

Category recognition

Page 71: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Project: Deep Learning for Recognition

Page 72: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

4. Light, color, and reflectance

Light & Color Reflectance

Page 73: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Grading

• Occasional quizzes (at the beginning of class)

• One prelim, one final exam– (considering final project instead of exam)

• Rough grade breakdown:– Quizzes + class evaluation: ~5%

– Midterm: 15-20%

– Programming projects: 40-50%

– Final exam: 15-20%

Page 74: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Late policy

• Three free “slip days” will be available for the semester

• Late projects will be penalized by 5% for first late day, and 10% for each day it is late after, and no extra credit will be awarded.

Page 75: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Academic Integrity

• Assignments will be done solo or in pairs (we’ll let you know for each project)

• Please do not leave any code public on GitHub (or the like) at the end of the semester!

• Please see the Cornell Code of Academic Integrity (http://cuinfo.cornell.edu/aic.cfm)

Page 76: Instructor: Noah Snavely - Cornell University · Instructor •Noah Snavely (snavely@cs.cornell.edu) •Research interests: –Computer vision and graphics –3D reconstruction and

Questions?