content‐based image retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-cbir.pdf ·...

66
Content‐based Image Retrieval Tutorial Image Retrieval Thomas Deselaers, Henning Müller

Upload: lythuy

Post on 17-Apr-2018

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Content‐basedImageRetrieval

TutorialImageRetrievalThomasDeselaers,HenningMüller

Page 2: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Outline

•  WhatisCBIR•  Approaches–  ConBnuousapproach– Discreteapproach

•  Featuresforcontent‐basedimageretrieval– Global–  Local

•  RelaBonshipsbetweendifferentapproaches•  Availableresources

Page 3: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Content‐basedImageRetrieval

•  TwomainquesBons–  Howaretheimagesrepresented?features–  Howaretheimagedescriptorscomparedsimilaritymeasures

•  Twomainviewsontheconceptofa`feature’:–  Featuresarenumericalvaluescomputedfromeachimage

•  ViewconnectedtoimageclassificaBon•  IdeasandmethodsfromclassificaBonandmachinelearning

–  FeaturesareimageproperBesthatarepresentorabsent•  ViewconnectedtotextualinformaBonretrieval•  Ideasandmethodsfromtextretrieval

Page 4: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ConBnuousApproach

•  Inspiredbynearest‐neighbourclassificaBon•  Eachimageisrepresentedbyafeaturevector

•  FeaturevectorsarecomparedusingdistancefuncBons

•  Imagessimilartoaqueryimageareassumedtoberelevant

•  Normally:query‐by‐visualexample(s)

Page 5: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

NearestNeighbour

•  VoronoiDiagramina2Dspace

•  AsetofpointsandthecorrespondingVoronoicells

•  AVoronoicellistheareawhereapoint’snearestneighbouristheseedofthecell

Source:Wikipedia

Page 6: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

NearestNeighbour

•  StandardnearestneighboursearchX[1]…X[N]:datasetQ:querymindist=∞bestN=‐1

Forn=1:N: d=dist(q,X[n]) ifd<mindist: mindist=d bestN=nreturnbestN

Page 7: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

R*‐Tree

•  DatastructureformulB‐dimensionaldata

•  Savedatainatreestructure•  Directorynodes(blue)•  Datanodes(red)•  Saveminimumbounding

rectanglesindirectorynodes

root

p1 p2

p11 p12 p21 p22p13 p23

p1p2p11

p12p13

p21p22

p23

Page 8: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

root

p1 p2

p11 p12 p21 p22p13 p23

p1p2p11

p12p13

p21p22

p23

Page 9: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

IndexStructures:Complexity

•  Linearsearch–  ComplexityO(n/C),verysmalloverhead

•  BadsituaBonforindexstructures–  Largerange–  Stronglyoverlappingregions–  Fewregionsarenotaccessed–  CommonwithhighdimensionaliBes–  ComplexityO(n/C),highoverhead

•  GoodsituaBon–  Smallrange–  Smalloverlaps–  Manyregionsdonothavetoberead–  ComplexityO(logC(n))

Page 10: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

NearestNeighbourSearchwithIndexInit:resultdist=∞FunctionSimpleNNQuery(Pointq,Address:page):

page.load()ifisDataPage(page): forxinpage.points: d=dist(q,x) ifd<resultdist: resultdist=d result=xelse: forpinpage.childPages: ifMINDIST(q,p)<resultdist: SimpleNNQuery(q,p);

•  Firstpathfindsarbitrarypoint•  Searchspaceonlyslowlyreduced•  Manypagesunnecessarilyread

Page 11: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ExampleQuery

root

p1 p2

p11 p12 p21 p22p13 p23

p1p2

p11

p12

p13

p21p22

p23

• Ifthesearchhadstartedwithp2nopagefromp1wouldhavebeenread• Clearlynon‐opBmal

Page 12: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

NearestNeighbourSearchwithIndexBest‐FirstSearch

•  Avoidrecursion•  InsteadusepriorityqueueAPL(acBvepagelist)

–  Listwhichcontainsdirectorypagestobeprocessedsortedbypriority

•  DefiniBon:apagepisacBve,ifandonlyif–  pnotyetprocessed–  Parentofpprocessed–  Minimumdistancebetweenpandq<currentbestdistance

•  IniBalisaBon:APL=[root]•  Ineachstep,processbestpagefromAPL

–  Datapages:asbefore–  Directorypages:checkminimumdistancetoquery

Page 13: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

BestFirstNearestNeighbourSearchwithIndex

Init:apl=[(0.0,root)]//sortedbydistresultdist=∞

Whileapl.notEmpty()andapl[0].dist<resultdist:page=apl[0].load()delete(apl[0])ifisDataPage(page): forxinpage.points: d=dist(q,x) ifd<resultdist: resultdist=d result=xelse: forpinpage.childPages: h=MINDIST(q,p) ifh<resultdist: apl.insert((h,p))

Page 14: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ExampleQuerywithBestFirstSearch

root

p1 p2

p11 p12 p21 p22p13 p23

p1p2

p11

p12

p13

p21p22

p23

APL:[(0.0,root)]resultdist:∞APL:[(7.2,p1)]resultdist:∞APL:[(6.8,p2)(7.2,p1)]resultdist:∞APL:[(7.2,p1)(8.2,p21)]resultdist:∞APL:[(7.0,p22)(7.2,p1)(8.2,p21)]resultdist:∞APL:[(6.9,p23)(7.0,p22)(7.2,p1)(8.2,p21)]resultdist:∞APL:[(7.0,p22)(7.2,p1)(8.2,p21)]resultdist:7.1APL:[(7.2,p1)(8.2,p21)]resultdist:7.0

Page 15: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

BestFirstSearchisopBmalHere:adrajoftheproof

1.  Completeness:ItwillfindthecorrectNNofaquery–  Everycorrectalgorithmhastoaccessallpagesthatintersect

withtheNNsphereofq–  ThesepageshaveMINDIST<resultdist

2.  Itaccessespagesinascendingorderfromthequery–  TheAPLissortedbyMINDISTandthealgorithmwillterminate

onceitisimpossibletofindanypointclosertoqthanthecurrentresult

3.  ItwillnotaccessasinglepagewithMINDISTlargerthanthetrueNNdistance–  ChildpagescannothaveaMINDISTsmallerthanitsparents

Page 16: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ConBnuousApproach

•  SimpleCase:•  Database:•  Query:•  Distancebetweenand:•  Sortimages

•  Suchthat•  Holdsforalland

Page 17: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ConBnuousApproach

•  HowtousemulBplefeatures•  Eachimageisrepresentedbydescriptors

•  Calculatescoreinsteadofdistancetoallowfordifferentweights

Page 18: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

DiscreteApproach

•  InspiredbytextualinformaBonretrieval•  Eachimageisrepresentedbyasetofbinaryfeatures(featuresmaybepresent(possiblymulBpleBmes)orabsent)

•  Featureiseitherpresentorabsent–  Similartowordsbeingabsentorpresentinadocument

•  Imagescontainingthesame(informaBve)featuresareassumedtoberelevanttoaquery

•  Example:GIFT–GNUImageFindingTool

Page 19: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

DiscreteApproach

•  GIFTusesTF‐IDF(textfrequency/inversedocumentfrequency)ranking–  Reducetheimpactoffeatureswhichoccurfrequentlyinthedata(comparableto“the”intexts)

•  TF:frequencyafeatureihasinadocumentdj

•  IDF:measuresimportanceofaterm

Page 20: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

DiscreteApproach•  %captureshowojenafeatureoccursinadocument–  Featuresthatoccurojeninadocumentdescribethisdocumentwell

•  idfcaptureshowrelevantafeatureis–  Featuresthatoccurrarelyinthefulldatabaseareimportant

•  Importantarethosefeatureswhichareojeninoneimage,butseldomoverthefulldataset–  Imageswhichshareseldomfeaturesarerelevantwithrespecttoeachother

Page 21: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

DiscreteApproachinGIFT

•  InGIFT,4differentfeaturesetsareconsidered–  Globalcolour–  Localcolour–  Globaltexture–  Localtexture

•  Foralllocalfeaturesap‐idf‐likescoreiscalculatedandthesearefusedasaweightedsum–  GlobalfeaturesarecomparedwithahistogramintersecBon

•  Formanycases,thediscreteandtheconBnuousapproachcanbesimulatedintherespecBveother

•  InGIFT–  Imageshaveabout1,500to2,000features

–  Similarimagesshareabout400‐500

Page 22: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

DiscreteApproach:InvertedFiles

•  StoreamappingfromcontenttolocaBon–  E.g.foreachfeaturealistofimagesthatcontainthisfeature

•  Allowforefficientsearchesevenforhugeamountsofimages–  idfforeachfeaturecanbepre‐calculated–  %foreachfeatureisstoredinthefiles–  Allowsforsearchingwithoutaccessingtheimages

•  IntheconBnuousapproachsearchingforneighboursislineartotheamountofimages,hereitisatmostlineartothenumberoffeaturesinanimage–  InpracBce,thefeatureswithhighimpactareprocessedfirstandthe

otherfeatureshavelessinfluence(Zipf’sLaw).Therefore,inpracBce,thisapproachisveryfast

Page 23: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Theinvertedfile

Feature1

Featuren‐1

...

Feature2

Featuren

Image5 Image7 Image1 Image25

Image1 Image17 Image3 ...

Image25 Image17 Image1 Image4

Image4 Image5 Image6 ...

Image2 Image17 Image12 Image3

Page 24: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

InvertedFiles

•  Accessfeaturebyfeatureinsteadofimagebyimage

•  Extremelyfastaccessforrarefeatures

•  Efficientforsparselypopulatedspaces

Page 25: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

VisualProperBesofImages

•  Colour•  Texture•  Shapes•  Imageparts•  Completeimage

•  Metadata•  Textuallabels/capBons/annotaBons

Page 26: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

FeaturesforContent‐basedImageRetrieval

•  GlobalDescriptors– Colourhistograms– TextureFeatures– ShapeFeatures

•  LocalDescriptors– Directapproach– Patch‐histograms/bag‐of‐visualwords– SIFTfeatures

Page 27: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

GlobalDescriptors

•  Captureapropertyoftheimagewithfewvalues

•  DescribingtheimageinitsenBrety•  E.g.

– Whichcoloursoccurintheimage?

–  Istheimageofhighcontrast?–  Istheimagebright/dark?

Page 28: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Colourhistograms

•  DescribethedistribuBonofcoloursinanimage

•  DiscardspaBalinformaBon

1.  QuanBsecolourspace2.  Countwhichcolouroccurshowojen

Page 29: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ColourHistograms:ExampleRGBcolourspace

HSVcolourspace

VisualisaBondonewith3DColorInspector:hvp://rsbweb.nih.giv/ij/plugins/color‐inspector.html

Page 30: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ColourHistograms:ExampleRGBcolourspace

HSVcolourspace

VisualisaBondonewith3DColorInspector:hvp://rsbweb.nih.giv/ij/plugins/color‐inspector.html

Page 31: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

TextureFeatures

“TexturereferstotheproperBesheldandsensaBonscausedbytheexternalsurfaceofobjectsreceivedthroughthesenseoftouch.”

Textureinimageprocessing:• DifferentdefiniBons• DifferentrepresentaBons

Page 32: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

TamuraFeatures

•  ProposedbyTamura[1978]–  FeaturescorrespondingtohumanpercepBon–  Examined6differentfeatures,found3tocorrespondstronglyto

humanpercepBon–  Coarseness–coarsevs.fine–  Contrast–highvs.low–  Direc1onality–direcBonalvs.non‐direcBonal–  Line‐likeness–line‐likevs.non‐line‐like–  Regularity–regularvs.irregular–  Roughness–roughvs.smooth

Page 33: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

TamuraFeatures

•  Originallyonevalueperfeatureperimagewasdetermined

•  Createadescriptorby1.  Calculatecoarseness,contrast,anddirecBonality

inalocalneighbourhoodforeachpixel

2.  Createajointhistogramoverthesevalues

Page 34: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

GaborFeatures

•  ObtainseveralvaluesperpixeldenoBngspaBalfrequenciesanddirecBons

Page 35: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

GaborFeatures•  WindowsFouriertransformwithGaussianaswindow

funcBon:

•  Gaborfeatures:–  Yieldonevalueperpixel(forgreyvalueimages)–  ForcolourimagesuseatransformedHSVspace

•  Computeglobal(histogram)orlocalfeaturesfromGaborresponses

Page 36: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Gray‐LevelCo‐OccurrenceMatrices

•  StaBsBcaldescriptorfortextureproperBesofanimagebycomparingneighbouringpixels– DirecBonanddistance–  Extractfeaturesfrommatrix

•  Entropy•  Contrast•  CorrelaBon•  …

Page 37: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

HistogramComparison

•  ‐distances

•  JensenShannonDivergence

Page 38: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

PixelValuesasFeatures

•  Moststraighporward•  Scaleallimagestoacommonsize•  Comparepixelsusinge.g.Euclideandistance

•  MulB‐scaleRepresentaBons:

Page 39: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

DirectComparisonofImages

•  Pixel‐wise:

Page 40: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

ImageDistorBonModel

•  Allowforsmalllocaldisplacements•  ComputaBonallyefficient

Page 41: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Shape:GISTdescriptor

•  Describetheshapesoccurringinanimagewithonedescriptor–  Subdivideimagein4×4subimages–  CalculateGaborresponsesineachofthese–  CreatehistogramsofGaborresponsesineachsubimage

–  HasbeenshowntobehelpfultodisBnguish•  Naturalness•  Openness•  Roughness•  Expansion•  Ruggedness

Page 42: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

Shape:GISTdescriptor

GISTdescriptorOlivaandTorralba,IJCV2001

SlidebyJamesHaysandAlexeiEfros

Page 43: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

LocalDescriptors

•  DefiniBon:•  Featuresextractedfromlocalregionsfromtheimage

•  E.g.patches,SIFTfeatures,localcolourhistograms,…

•  ExtracBonposiBondeterminedbyinterestpoints•  Knowntoachievegoodresultsinmanytasks

•  AcBvefieldofresearchinobjectrecogniBon,detecBon,sceneclassificaBon,imageannotaBon,andmorerecently:imageretrieval

Page 44: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

LocalDescriptors:InterestPoints

Page 45: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

LocalDescriptors:Patches

•  Extractpatchesfromtheimage•  ApplyaPCAtransformaBontoreducedimensionality

•  Caneasilyhandlecolourandgrayvalueimages

•  Allmethodsfrominvariantimagecomparisoncanbeappliedatpatchlevel

Page 46: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

LocalDescriptors:SIFT

•  Storeahistogramofgradientsinlocalareas•  SIFT=ScaleInvariantFeatureTransform

•  Leadingto128‐dimensionalfeaturevectors•  Havebeenshowntoperformwellinmanytasks

FigurebyT.Weyand

Page 47: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

LocalDescriptors:DirectRetrieval

Page 48: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

HistogramsofLocalDescriptors

FigurebyT.Weyand

Page 49: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

HistogramsofLocalDescriptors

Page 50: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

FeaturesforCBIR:PerformanceEvaluaBon

Page 51: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CorrelaBonBetweenFeatures1:colourhistogram2:MPEG7:colourlayout3:LFSIFThistogram4:LFSIFTsignature5:LFSIFTglobalsearch6:MPEG7:edgehistogram,7:Gaborvector8:Gaborhistograms9:grayvaluehistogram10:globaltexturefeature,11:inv.Feathistocolor12:Lfpatchesglobal13:LFpatcheshistogram14:LFpatchessignature,15:inv.feathistorel16:MPEG7:scalablecolor,17:Tamura18:32x32image19:Xx32image.

Page 52: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CorrelaBonBetweenFeatures

Page 53: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeatures

•  Manuallytuned– Havean`expert’findapropersetofparameters

