recognition introduction 計(jì)算機(jī)視覺 berkeley課件_第1頁
recognition introduction 計(jì)算機(jī)視覺 berkeley課件_第2頁
recognition introduction 計(jì)算機(jī)視覺 berkeley課件_第3頁
recognition introduction 計(jì)算機(jī)視覺 berkeley課件_第4頁
recognition introduction 計(jì)算機(jī)視覺 berkeley課件_第5頁
已閱讀5頁,還剩143頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

C280,ComputerVision

Prof.TrevorDarrell

trevor@

Lecture12:IntroductiontoRecognition;

Boosting,HOG,andBag-of-WordModels

Lastfewlectures...

?Feature-basedAlignment

-Stitchingimagestogether

-Homographies,RANSAC,Warping,Blending

-Globalalignmentofplanarmodels

?DenseMotionModels

-Localmotion/featuredisplacement

-Parametricopticflow

?Stereo/'Multi-view':Estimatingdepthwithknowninter-

camerapose

?/Structure-from-motion,:Estimationofposeand3Dstructure

-Factorizationapproaches

—Globalalignmentwith3Dpointmodels

RecognitionChallenges/

Overview

ObjectCategorization

75

o一

-

n

l

u

o

C

6

O

O

O?HowtorecognizeANYcow

H

l

o

CDJ

q

o

-

B

n

s

4

K.Grauman,B.Leibe

Challenges:robustness

w

M

o

lIlluminationObjectposeClutter

n

l

u

o

C

6

O

O

O

H

l

o

g

q

o

-OcclusionsIntra-class

BViewpoint

n

sappearance

>

Challenges:robustness

w

oK

nl

.J

u

o

6C

0

0

O?DetectioninCrowdedScenes

)H>Learnobjectvariability

1

0-Changesinappearance,scale,andarticulation

.9q>?Compensateforclutter,overlap,andocclusion

0

-

B

n

s

>K.Grauman,B.Leibe

Challenges:contextandhumanexperience

w

K

o

l

n

l

u

o

C

6

O

O

O

H

l

o

g

q

o

-

B

n

s

>

K.Grauman,B.Leibe

Challenges:contextandhumanexperience

w

K

o

nl

l

U

0

4

C

6

0

0

0H)Contextcues

ol

g

q

o

-

B

n

s

>

Imagecredit:D.Hoeim

Challenges:learningwithminimalsupervision

w

K

o

l

n

l

u

o

C

6

O

O

O

H

l

o

g

q

o

-

B

n

s

>

K.Grauman,B.Leibe

Thisisa

pottopod

SlidefromPietroPerona,2004ObjectRecognitionworkshop

RBuegel,I562

SlidefromPietroPerona,2004ObjectRecognitionworkshop

Roughevolutionoffocusinrecognitionresearch

量“L

76qz46

Kw

lo工久2223

Jn

.nputimage。

u0A3g7

o

6C

0

0

O

)H

1

0

.9q>

01980s1990stoearly2000s2000-2010...

-

B

n

s

>

Inputs/outputs/assumptions

?Whatisthegoal?

-Sayyes/noastowhetheranobjectpresentinimage

And/or:

-Determineposeofanobject,e.g.forrobottograsp

-Categorizeallobjects

-Forcedchoicefrompoolofcategories

-Boundingboxonobject

-Fullsegmentation

-Buildamodelofanobjectcategory

Today

?Scanningwindowparadigm

?GIST

?HOG

?BoostedFaceDetection

?Local-featureAlignment;fromRobertsto

Lowe...

?BOWIndexing

Nextthreelectures

?Thursday:learningobjectcategoriesfromtheweb

-LSAandLDAmodels

-Harvestingtrainingdatafromtheweb

-Exploitingimageandtext

?Tues.Oct.20th:Generativemodels

-Condensation

-ISM

-Transformed-HDPs

-MoreContext...

?Thurs.Oct.22nd:AdvancedBOWkernels

-Pyramidandspatial-pyramidmatch

-Multi-kernellearning

-Latent-partSVMmodels

