63
CS 1699: Intro to Computer Vision Detection III: Analyzing and Debugging Detection Methods Prof. Adriana Kovashka University of Pittsburgh November 17, 2015

CS 1699: Intro to Computer Vision Introduction

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS 1699: Intro to Computer Vision Introduction

CS 1699: Intro to Computer Vision

Detection III: Analyzing and Debugging Detection Methods

Prof. Adriana KovashkaUniversity of Pittsburgh

November 17, 2015

Page 2: CS 1699: Intro to Computer Vision Introduction

Today

• Review: Deformable part models

• How can we speed up detection?

• In what ways does detection fail?

• How can we visualize features and models?

Page 3: CS 1699: Intro to Computer Vision Introduction

Parts-based Models

Define object by collection of parts modeled by

1. Appearance

2. Spatial configuration

Rob Fergus

Page 4: CS 1699: Intro to Computer Vision Introduction

How to model spatial relations?

• Star-shaped model

=X X

X Root

Part

Part

Part

Part

Part

Derek Hoiem

Page 5: CS 1699: Intro to Computer Vision Introduction

Implicit shape models: Training

1. Build vocabulary of patches around

extracted interest points using clustering

2. Map the patch around each interest point to

closest word

3. For each word, store all positions it was

found, relative to object center

Lana Lazebnik

Page 6: CS 1699: Intro to Computer Vision Introduction

Implicit shape models: Testing

1. Given new test image, extract patches, match to

vocabulary words

2. Cast votes for possible positions of object center

3. Search for maxima in voting space

Lana Lazebnik

Page 7: CS 1699: Intro to Computer Vision Introduction

Bin gradients from 8x8 pixel neighborhoods into 9

orientations

(Dalal & Triggs CVPR 05)

Histograms of oriented gradients (HOG)

Page 8: CS 1699: Intro to Computer Vision Introduction

Discriminative part-based models

P. Felzenszwalb, R. Girshick, D. McAllester, D. Ramanan, Object Detection

with Discriminatively Trained Part Based Models, PAMI 32(9), 2010

Root

filterPart

filtersDeformation

weights

Lana Lazebnik

Page 9: CS 1699: Intro to Computer Vision Introduction

Scoring an object hypothesis

• The score of a hypothesis is

the sum of appearance scores