•  HeurisBctocapturedifferentimageproperBes

•  CombinaBontoreflecthumanpercepBon

•  CombinaBontoobtainopBmalperformance(givenasetoftrainingqueries)

Page 54: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeaturestoCaptureDifferentImageProperBes

•  GiventheresultfromthecorrelaBonanalysis,firstchooseasimplefeature

•  ThenaddfeatureswhichhavelowcorrelaBon

ColorHistogram:50.5%MAP

+GlobalTextureFeatures:49.5%MAP

+TamuraTextureHistogram:51.2%MAP

+ImageThumbnails:53.9%MAP

+PatchHistograms:55.7%MAP

Page 55: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeaturesReflecBngHumanPercepBon

•  ComparisonofHumanpercepBonofimagesimilarityandlow‐levelimagedescriptors:

Page 56: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeaturesReflecBngHumanPercepBon

•  CombinaBonsofimagedescriptorstoachievebestcompliancewithhumanpercepBon

Page 57: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeaturesReflecBngHumanPercepBon

Page 58: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeaturestoObtainOpBmalPerformance

•  Considerretrievaltobeatwo‐classproblem•  Classifyimagesas`relevant’or`irrelevant’

•  Usetrainedclassifiers•  Requirestrainingdata– Canbeobtainedfromexperts– Orrelevancefeedback(moreonthislater)