Scanningwindows...

Detectionviaclassification:Mainidea

Basiccomponent:abinaryclassifier

Kw

loCar/non-car

n—?

.J

uClassifier

o

6C

0

0

ONoYemtcaicar.

)H

1

0

.9q>

0

-

B

n

s

>K.Grauman,B.Leibe

Detectionviaclassification:Mainidea

Ifobjectmaybeinaclutteredscene,slideawindow

aroundlookingforit.

Kw

loCar/non-car

n—?

.J

uClassifier

o

6C

0

0

O

)H

1

0

(Essentially,ourskindetectorwasdoingthis,witha

.9q>

0windowthatwasonepixelbig.)

-

B

n

s

>K.Grauman,B.Leibe

Detectionviaclassification:Mainidea

Fleshingoutthis

pipelineabitmore,

weneedto:

1.Obtaintrainingdata

2.Definefeatures

3.Defineclassifier

w

oKTrainingexamples

nl

.J

uuu

o

6C

0

0Car/non-car

OClassifier

)H

1

0Feature

.9q>^extraction.

0

-

B

n

s

>K.Grauman,B.Leibe

Detectionviaclassification:Mainidea

?Considerallsubwindowsinanimage

>Sampleatmultiplescalesandpositions(andorientations)

?Makeadecisionperwindow:

?“DoesthiscontainobjectcategoryXornot?”

75

o一

-

n

l

u

o

C

6

O

O

O

H

l

o

CDJ

q

o

-

B

n

s

20

K.Grauman,B.Leibe

Featureextraction:

globalappearance

w

oK

nl

.J

u

o

6CSimpleholisticdescriptionsofimagecontent

0

0?grayscale/colorhistogram

O

)H?vectorofpixelintensities

1

0

.9q>

0

-

B

n

s

>K.Grauman,B.Leibe

Eigenfaces:globalappearancedescription

Anearlyappearance-basedapproachtofacerecognition

Generatelow-

dimensional

I*】?國-->representation

ofappearance

75withalinear

一Eigenvectorscomputed

oTrainingimages

-fromcovariancematrixsubspace.

n

l

u

o

CProjectnew

6

Oimagesto”face

O

O

Hspace”.

l

oRecognitionvia

CDJ

q

onearestneighbors

-

B

ninfacespace

s

Turk&Pentland,1991

K.Grauman,B.Leibe

Featureextraction:globalappearance

?Pixel-basedrepresentationssensitivetosmallshifts

iJSBi

w

oK

nl

.J?Colororgrayscale-basedappearancedescriptioncanbe

u

osensitivetoilluminationandintra-classappearance

6Cvariation

0

0

Cartoonexample:

O

analbinokoala

)H

1

0

.9q>

0

-

B

n

s

>K.Grauman,B.Leibe

Gradient-basedrepresentations

?Consideredges,contours,and(oriented)intensity

gradients

.S,

I

O

5

1

6C

0

0

O

)H

L

O

G

Q

O

-

BN

S

>

K.Grauman,B.Leibe

Gradient-basedrepresentations

?Consideredges,contours,and(oriented)intensity

gradients

w

oK

nl

.J

u

o

6C

0

0?Summarizelocaldistributionofgradientswithhistogram

O

)HaLocallyorderless:offersinvariancetosmallshiftsandrotations

1

0>Contrast-normalization:trytocorrectforvariableillumination

.9q>

0

-

B

n

s

>K.Grauman,B.Leibe

I-

s

0

RepresentingImageStructurewith

“GIST”

Steerable

Vectorof

Globalfeatures

Oliva&Torralba(2001,2002,2006)

SlideCredit:OliviaNiir

WhatdoImagesStatisticssay

aboutDepth?

SlideCredit:Torralba,Olivia,J.HuangNiir

SceneScale

□''Thepointofviewthatanygivenobserveradoptsonaspecific

sceneisconstrainedbythevolumeofthescene."

□Howdoestheamountofcluttervaryagainstscenescaleinman-

madeenvironments?Innaturalenvironments?

■■■■

