25
Development in Object Detection Junyuan Lin May 4th

Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Development in Object Detection

Junyuan Lin May 4th

Page 2: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Line of Research

[1] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection, CVPR 2005.

[2] P. Felzenszwalb, D. McAllester, and D. Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008.

[3] C. Desai, D. Ramanan, C. Fowlkes. Discriminative Models for Multi-Class Object Layout, ICCV 2009.

HOG Feature template

Deformable Part Model

Multi-class Object Relationship

Page 3: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

HOG Feature template

Deformable Part Model

Multi-class Object Relationship

Linear SVM

Latent SVM

Structural SVM

Y structured output

Max-margin Formulation

Page 4: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

•Concatenate HOG Features in a search window into feature vector•Formulate the object detection as a binary linear classifier problem

•Sliding window scanning over the HOG feature pyramid •Output location with highest score f(x)•Possible post process (Non-maxima suppression)

Dalal & Triggs Detector

Page 5: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Linear SVM classifier

Page 6: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Learned weighted Filter

Training sample Positive weights Negative weights

*

Page 7: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Deformable Part Model

Multiscale model captures features at two-resolution

relative to p0

Slide by P. Felzenszwalb

Page 8: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Score of a hypothesis

Latent variable

relative to anchor position

Slide by P. Felzenszwalb

Page 9: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Latent SVM Training

Hinge loss

Learn

Not convex in general !

Semi-convexity:

is concave for positive examples

is convex for negative examples

For positive examples make convex by fixing the latent variable for each positive training example.

Page 10: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Latent SVM Training cont’d

Coordinate descent optimization approach:Initialize and iterate:

•Fix pick best for each positive example.

•Fix optimize over by quadratic programming or gradient descent

Model training procedure:

-Root Filter : train an initial root filter F0 using linear SVM without latent variable.-Part Filter : Initialize six parts from root filter F0 with the same shape,

place at anchor positions with most positive energy in F0 . The size of each part filter is determined to take 80% of the area of F0.

•Initialization:

•Train the latent SVM model

Page 11: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Example Results

Slide by P. Felzenszwalb

Page 12: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Quantitative Result

Page 13: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Multi-class Object LayoutPascal Dataset: Multiple objects of multi-class in a single image. Problems with traditional binary classification + sliding window approach:• Intra-class: Require ad-hoc non-maxima suppression as post processing.• Inter-class: multiple class models are searched independently over images.

Heuristically forcing mutual exclusion.

Need a principal way to model spatial statistics between objects

Page 14: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

FormulationFormulate as a structured prediction problem.

X: a collection of overlapping windows at various scales covering the entire imageY: the entire label vector for the set of all windows in an image.

spatial relationship between prediction

Page 15: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Spatial context descriptor

Output score of local detectors

The parameter learning and inference can be formulated as a structural SVM framework.

Page 16: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Structural SVM

Joint feature map

•Exponential Parameters•Exponential Constraints

represent Y using features extract from X,Y

Learn weights so that is max for correct y

Multi-class SVM

Page 17: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Structural SVM cont’dn-Slack Formulation: (margin rescaling)

1-Slack Formulation:

Slide by T. Joachims

Page 18: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Cutting-Plane Algorithm• Input: •• REPEAT

– FOR– Compute

– ENDFOR– IF

– optimize StructSVM over– ENDIF

• UNTIL has not changed during iteration

_

[Jo06] [JoFinYu08]

Add constraint to working set

Find most violated

constraint

Violated by more than ε ?

Page 19: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Theoretical BoundTheorem: Given any , the number of constraints added to working set

S is bounded by

where

so that is a feasible solution.

• Number of constraints is independent of training examples.• Linear time training algorithm.

+

εCR

CR

2

2216

4log

Page 20: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Summary of Structural SVM• Training: (cutting plane algorithm)

• Prediction:

• Application Specific Design of Model– Loss function:– Representation: joint feature map– Algorithm to compute:

Page 21: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Component Formulation

0-1 loss functionjoint feature map

Greedy forward search algorithm

Page 22: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Slide by D. Ramanan

Page 23: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Slide by D. Ramanan

Page 24: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Slide by D. Ramanan

Page 25: Development in Object Detectionweb.engr.oregonstate.edu/~sinisa/courses/OSU/CS559/... · Ramanan. A discriminatively trained, multiscale, deformable part model, CVPR 2008. [3] C

Slide by D. Ramanan