Page 59: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeatures:MaximumEntropy/Log‐LinearModels

•  LearnamodeltopredictprobabiliBesforanimagetoberelevant

•  isafuncBondescribingsomesimilarity/dissimilarityofthequeryQandimageX

•  aretheparameterstobetrained

Page 60: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

TrainedLambdasformedicalretrieval

1.  En2.  Fr3.  Ge4.  Colour5.  Gray6.  GTF7.  IFH8.  Tamura9.  32x3210. PatchHisto

Page 61: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

CombiningFeatures:SupportVectorMachines

•  Trainatwo‐classSVM,+1=relevant,‐1=irrelevant

•  SinceSVMssomeBmeshaveproblemswithnon‐uniformlydistributedclasses,subsampletrainingsamplestohaveapproximatelythesameamountofposiBveandnegaBvesamples

Page 62: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

AvailableResources•  ImageRetrievalSystems:

–  GIFT–GNUImageFindingTool•  hvp://www.gnu.org/sojware/gij/•  Fullimageretrievalsystem•  Followingthediscreteapproach

–  FIRE–FlexibleImageRetrievalEngine•  hvp://www‐i6.informaBk.rwth‐aachen.de/~deselaers/fire/•  Researchimageretrievalsystem•  Developedtoallowforeasyextension•  FollowingtheConBnuousapproach