■■■■SlideCredit:Torralba,Olivia,J.HuangNiir

CategorizationofNaturalScenes

ConfusionMatrix(in%usingLayouttemplate):

Classificationofprototypicalscenes(400/category)Localorganization:

CoastCountrysideForestMountaincorrectfor92%images

(4similarimageson7K-NN)

Coast88.68.9

Countryside9.885.2

0.43.6

Mountain0.44.6

SlideCredit:OliviaNiir

o

oH

Gradient-basedrepresentations:

Histogramsoforientedgradients(HoG)

75

o一

-

n

l

u

o

C

6

OMapeachgridcellintheinput

O

O

Hwindowtoahistogramcounting

l

othegradientsperorientation.

CDJ

q

o

-Codeavailable:

B

n

shttp://pascal.inrialpes.fr/soft/olt/

DalalDTriggs,CVPR2005

K.Grauman,B.Leibe

Slidecredit:Dalal,Triggs,P.Barnum

Person/

Input

non-person

imageclassification

Slidecredit:Dalal,Triggs,RBarnum

NormalizeWeightedvoteContrastnormalizePerson/

Input_ComputeColledHOGsLinear

aiima&—?—?intospatial&-Aoveroverlapping——?overdetection—>non-person

imagegradientsS\M

colourorientationcellsspntialblockswindowclassification

?Testedwith

-RGB

-LAB

一Grayscale

?GammaNormalizationandCompression

一Squareroot

-Log

Slidecredit:Dalal,Triggs,RBarnum

Person/

Input

non-person

imageclassification

-101□□

centered□□

diagonal

-11

uncentered

□□H0□

1-808-1S□

cubic-Sobel

corrected

Slidecredit:Dalal,Triggs,RBarnum

NormalizeWeightedvoteContrastnormalizeColledHOGsPerson/

InputComputeLinear

gamma&->intospatial&Aoveroverlapping->overdetection>―>non-person

imagegradientsSVM

colourorientationcellsspntialblockswindowclassification

Histogramofgradient

orientations

-Orientation-Position

90

13545

1800

225315

270

-Weightedbymagnitude

Slidecredit:Dalal,Triggs,RBarnum

NormalizeWeightedvoteContrastnormalizeColledHOGsPerson/

Input_ComputeLinear

gamma&intospatial&Aoveroverlappingoverdetection―?non-person

imagegradientsSVM

colourorientationcellsspntialblockswindowclassification

R-HOGC-HOG

ft

0

RadialBins.AnsularBins

Slidecredit:Dalal,Triggs,RBarnum

Person/

Input

non-person

image

classification

R-HOGC-HOG

CellCenterBin

-H

a

o

O

RadialBins.AngularBins

Ll-norm:v——>v/(||v||i+£)Ll-sqrt:v-?\/v/(||v||i+6)

L2-norm:v—,+FL2-hys:L2-norm,plusclippingat.2andrcnomalizing

Slidecredit:Dalal,Triggs,RBarnum

Person/

Input

non-person

imageclassification

Slidecredit:Dalal,Triggs,RBarnum

Person/

Input

non-person

imageclassification

Slidecredit:Dalal,Triggs,RBarnum

Person/

Input

non-person

imageclassification

Slidecredit:Dalal,Triggs,RBarnum

Slidecredit:Dalal,Triggs,RBarnum

BoostedFaceDetection

withGradientFeatures

Gradient-basedrepresentations:

Rectangularfeatures

w

K

o

l

n

l

u

o

C

6

O

O

OComputedifferencesbetweensumsofpixelsinrectangles

H

l

o

gCapturescontrastinadjacentspatialregions,efficientto

q

ocompute

-

B

n

sEachfeatureparameterizedbyscale,position,type.

>

Viola&Jones,CVPR2001

K.Grauman,B.Leibe

ioosting

?Buildastrongclassifierbycombiningnumberof"weak

classifiers”,whichneedonlybebetterthanchance

?Sequentiallearningprocess:ateachiteration,adda

weakclassifier

?Flexibletochoiceofweaklearner

75

