shadowdraw - university of texas at...

40
ShadowDraw Real-Time User Guidance for Freehand Drawing Harshal Priyadarshi

Upload: others

Post on 09-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ShadowDrawReal-TimeUserGuidanceforFreehandDrawing

HarshalPriyadarshi

Page 2: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Demo

Page 3: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ComponentsofShadow-Draw

• InvertedFileStructureforindexing• Databaseofimages• CorrespondingEdgemaps

• Querymethod• Dynamicallyretrievesmatchingimages• Alignsthemtoevolvingdrawing• Weighsthembasedonmatchingscore,toformshadow

• UI• Displaysashadowofweightededgemapsbeneaththeuser’sdrawing

Page 4: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

DatabaseCreation

• ImageAcquisition• EdgeExtraction• PatchDescription• Min-hashEncoding

Page 5: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ImageAcquisition

• 30kimagesspanning40categoriesobtainedfrominternet• Scaledtoobtain300x300images

ProblemsHandled:1. DirectSketchimagesarenotabundant2. DiverseBackground– Stillhasgood

edgesyoumightwanttodraw3. Photographerbiastorescue

Page 6: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

DatabaseCreation

• ImageAcquisition• EdgeExtraction• PatchDescription• Min-hashEncoding

Page 7: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

EdgeExtraction(Step1)

• Computethelocaledgemagnitude(pm)andorientation(po)ateachpixelusingsteerablefilters

Input Output

Page 8: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

EdgeExtraction(Step2)• Normalizetheedgemagnitude• Needtodetectlong,coherentedgesevenwhenfaint(i.e.,notsimplyedgeswithstrongmagnitude)

Input Output

Page 9: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

EdgeExtraction(Step3)• MessagePassingforlengthestimation

Input Output

Page 10: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Seethedifference

Page 11: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

CannyEdgeDetection(NonMaxSuppression)

Credits- KristenGrauman (bothimages)

Page 12: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

DatabaseCreation

• ImageAcquisition• EdgeExtraction• PatchDescription• Min-hashEncoding

Page 13: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

PatchDescriptors

• LowDimensionalBiCE descriptor• Encodesahistogramofedgepositionsandorientations

• Doneoveroverlapping60x60patcheswith50%overlap• AsmappinganedgeimageEtoincompleteandevolvingdrawing.

• SIFT/DaisyvsBiCE• Formerreliesonrelativestrengthofedgemagnitudestoprovidediscriminability• ThusreducedperformancecomparedtoBiCE onourtask,whereedgestrengthsarenotimportant.

Page 14: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

BiCE descriptor(Steps)1. LocalNormalizationofimagepatchgradients• Removevariationinrelativegradientmagnitudes

2. Binningofnormalizedgradients• usingposition,orientation,andlocallinearlength ofimage

3. Binarization ofnormalizedgradienthistogram• Encodesthepresenceofedges

Presence/absenceofEdgeispreservedacrossmatchingpatches,Theremagnitudemightnot.

Page 15: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Step1 NormalizedGradient(g_cap)

OriginalGradient(g)

Page 16: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Step2

OrientationalignedbinningRobustnesstoorientationchanges

InitialBinningw.r.t.justpositionandorientation.

Page 17: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

IncreasingDiscriminabilityLongCoherentEdgesvsShorterTexturedEdges

CalculateEdgeLength

Discretizationinto2binsbyweightbasednormalizedgradientsplitting

Alpha,betaà Tunablethresholdingparams

Withgaussian Bluralongx,y,thetadimension

WHY??

Page 18: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Step3(SubsamplingandBinarization)

• Subsampletodiscretesetofvaluesforx,y,thetaandlength

• Value=1(topTpercentofbinswithhighestfrequency)• Value=0(rest)

• FlattentogettheBiCE desciptor

Page 19: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

DatabaseCreation

• ImageAcquisition• EdgeExtraction• PatchDescription• Min-hashEncoding

Page 20: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

RetrievalandClusteringEfficiency

• Reducedimensionà ImproveClusteringà ImproveRetrieval

PreservesMaximumJaccard Similarity

Page 21: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Minhashing (Iapologizeformyterribleanimation)

Index VectorA VectorB

1 1 0

2 1 0

3 0 1

4 0 0

5 1 0

6 0 0

H(Index)4

6

1

5

3

2

Index VectorA VectorB

1 1 0

2 1 0

3 0 1

4 0 0

5 1 0

6 0 0

Index VectorA VectorB

1 5 3

Whatarethesevectors?

Page 22: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Sketches(n,k)andInvertedIndexing• Toincreaseprecision

Index VectorA VectorB