–  openCV–computervisionlibrary•  hvp://sourceforge.net/projects/opencvlibrary/•  ImplementsmayimageprocessingoperaBons•  E.g.facedetecBonandrecogniBon,featureextracBon

Page 63: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

AvailableResourcesDatasets

•  IAPRTC12Dataset–  UsedinImageCLEFsince2006–  20,000imageswithtextinEnglish,German,Spanish

–  Availablefromwww.imageclef.org/photodata

•  ImageCLEFmedDatasets–  Nearly70,000images

–  From50,000medicalcases–  Imagesandtext

Page 64: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

AvailableResourcesDatasets

•  Coreldataset– Widelyusedbutnotfreelyavailable– QuesBonableforevaluaBon– DifferentsetsareinuseintheCBIRcommunity

•  Between1,000and200,000images

•  MSRCdataset–  ProvidedbyMicrosojResearch,Cambridge,UK–  4320imagesfrom45classes

•  Flickr– DifficulttouseforevaluaBonalthoughlargenumberofimages

Page 65: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

References•  Overview

–  Smeulders,A.W.,Worring,M.,SanBni,S.,Gupta,A.,andJain,R.2000.Content‐BasedImageRetrievalattheEndoftheEarlyYears.IEEETrans.PavernAnal.Mach.Intell.22,12(Dec.2000),1349‐1380.