o一

->includingfastsimpleclassifiersthatalonemaybeinaccurate

n

l

u

o

口1

C?WeIIlookatFreund&Schapire'sAdaBoostalgorithm

6

O

OaEasytoimplement

O

H

l>BaselearningalgorithmforViola-Jonesfacedetector

o

CDJ

q

o

-

B

n

s

46

K.Grauman,B.Leibe

AdaBoost:Intuition

Considera2-dfeature

Weakspacewithpositiveand

Classifier1negativeexamples.

Eachweakclassifiersplits

w

K

othetrainingexampleswith

l

n

latleast50%accuracy.

U

0

4

CExamplesmisclassifiedby

6

0

0apreviousweaklearner

0)Haregivenmoreemphasis

1

0atfuturerounds.

,9q>

0

-

B

n

s

一FigureadaptedfromFreundandSchapire

47

K.Grauman,B.Leibe

AdaBoost:Intuition

Weights

Increased

Weak

Classifier1

?oWeak

ooClassifier2

-

,-s

0

1

n

l

u

o

C口

6

O

O

O

H

l

o

.sq>

o

-

B

n

s

一48

K.Grauman,B.Leibe

AdaBoost:Intuition

75

o一

-

n

l

uWeak

oclassifier3

C

6

O

O

OFinalclassifieris

H

lcombinationofthe

oweakclassifiers

CDJ

q

o

-

B

n

s

49

K.Grauman,B.Leibe

?Givenexampleimages(J;I,,(^n,?/n)where

yi=0,1fornegativeandpositiveexamplesrespec-

tively.AdaBoostAlgorithm

?Initializeweights=for仍=0,1respec-Startwith

tively,wheremandIarethenumberofnegativesanduniformweights

positivesrespectively.ontraining

?Forf=1,...,T:examples

1.Normalizetheweights.

ForTrounds

sothatwtisaprobabilitydistribution.

Evaluate

2.Foreachfeature,j,trainaclassifierhjwhich

isrestrictedtousingasinglefeature.Theweightederror

errorisevaluatedwithrespecttowt,e;=foreachfeature,

皿電(g)-yi\.pickbest.

3.Choosetheclassifier.In.withthelowesterroret.

4.Updatetheweights:

Re-weighttheexamples:

-+i,t=皿,iB;CiIncorrectlyclassified->moreweight

whereei=0ifexampleXiisclassifiedcor-Correctlyclassified->lessweight

rectly,a=1otherwise,and仇=y1七■.

?Thefinalstrongclassifieris:

Finalclassifieriscombinationofthe

刀,1a力加(/)NI£著at

'-10otherwiseweakones,weightedaccordingto

errortheyhad.

wherec\f=log+Freund&Schapire1995

Example:Facedetection

?Frontalfacesareagoodexampleofaclasswhere

globalappearancemodels+aslidingwindow

detectionapproachfitwell:

>Regular2Dstructure

>Centeroffacealmostshapedlikea“patch"/window

75

o一

-

n

l

u

o

C

6

O

O

O

H

l

o

CDJ

q

o?Nowwe'lltakeAdaBoostandseehowtheViola-

-

B

nJonesfacedetectorworks

s

51

K.Grauman,B.Leibe

Featureextraction

“Rectangular”filters

Featureoutputisdifference

betweenadjacentregions

75

o一

-

n

lEfficientlycomputable

u

owithintegralimage:any

Csumcanbecomputed

6

O

Oinconstanttime

O

H

l

oAvoidscalingimages9

CDJscalefeaturesdirectly

q

oforsamecost=/+(A+3+C+Z))—(A+C+/+B)

-

B

n

s

Viola&Jones,CVPR200152

K.Grauman,B.Leibe

Largelibraryoffilters

75

o一

-

n

l

u

o

C

6

O

O

O

H

l

oUseAdaBoostbothtoselecttheinformative

CDJ

qfeaturesandtoformtheclassifier

o

-

B

n

s

Viola&Jones,CVPR2001

AdaBoostforfeature+classifierselection