minus the sum of deformation costs

),,,()(),...,( 22

0 1

0 ii

n

i

n

i

iiiiin dydxdydxscore

DpHFpp

Appearance weights

Subwindow

features

Deformation weights

Displacements

Adapted from Lana Lazebnik

Page 10: CS 1699: Intro to Computer Vision Introduction

What is an Object?

B. Alexe, T. Deselaers, and V. Ferrari

Computer Vision and Pattern Recognition (CVPR) 2010

Page 11: CS 1699: Intro to Computer Vision Introduction

Speeding up detection: Restrict set of windows we pass through SVM to those w/ high “objectness”

Alexe et al., CVPR 2010

Page 12: CS 1699: Intro to Computer Vision Introduction

Objectness cue #1: Where people look

Alexe et al., CVPR 2010

Page 13: CS 1699: Intro to Computer Vision Introduction

Objectness cue #2: color contrast at boundary

Alexe et al., CVPR 2010

Page 14: CS 1699: Intro to Computer Vision Introduction

Objectness cue #3: no segments “straddling” the object box

Alexe et al., CVPR 2010

Page 15: CS 1699: Intro to Computer Vision Introduction

Boxes found to have high “objectness”

Alexe et al., CVPR 2010

Cyan = ground truth bounding boxes, yellow = correct and red = incorrect predictions for “objectness”

Only run the sheep / horse / chair etc. classifier on the yellow/red boxes.

Page 16: CS 1699: Intro to Computer Vision Introduction

Today

• Review: Deformable part models

• How can we speed up detection?

• In what ways does detection fail?

• How can we visualize features and detections?

Page 17: CS 1699: Intro to Computer Vision Introduction

Diagnosing Error in Object Detectors

D. Hoiem, Y. Chodpathumwan and Q. Dai

European Conference on Computer Vision (ECCV) 2012

Page 18: CS 1699: Intro to Computer Vision Introduction

Object detection is a collection of problems

DistanceShapeOcclusion Viewpoint

Intra-class Variation for “Airplane”

Hoiem et al., ECCV 2012

Page 19: CS 1699: Intro to Computer Vision Introduction

Object detection is a collection of problems

Localization

ErrorBackgroundDissimilar

Categories

Similar

Categories

Confusing Distractors for “Airplane”

Hoiem et al., ECCV 2012

Page 20: CS 1699: Intro to Computer Vision Introduction

Top false positives: Airplane (DPM)

3

27 37

1

4

5

30

33

26

7

Other Objects

11%

Background

27%

Similar Objects

33%

Bird, Boat, Car

Localization

29%

AP = 0.36

Hoiem et al., ECCV 2012

Page 21: CS 1699: Intro to Computer Vision Introduction

Top false positives: Dog (DPM)

Similar Objects

50%

Person, Cat, Horse

1 6 1642 5

8 22

Background

23%

93

10

Localization

17%

Other Objects

10%

AP = 0.03

Hoiem et al., ECCV 2012

Page 22: CS 1699: Intro to Computer Vision Introduction

Analysis of object characteristics

Additional annotations for seven categories: occlusion level, parts visible, sides visible

Hoiem et al., ECCV 2012

Page 23: CS 1699: Intro to Computer Vision Introduction

Object characteristics: AeroplaneOcclusion: poor robustness to occlusion, but little impact on overall performance

Easier (None) Harder (Heavy)Hoiem et al., ECCV 2012

Page 24: CS 1699: Intro to Computer Vision Introduction

Size: strong preference for average to above average sized airplanes

Object characteristics: Aeroplane

Easier Harder

X-SmallSmallX-LargeMediumLarge

Hoiem et al., ECCV 2012

Page 25: CS 1699: Intro to Computer Vision Introduction

Aspect Ratio: 2-3x better at detecting wide (side) views than tall views

Object characteristics: Aeroplane

TallX-TallMediumWideX-Wide

Easier (Wide) Harder (Tall)Hoiem et al., ECCV 2012

Page 26: CS 1699: Intro to Computer Vision Introduction

Sides/Parts: best performance = direct side view with all parts visible

Object characteristics: Aeroplane

Easier (Side) Harder (Non-Side)Hoiem et al., ECCV 2012

Page 27: CS 1699: Intro to Computer Vision Introduction

Conclusions

• Most errors that detectors make are reasonable

– Localization error and confusion with similar objects

– Misdetection of occluded or small objects

• Detectors have different sensitivity to different factors

– E.g. less sensitive to truncation than to size differences

• Code and annotations are available online– http://web.engr.illinois.edu/~dhoiem/projects/detectionAnalysis/

Adapted from Hoiem et al., ECCV 2012

Page 28: CS 1699: Intro to Computer Vision Introduction

Today

• Review: Deformable part models

• How can we speed up detection?

• In what ways does detection fail?

• How can we visualize features and detections?

Page 29: CS 1699: Intro to Computer Vision Introduction

HOGgles: Visualizing ObjectDetection Features

C. Vondrick, A. Khosla, T. Malisiewicz, and A. Torralba

International Conference on Computer Vision (ICCV) 2013

Page 30: CS 1699: Intro to Computer Vision Introduction

Car

Why did the detector fail?

Vondrick et al., ICCV 2013

Page 31: CS 1699: Intro to Computer Vision Introduction

What information is lost?

Vondrick et al., ICCV 2013

Page 32: CS 1699: Intro to Computer Vision Introduction

What information is lost?

Vondrick et al., ICCV 2013

Page 33: CS 1699: Intro to Computer Vision Introduction

Recovering image from neighbors

Image HOG

Top detections

Vondrick et al., ICCV 2013

Page 34: CS 1699: Intro to Computer Vision Introduction

Recovering image from neighbors

Image HOG

Vondrick et al., ICCV 2013

Top detections

Page 35: CS 1699: Intro to Computer Vision Introduction

Recovering image from neighbors

Image HOG

Vondrick et al., ICCV 2013

Top detections

Page 36: CS 1699: Intro to Computer Vision Introduction

Recovering image from neighbors

Image HOG

Vondrick et al., ICCV 2013

Top detections

Page 37: CS 1699: Intro to Computer Vision Introduction

Better recovery using paired dictionary

Vondrick et al., ICCV 2013

Page 38: CS 1699: Intro to Computer Vision Introduction

2x more intuitive

A microscope to view HOG

Vondrick et al., ICCV 2013

Page 39: CS 1699: Intro to Computer Vision Introduction

vs

Vondrick et al., ICCV 2013

Human Vision HOG Vision

Page 40: CS 1699: Intro to Computer Vision Introduction

Vondrick et al., ICCV 2013

Page 41: CS 1699: Intro to Computer Vision Introduction

Vondrick et al., ICCV 2013

Page 42: CS 1699: Intro to Computer Vision Introduction

Vondrick et al., ICCV 2013

Page 43: CS 1699: Intro to Computer Vision Introduction

Vondrick et al., ICCV 2013

Page 44: CS 1699: Intro to Computer Vision Introduction

Vondrick et al., ICCV 2013

Page 45: CS 1699: Intro to Computer Vision Introduction

Vondrick et al., ICCV 2013

Page 46: CS 1699: Intro to Computer Vision Introduction

The HOGgles Challenge

Humans detect &

DPMs detect

Vondrick et al., ICCV 2013

Page 47: CS 1699: Intro to Computer Vision Introduction

The HOGgles Challenge

Humans miss &

DPM miss

Vondrick et al., ICCV 2013

Page 48: CS 1699: Intro to Computer Vision Introduction

Chair Detections

Vondrick et al., ICCV 2013

Page 49: CS 1699: Intro to Computer Vision Introduction

Chair Detections

Vondrick et al., ICCV 2013

Page 50: CS 1699: Intro to Computer Vision Introduction

Car Detections

Vondrick et al., ICCV 2013

Page 51: CS 1699: Intro to Computer Vision Introduction

Car Detections

Vondrick et al., ICCV 2013

Page 52: CS 1699: Intro to Computer Vision Introduction

HOG+Human

Detector

RGB+Human

HOG+Human

HOG+DPM

0 0.2 0.8 10

0.1

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.4 0.6

Recall

Pre

cisio

n

Chair

Human performance with HOG is poor despite perfect learning

Loss due to RGB -> HOG

Vondrick et al., ICCV 2013

Page 53: CS 1699: Intro to Computer Vision Introduction

Car

Why did the detector fail?

Vondrick et al., ICCV 2013

Page 54: CS 1699: Intro to Computer Vision Introduction

Car

Why did the detector fail?

Vondrick et al., ICCV 2013

Page 55: CS 1699: Intro to Computer Vision Introduction

Car

Why did the detector fail?

Vondrick et al., ICCV 2013

Page 56: CS 1699: Intro to Computer Vision Introduction

Visualizing Learned Models

Car Person Bottle Bicycle

Motorbike Chair TV Horse

Vondrick et al., ICCV 2013

Page 57: CS 1699: Intro to Computer Vision Introduction

What is this?

http://web.mit.edu/vondrick/ihog/

Page 58: CS 1699: Intro to Computer Vision Introduction

What is this?

http://web.mit.edu/vondrick/ihog/

Page 59: CS 1699: Intro to Computer Vision Introduction

What is this?

http://web.mit.edu/vondrick/ihog/

Page 60: CS 1699: Intro to Computer Vision Introduction

What is this?

http://web.mit.edu/vondrick/ihog/

Page 61: CS 1699: Intro to Computer Vision Introduction

What is this?

http://web.mit.edu/vondrick/ihog/

Page 62: CS 1699: Intro to Computer Vision Introduction

What is this?

http://web.mit.edu/vondrick/ihog/

Page 63: CS 1699: Intro to Computer Vision Introduction

Summary

• We can speed up object detection by using the notion of “objectness” to prune windows unlikely to contain any object

• Some failure modes are more important than others and fixing them could increase the overall detection performance

• Even humans cannot produce correct classifications with imperfect features