–  Rui,Y.,Huang,T.,&Chang,S.(1999).Imageretrieval:Currenttechniques,promisingdirecBonsandopenissues.JournalofVisualCommunicaBonandImageRepresentaBon,10(4),39–62.

–  Dava,R.,Li,J.,&Wang,J.Z.(2005).Content‐basedimageretrieval—approachesandtrendsofthenewage.InACMIntl.WorkshoponMulBmediaInformaBonRetrieval,ACMMulBmedia.Singapore.

–  Lew,M.S.,Sebe,N.,Djeraba,C.,&Jain,R.(2006).Content‐basedmulBmediainformaBonretrieval:Stateoftheartandchallenges.ACMTransacBonsonMulBmediaCompuBng,CommunicaBonsandApplicaBons,2(1),1–19.

–  HenningMüller,NicolasMichoux,DavidBandon,AntoineGeissbuhler,Areviewofcontent‐basedimageretrievalsystemsinmedicine‐clinicalbenefitsandfuturedirecBons,InternaBonalJournalofMedicalInformaBcs,volume73,pages1‐23,2004

•  Features:–  DeselaersT.,KeysersD.,NeyH.,"FeaturesforImageRetrieval:AnExperimentalComparison",InformaBonRetrieval,vol.11,issue2,

TheNetherlands,Springer,pp.77‐107,03/2008.–  SIFTDescriptors