1 5 3

2 2 1

3 1 1

4 4 6

5 3 2

6 1 6

Khashfunctions

• ToincreaserecallIndex VectorA VectorB

1 5 3

2 2 1

3 1 1

4 4 6

5 3 2

6 1 6

Index VectorA VectorB

1 5 3

2 2 1

3 1 1

4 4 6

5 3 2

6 1 6

Index VectorA VectorB

1 5 3

2 2 1

3 1 1

4 4 6

5 3 2

6 1 6

Index VectorA VectorB

1 5 3

2 2 1

3 1 1

4 4 6

5 3 2

6 1 6

Index VectorA VectorB

1 5 3

2 2 1

3 1 1

4 4 6

5 3 2

6 1 6

NsetsofKhashfunctions

Page 23: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ComponentsofShadow-Draw

• InvertedFileStructureforindexing• Databaseofimages• CorrespondingEdgemaps

• Querymethod• Dynamicallyretrievesmatchingimages• Alignsthemtoevolvingdrawing• Weighsthembasedonmatchingscore,toformshadow

• UI• Displaysashadowofweightededgemapsbeneaththeuser’sdrawing

Page 24: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

QuerySteps

• DynamicallyRetrievingMatchingImages

• Aligning MatchingImagestoDrawnSketch

• ShadowCreationbyWeighting

Page 25: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ImageMatching

• Obtain CandidateMatches• Align CandidateMatcheswiththepartiallydrawnsketch• Assignweighttoeachcandidate’sedgeimage• ConstructShadowImage

Page 26: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Votecountforpatchforeachcandidateimage

CandidateMatchFinding

EdgeImageofSketch

BiCE sketchdescriptorforeachpatch

Top100imagesandcorrespondingoffsetforthehighlyvotedoffsetNote:Not100bestpatches

Xoffsetofthecandidatepatchfromtheusersketchpatch

ResultantCandidateFormat(ImageId,patchoffset-xdirection,patchoffset-ydirection)

Page 27: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

QuerySteps

• DynamicallyRetrievingMatchingImages

• Aligning MatchingImagestoDrawnSketch

• ShadowCreationbyWeighting

Page 28: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

AligningCandidateMatches

Page 29: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

QuerySteps

• DynamicallyRetrievingMatchingImages

• Aligning MatchingImagestoDrawnSketch

• ShadowCreationbyWeighting

Page 30: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ImageWeightingWeightImage

Page 31: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ShadowImageConstruction

ShadowImage

EdgeCandidateImage

BlendingWeightImage

GlobalmatchingtermSpatiallyvaryingmatchterm

NormalizationTerm

3variables:• Globalmatchingterm(v)• Spatiallyvaryingmatchingterm(V)• VisibilityEnhancer(alpha) VisibilityEnhancer

Page 32: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ObtainingGlobalMatchingTerm(V)

UserSketch(8orientations)

CandidateImage(8orientations)

PositiveCorrelation

NegativeCorrelation

Imagenotoriented,theedgesitcapturesareoriented

Page 33: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

GlobalMatchingSpatialMatching

Averageof5highesthi fromthecandidateset

GaussianBluronthepositivecorrelationimage

Page 34: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

VisibilityEnhancer(alpha)

Whyisitavisibilityenhancer?

Page 35: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ExperimentalFindings

Robustnessto________ ????

Page 36: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

PoorvsAveragevsGood

WHY?? WHY??

Page 37: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

Complexity

Page 38: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

• Strengths• Canhelpdrawingstructurallycomplexobjects• Helpspreservetheuniquestyleoftheusers• Isareal-timealgorithm

•Weaknesses• Leadstogoodshadowsonlyiftheinitialusersketchisnotallovertheplace.Otherwisemightconfusetheuser.• Atusslebetween guidanceand freedom.• Sketchingflowbias– Thewaywestartdrawingthesketchmightaffecttheshadowretrieved,andthusleadtoconfusioninitially,iftheuserisnotverycertainofeachdetail.

Page 39: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

References

• OriginalPaper• http://vision.cs.utexas.edu/projects/shadowdraw/ShadowDrawSiggraph11.pdf

• SupportingPapers• LongEdgeDetector

• http://grail.cs.washington.edu/projects/gradientshop/demos/gs_paper_TOG_2009.pdf• BiCE descriptor

• http://larryzitnick.org/publication/BiCE_ECCV10.pdf

Page 40: ShadowDraw - University of Texas at Austinvision.cs.utexas.edu/381V-fall2016/slides/priyadarshi-paper.pdf · • Shadow Creation by Weighting. Image Matching • Obtain Candidate

ThankYou