?Wanttoselectthesinglerectanglefeatureandthreshold

thatbestseparatespositive(faces)andnegative(non-

faces)trainingexamples,intermsofweightederror.

ftResultingweakclassifier:

a一e■o~~e一?eooo〉

T.o

l

n+1iff(x)>9

ltt

ht(x)=

Ui

0-1otherwise

4

C

6■6^0。一OOO———

0

0

:——f[(x)一Fornextround,reweightthe

0)Hexamplesaccordingtoerrors,

。1

①Outputsofapossiblechooseanotherfilter/threshold

q一rectanglefeatureon

ocombo.

-facesandnon-faces.

B

n

s

>Viola&Jones,CVPR2001

?Givenexampleimages(J;I,,(^n,?/n)where

yi=0,1fornegativeandpositiveexamplesrespec-

tively.AdaBoostAlgorithm

?Initializeweights=for仍=0,1respec-Startwith

tively,wheremandIarethenumberofnegativesanduniformweights

positivesrespectively.ontraining

?Forf=1,...,T:examples

1.Normalizetheweights.

ForTrounds

sothatwtisaprobabilitydistribution.

Evaluate

2.Foreachfeature,trainaclassifierh)which

isrestrictedtousingasinglefeature.Theweightederror

errorisevaluatedwithrespecttowt,與=foreachfeature,

皿陶(g)一詞.pickbest.

3.Choosetheclassifier,lit,withthelowesterrore.t.

4.Updatetheweights:

Re-weighttheexamples:

Wt+l,i=皿,俐"Incorrectlyclassified->moreweight

wheree/=0ifexamplexiisclassifiedcor-Correctlyclassified->lessweight

?Thefinalstrongclassifieris:

Finalclassifieriscombinationofthe

i£屋1。也(1)>}E?=i

h[x)=

0otherwiseweakones,weightedaccordingto

errortheyhad.

whereat=logJ-Freund&Schapire1995

AdaBoostforEfficientFeature

Selection

?ImageFeatures=WeakClassifiers

?Foreachroundofboosting:

-Evaluateeachrectanglefilteroneachexample

-Sortexamplesbyfiltervalues

-Selectbestthresholdforeachfilter(minerror)

?Soiledlistcanbequicklyscaimedfortheoptimalthreshold

-Selectbestfilter/thresholdcombination

-Weightonthisfeatureisasimplefunctionofen*orrate

-Reweightexamples

ViolaandJones.Robustobjectdetectionusingaboostedcascadeofsimplefeatures.CVPR2001

?Evenifthefiltersarefasttocompute,each

newimagehasalotofpossiblewindowsto

search.

?Howtomakethedetectionmoreefficient?

Cascadingclassifiersfordetection

Forefficiency,applyless

accuratebutfasterclassifiers

firsttoimmediatelydiscard

windowsthatclearlyappearto

benegative;e.g.,

w

oKaFilterforpromisingregionswithan

nl

.Jinitialinexpensiveclassifier

u

o

口aBuildachainofclassifiers,choosing

6Ccheaponeswithlowfalsenegative

0

0ratesearlyinthechain

O

)H

1

0

.9q>

0Fleuret&Geman,IJCV2001

-RowleyetaL,PAMI1998

B

n

sViola&Jones,CVPR200158

>K.Grauman,B.LeibeFigurefromViola&JonesCVPR2001

Viola-JonesFaceDetector:Summary

翻?■■可■■)■/■

?電?感所國,通??F

■*妙硒I二中

再⑥三■-

?5電???費(fèi)型IT

臥?電?即?出■?卜

wJ/KJtL,?<AJ

w

oK

nl

.J

u

o

C

6Non-faces

0

0

O?Trainwith5Kpositives,350Mnegatives

)H

1?Real-timedetectorusing38layercascade

0

?6061featuresinfinallayer

.9q>

0?[ImplementationavailableinOpenCV:

-

B/technology/computing/opencv/]

n

s59

>K.Grauman,B.Leibe

Viola-JonesFaceDetector:Results

Firsttwofeatures

selected

r

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論