•  Lowe,DavidG.(1999)."ObjectrecogniBonfromlocalscale‐invariantfeatures".ProceedingsoftheInternaBonalConferenceonComputerVision2:1150–1157.

•  Lowe,DavidG.(2004)."DisBncBveImageFeaturesfromScale‐InvariantKeypoints".InternaBonalJournalofComputerVision60(2):91–110.

–  PatchHistograms•  DeselaersT.,KeysersD.,NeyH.,"DiscriminaBveTrainingforObjectRecogniBonusingImagePatches",CVPR,vol.2,SanDiego,CA,

USA,IEEE,pp.157‐162,20/06/2005.

–  GIST•  Modelingtheshapeofthescene:aholisBcrepresentaBonofthespaBalenvelope.AudeOliva,AntonioTorralba.InternaBonalJournal

ofComputerVision,Vol.42(3):145‐175,2001

Page 66: Content‐based Image Retrievalthomas.deselaers.de/teaching/files/tutorial_icpr08/02-CBIR.pdf · • What is CBIR ... Slide by James Hays and Alexei Efros Local

References•  ConBnuous/Discrete

–  FIRE:seefeatures–  GIFT:Squire,D.M.,Müller,W.,Müller,H.,&Raki,J.(1999)Content‐Basedqueryofimagedatabases,inspi‐raBonsfromtextretrieval:

Invertedfiles,frequency‐basedweightsandrelevancefeedback.InScandinavianConferenceonImageAnalysis(pp.143–149).Kangerlussuaq.

–  deVries,A.P.,&Westerveld,T.(2004).AcomparisonofconBnuousvs.discreteimagemodelsforprobabilisBcimageandvideoretrieval.InProc.InternaBonalConferenceonImageProcessing(pp.2387–2390).Singapore.

•  Datasets–  GrubingerM.,CloughP.D.,MüllerH.,DeselaersT.,"TheIAPRBenchmark:ANewEvaluaBonResourceforVisualInformaBonSystems",

InternaBonalConferenceonLanguageResourcesandEvaluaBon,Genoa,Italy,24/05/2006.–  Müller,H.,Marchand‐Maillet,S.,andPun,T.2002.TheTruthaboutCorel‐EvaluaBoninImageRetrieval.InProceedingsofthe

internaBonalConferenceonImageandVideoRetrieval(July18‐19,2002).M.S.Lew,N.Sebe,andJ.P.Eakins,Eds.LectureNotesInComputerScience,vol.2383.Springer‐Verlag,London,38‐49.

–  www.imageclef.org•  LearningFeatureCombinaBons

–  DeselaersT.,WeyandT.,NeyH.,"ImageRetrievalandAnnotaBonUsingMaximumEntropy",CLEFWorkshop2006,vol.4730,Alicante,Spain,Springer,pp.725‐734,20/09/2006,2007.

–  GassT.,WeyandT.,DeselaersT.,NeyH.,"FIREinImageCLEF2007:SupportVectorMachinesandLogisBcRegressiontoFuseImageDescriptorsinforPhotoRetrieval",AdvancesinMulBlingualandMulBmodalInformaBonRetrieval8thWorkshopoftheCross‐LanguageEvaluaBonForum,CLEF2007,vol.5152,Budapest,Hungary,Springer,19/09/2007,2008.

•  EfficientNNsearch–  HjaltasonG.R.,SametH.:RankinginSpa.alDatabases,Int.Symp.onLargeSpa.alDatabases(SSD),1995.–  Berchtold,Böhm,Keim,Kriegel:ACostModelforNearestNeighborSearchinHigh‐DimensionalSpace,ACMSymposiumonPrinciplesof

DatabaseSystems,1997.