SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
Software
Feature implementation and computation
Andrea Vedaldi, University of Oxford



https://sites.google.com/site/eccv12features/

goo.gl/jKC2J
2




VLFeat
MATLAB ease of use
Covariant detectors, MSER, SIFT, etc ...


OpenCV
One-shop experience
The most popular vision library


Others
There is certainly no lack of software!
3




VLFeat
MATLAB ease of use
Covariant detectors, MSER, SIFT, etc ...


OpenCV
One-shop experience
The most popular vision library


Others
There is certainly no lack of software!
VLFeat                                 4

             An open and portable library of CV software



      http://www.vlfeat.org/benchmarks/index.html


                      Quick Start with MATLAB

>>"untar"http://www.vlfeat.org/download/vlfeat50.9.165bin.tar.gz"
>>"run vlfeat-0.9.16/toolbox/vl_setup




                    Mac          Linux      Windows



                            Since 2008
                          ACM OSS award
SIFT detector and descriptor   5


1. load an image
  imPath = fullfile(‘oxford.jpg’) ;
  im = imread(imPath) ;

2. convert it to single precision gray scale
  imgs = im2single(rgb2gray(im)) ;

3. run SIFT
  [frames, descrs] = vl_sift(imgs) ;

4. visualise keypoints
  imagesc(im) ; colormap gray; hold on ;
  vl_plotframe(frames) ;

5. visualise descriptors
  vl_plotsiftdescriptor(...
    descrs(:,432), frames(:,432)) ;
Example: matching features      6




                      684 tentative matches




nr :   :h f    t :a
 r /   /h f    t /a
 r            h f               t :    /a
Example: stitching                  7

                                684 tentative matches




                  492 (76%) inliers                     mosaic




•   Live demonstration
Other covariant detectors                            8


    frames = vl_covdet(imgs, 'verbose') ;




imagesc(im) ;                       vl_plotframes(frames) ;


         Do not forget to convert the images to
           grayscale in single precision. Use
         im2single(im) and not single(im) !
Understanding feature frames                                           9


                                                                                               x

                                                                                      
                                                               x   a11      a12       b
                                                                                      x   t1
                                    affine tf.                    =                      +
                    1                                          y   a21      a22       b
                                                                                      y   t2
                            b
                            x

                b
                y

                                                       y

•   frames has a feature frame for each column
    containing a stacked affine transformation (A,T)
                        2       3
                     t1
                  6 t2 7
                  6 7                                                      
                  6a11 7                            x   a11      a12       b
                                                                           x   t1
    frames(:,i) = 6
                  6a21 7
                        7                             =                      +
                  6 7                               y   a21      a22       b
                                                                           y   t2
                  4a12 5
                    a22
A frame as an oriented ellipse   10

   reference = two vectors

                               uniquely identifies
                                   the affine
                    1           transformation

                          b
                          x

                b
                y




reference = oriented ellipse
Different cornerness measures                           11


            frames = vl_covdet(imgs, 'method', 'Hessian') ;
                    DoG                                        Hessian




•   Difference of Gaussian (Laplacian, trace of Hessian, or SIFT)

•   Hessian (determinant of)
                HarrisLaplace                               HessianLaplace
Different cornerness measures                           12


        frames = vl_covdet(imgs, 'method', 'HarrisLaplace') ;

                  HarrisLaplace                              HessianLaplace




•   Harris Laplace (Harris cornerness, Laplacian for scale selection)

•   Hessian Laplace
              MultiscaleHarris                              MultiscaleHessian
Different cornerness measures                13


      frames = vl_covdet(imgs, 'method', 'MultiscaleHarris') ;
                MultiscaleHarris                 MultiscaleHessian




•   Multiscale Harris (just a bunch of Harris)

•   Multiscale Hessian
Affine adaptation                        14


frames = vl_covdet(imgs, 'EstimateAffineShape', true) ;
Upright features   15


     By default the rotation is
    selected so that the vertical
        axis stays vertical.




            In formulas
                          
    x   a11      0        b
                          x   t1
      =                     +
    y   a21     a22       b
                          y   t2


Remark: for general affine transformations
the horizontal direction may appear rotated
         even for upright features.
Orientation detection                      16


frames = vl_covdet(imgs, 'EstimateOrientations', true) ;
Computing descriptors          17


                   [frames, descrs] = vl_covdet(imgs) ;




•   Each column of descrs is a stacked SIFT descriptor

•   How is a SIFT descriptor associated to a feature?

•   What about other descriptors?
Computing descriptors                              18


[frames, descrs] = vl_covdet(imgs, 'Descriptor', 'patch') ;



                               Each column of descrs is a stacked
                               normalised image patch.
The geometry of an normalised patch                                  19


•   Normalisation and patch resampling is controlled by three parameters:



                                       (antialiasing effect)




                                                  affine tf.




                                               (size of patch in normalised units)
                  (number of pixels)
Example: normalised patch for SIFT      20




                                       =1




         1    3     6




                                     f v w


                    = 15
Custom frames                      21

Example: running affine adaptation on a grid

    frames = vl_covdet(imgs, ...
        'Frames', frames, ...
  'EstimateAffineShape', true, ...
   'EstiamteOrientation', true) ;
Obtaining additional information on the features                                                             22


                [frames, descrs, info] = vl_covdet(imgs);

                       info =
                                            gss:                                [1x1 struct]
                                            css:                                [1x1 struct]
                                     peakScores:                                [1x351 single]
                                     edgeScores:                                [1x351 single]
                              orientationScores:                                [1x351 single]
                           laplacianScaleScores:                                [1x351 single]

               120                                                    120


               100                                                    100


                80                                                     80
  Occurences




                                                         Occurences
                60                                                     60


                40                                                     40


                20                                                     20


                 0                                                      0
                −0.1   −0.05       0        0.05   0.1                      0      2    4      6    8   10
                               Peak Score                                              Edge Score
Obtaining the scale space                                  23


      [frames, descrs, info] = vl_covdet(imgs);

            info =
                                gss:   [1x1 struct]         Gaussian
                                css:   [1x1 struct]        scale space
                         peakScores:   [1x351 single]
                         edgeScores:   [1x351 single]
                  orientationScores:   [1x351 single]
               laplacianScaleScores:   [1x351 single]

octave −1                   octave 0                    octave 1




octave 2                    octave 3
Obtaining the scale space                                 24


      [frames, descrs, info] = vl_covdet(imgs);

            info =
                                gss:   [1x1 struct]        cornerness
                                css:   [1x1 struct]         measure
                         peakScores:   [1x351 single]
                         edgeScores:   [1x351 single]
                  orientationScores:   [1x351 single]
               laplacianScaleScores:   [1x351 single]

octave −1                   octave 0                    octave 1




octave 2                    octave 3
Performance comparison                                                                                    25



                                   Oxford 5K lite retrieval benchmark
                                       Num. features / image                                               mAP

VL HessianLaplace (double)                                  VL HessianLaplace (double)
                                                                           7131                                    79.9%
          VL DoG (double)                                          5631 DoG (double)
                                                                      VL                                                      85.1%
       VL Hessian (double)                           3411          VL Hessian (double)                           77.8%
           VL DoG (no aff)                      2794                     VL DoG (no aff)                 74.0%
 VL HarrisLaplace (double)                    2316           VL HarrisLaplace (double)                           77.8%
             CMP Hessian                  2292                            CMP Hessian                        77.1%
        VL HessianLaplace                2020                       VL HessianLaplace                   73.8%
                  VL DoG                1854                                    VL DoG                              80.1%
                 VGG hes               1517                                    VGG hes                   74.6%
                 VGG har           1384                                        VGG har             71.9%
               VL Hessian         1089                                      VL Hessian         68.7%
          VL HarrisLaplace       765                                  VL HarrisLaplace           70.4%
                             0         2000          4000         6000         8000   0.6500   0.7125     0.7750         0.8375   0.9000
Repeatability: viewpoint                                      26




                                    Repeatability (graf)
                       100
                                                                     VL DoG
                                                                     VL Hessian
                        90
                                                                     VL HessianLaplace
                                                                     VL HarrisLaplace
                        80
                                                                     VL DoG (double)
                                                                     VL Hessian (double)
                        70
                                                                     VL HessianLaplace (double)
Repeatability (graf)




                                                                     VL HarrisLaplace (double)
                        60
                                                                     VLFeat SIFT
                                                                     CMP Hessian
                        50                                           VGG hes
                                                                     VGG har
                        40

                        30

                        20

                        10

                         0
                          30   40         50               60   20
                                     Viewpoint angle
Repeatability: viewpoint                                      27




                                    Repeatability (wall)
                       100
                                                                     VL DoG
                                                                     VL Hessian
                        90
                                                                     VL HessianLaplace
                                                                     VL HarrisLaplace
                        80
                                                                     VL DoG (double)
                                                                     VL Hessian (double)
                        70
                                                                     VL HessianLaplace (double)
Repeatability (wall)




                                                                     VL HarrisLaplace (double)
                        60
                                                                     VLFeat SIFT
                                                                     CMP Hessian
                        50                                           VGG hes
                                                                     VGG har
                        40

                        30

                        20

                        10

                         0
                          30   40         50               60   20
                                     Viewpoint angle
Repeatability: scale                                         28




                                     Repeatability (boat)
                       100
                                                                         VL DoG
                                                                         VL Hessian
                        90
                                                                         VL HessianLaplace
                                                                         VL HarrisLaplace
                        80
                                                                         VL DoG (double)
                                                                         VL Hessian (double)
                        70
                                                                         VL HessianLaplace (double)
Repeatability (boat)




                                                                         VL HarrisLaplace (double)
                        60
                                                                         VLFeat SIFT
                                                                         CMP Hessian
                        50                                               VGG hes
                                                                         VGG har
                        40

                        30

                        20

                        10

                        0
                        1.38   1.9          2.35            2.8   1.12
                                       Scale changes
Repeatability: JPEG compression                                     29




                                     Repeatability (ubc)
                      100
                                                                     VL DoG
                                                                     VL Hessian
                       90
                                                                     VL HessianLaplace
                                                                     VL HarrisLaplace
                       80
                                                                     VL DoG (double)
                                                                     VL Hessian (double)
                       70
                                                                     VL HessianLaplace (double)
Repeatability (ubc)




                                                                     VL HarrisLaplace (double)
                       60
                                                                     VLFeat SIFT
                                                                     CMP Hessian
                       50                                            VGG hes
                                                                     VGG har
                       40

                       30

                       20

                       10

                        0
                         80    90          95              98   60
                                    JPEG compression %
Maximally Stable Extremal Regions (MSER)             30

                                  [Matas et al. 2002]




•   Extracts MSER regions regions and fitted ellipses frames:
    imgs = uint8(rgb2gray(I)) ;
    [regions,"frames]"="vl_mser(imgs)";

•   Control region stability:
    [regions,"frames]"="vl_mser(imgs,"...
    """"""""""""""""""""""""""""‘MinDiversity’,"0.7,"...
    """"""""""""""""""""""""""""‘MaxVariation’,"0.2,"...
    """"""""""""""""""""""""""""‘Delta’,"10)";
Many other features and tools                                             31




           superpixels                MSER            agglomerative information bottleneck   distance transform

  di erent mode seeking algo-
 sent (some of) the data points
 nal to the Parzen density esti-
wards the mode approximately
 ates mean shift trajectories by
xt and in Fig. 2, medoid shifts
  circles. This disconnects por-
 alleviated (but not solved) by
ect. 3) seeks the energy modes
 s, trading-o mode over- and
     randomized kd-trees               fast k-means                  feature maps, stochastic gradient SVM


s, where d is the dimension-
 is only O(dN 2 T ), where T                 Fast Dense SIFT
 lever implementations yield
Many other features and tools                           32




 SLIC superpixels          Histogram of Oriented Gradients (HOG)




                                 HARVEST Programme




New SGD Learning of SVMs
OpenCV                                  33


•   The largest, best known vision library

•   Features
    -   OpenCV 2.1:
        Harris, Tomasi&Shi, MSER, DoG, SURF, STAR and FAST,
        DoG + SIFT, SURF, HARRIS, GoodFeaturesToTrack
    -   OpenCV 2.4:
        ORB, BRIEF, and FREAK

                           Example: computing ORB features.
             #include <opencv2/core/core.hpp>
             #include <opencv2/features2d/features2d.hpp>
             #include <vector>

             Mat image = importImage8UC1(in[IN_I]);
             Mat descriptors;
             std::vector<KeyPoint> frames;

             ORB orb(numFeatures, scaleFactor, numLevels, edgeThreshold, 0,
                     wtak, scoreTypeToORBPar(scoreType), patchSize);

             orb(image, Mat(), frames);
This is not all folks                                 34


•   Abundance of open source / free software for CV
    -   Always check out authors home pages

•   Examples

    Rob Hess SIFT                              SURF
    http://robwhess.github.com/opensift/       http://www.vision.ee.ethz.ch/~surf/

    Open SURF
    http://www.chrisevansdev.com/computer-vision-opensurf.html

    FAST corners
    http://www.edwardrosten.com/work/fast.html

    LIOP descriptors
    http://vision.ia.ac.cn/Students/bfan/index.htm           ...
Credits                                    35




         Karel Lenc         Daniele Perrone            Michal Perdoch




                              HARVEST Programme



Krystian Mikolajczyk   Tinne Tuytelaars       Jiri Matas     Cordelia Schmid

                             Andrew Zisserman

Contenu connexe

Tendances

Journey to structure from motion
Journey to structure from motionJourney to structure from motion
Journey to structure from motionJa-Keoung Koo
 
NIPS2008: tutorial: statistical models of visual images
NIPS2008: tutorial: statistical models of visual imagesNIPS2008: tutorial: statistical models of visual images
NIPS2008: tutorial: statistical models of visual imageszukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
Bouguet's MatLab Camera Calibration Toolbox for Stereo Camera
Bouguet's MatLab Camera Calibration Toolbox for Stereo CameraBouguet's MatLab Camera Calibration Toolbox for Stereo Camera
Bouguet's MatLab Camera Calibration Toolbox for Stereo CameraYuji Oyamada
 
Camera parameters
Camera parametersCamera parameters
Camera parametersTheYacine
 
Elementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization ProblemsElementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization Problemsjfrchicanog
 
Structured regression for efficient object detection
Structured regression for efficient object detectionStructured regression for efficient object detection
Structured regression for efficient object detectionzukun
 
Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009Juan Luis Nieves
 
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)Joo-Haeng Lee
 
Elementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization ProblemsElementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization Problemsjfrchicanog
 
Scale and object aware image retargeting for thumbnail browsing
Scale and object aware image retargeting for thumbnail browsingScale and object aware image retargeting for thumbnail browsing
Scale and object aware image retargeting for thumbnail browsingperillaroc
 
Elementary Landscape Decomposition of the Quadratic Assignment Problem
Elementary Landscape Decomposition of the Quadratic Assignment ProblemElementary Landscape Decomposition of the Quadratic Assignment Problem
Elementary Landscape Decomposition of the Quadratic Assignment Problemjfrchicanog
 
Computer Science and Information Science 3rd semester (2012-December) Questio...
Computer Science and Information Science 3rd semester (2012-December) Questio...Computer Science and Information Science 3rd semester (2012-December) Questio...
Computer Science and Information Science 3rd semester (2012-December) Questio...B G S Institute of Technolgy
 
Indices and standard form
Indices and standard formIndices and standard form
Indices and standard formmasboby
 
Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture" Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture" ieee_cis_cyprus
 

Tendances (17)

Journey to structure from motion
Journey to structure from motionJourney to structure from motion
Journey to structure from motion
 
NIPS2008: tutorial: statistical models of visual images
NIPS2008: tutorial: statistical models of visual imagesNIPS2008: tutorial: statistical models of visual images
NIPS2008: tutorial: statistical models of visual images
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Test
TestTest
Test
 
Mo u quantified
Mo u   quantifiedMo u   quantified
Mo u quantified
 
Bouguet's MatLab Camera Calibration Toolbox for Stereo Camera
Bouguet's MatLab Camera Calibration Toolbox for Stereo CameraBouguet's MatLab Camera Calibration Toolbox for Stereo Camera
Bouguet's MatLab Camera Calibration Toolbox for Stereo Camera
 
Camera parameters
Camera parametersCamera parameters
Camera parameters
 
Elementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization ProblemsElementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization Problems
 
Structured regression for efficient object detection
Structured regression for efficient object detectionStructured regression for efficient object detection
Structured regression for efficient object detection
 
Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009
 
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
 
Elementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization ProblemsElementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization Problems
 
Scale and object aware image retargeting for thumbnail browsing
Scale and object aware image retargeting for thumbnail browsingScale and object aware image retargeting for thumbnail browsing
Scale and object aware image retargeting for thumbnail browsing
 
Elementary Landscape Decomposition of the Quadratic Assignment Problem
Elementary Landscape Decomposition of the Quadratic Assignment ProblemElementary Landscape Decomposition of the Quadratic Assignment Problem
Elementary Landscape Decomposition of the Quadratic Assignment Problem
 
Computer Science and Information Science 3rd semester (2012-December) Questio...
Computer Science and Information Science 3rd semester (2012-December) Questio...Computer Science and Information Science 3rd semester (2012-December) Questio...
Computer Science and Information Science 3rd semester (2012-December) Questio...
 
Indices and standard form
Indices and standard formIndices and standard form
Indices and standard form
 
Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture" Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture"
 

En vedette

Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluationzukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statisticszukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Informationzukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVzukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibrationzukun
 
Template Matching - Pattern Recognition
Template Matching - Pattern RecognitionTemplate Matching - Pattern Recognition
Template Matching - Pattern RecognitionMustafa Salam
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionzukun
 

En vedette (7)

Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Template Matching - Pattern Recognition
Template Matching - Pattern RecognitionTemplate Matching - Pattern Recognition
Template Matching - Pattern Recognition
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 

Similaire à Modern features-part-3-software

7.curves Further Mathematics Zimbabwe Zimsec Cambridge
7.curves   Further Mathematics Zimbabwe Zimsec Cambridge7.curves   Further Mathematics Zimbabwe Zimsec Cambridge
7.curves Further Mathematics Zimbabwe Zimsec Cambridgealproelearning
 
Svm map reduce_slides
Svm map reduce_slidesSvm map reduce_slides
Svm map reduce_slidesSara Asher
 
Epsrcws08 campbell isvm_01
Epsrcws08 campbell isvm_01Epsrcws08 campbell isvm_01
Epsrcws08 campbell isvm_01Cheng Feng
 
MLIP - Chapter 4 - Image classification and CNNs
MLIP - Chapter 4 - Image classification and CNNsMLIP - Chapter 4 - Image classification and CNNs
MLIP - Chapter 4 - Image classification and CNNsCharles Deledalle
 
Object Detection with Discrmininatively Trained Part based Models
Object Detection with Discrmininatively Trained Part based ModelsObject Detection with Discrmininatively Trained Part based Models
Object Detection with Discrmininatively Trained Part based Modelszukun
 
Intro matlab and convolution islam
Intro matlab and convolution islamIntro matlab and convolution islam
Intro matlab and convolution islamIslam Alabbasy
 
Generic Image Processing With Climb - Slides
Generic Image Processing With Climb - SlidesGeneric Image Processing With Climb - Slides
Generic Image Processing With Climb - SlidesLaurent Senta
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cgharinipriya1994
 
5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!A Jorge Garcia
 
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...Beniamino Murgante
 
The H.264 Integer Transform
The H.264 Integer TransformThe H.264 Integer Transform
The H.264 Integer TransformIain Richardson
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9fungfung Chen
 
Matlab intro
Matlab introMatlab intro
Matlab introfvijayami
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbitjakehofman
 

Similaire à Modern features-part-3-software (20)

7.curves Further Mathematics Zimbabwe Zimsec Cambridge
7.curves   Further Mathematics Zimbabwe Zimsec Cambridge7.curves   Further Mathematics Zimbabwe Zimsec Cambridge
7.curves Further Mathematics Zimbabwe Zimsec Cambridge
 
Svm map reduce_slides
Svm map reduce_slidesSvm map reduce_slides
Svm map reduce_slides
 
Simplex3
Simplex3Simplex3
Simplex3
 
Epsrcws08 campbell isvm_01
Epsrcws08 campbell isvm_01Epsrcws08 campbell isvm_01
Epsrcws08 campbell isvm_01
 
MLIP - Chapter 4 - Image classification and CNNs
MLIP - Chapter 4 - Image classification and CNNsMLIP - Chapter 4 - Image classification and CNNs
MLIP - Chapter 4 - Image classification and CNNs
 
Lec2
Lec2Lec2
Lec2
 
Object Detection with Discrmininatively Trained Part based Models
Object Detection with Discrmininatively Trained Part based ModelsObject Detection with Discrmininatively Trained Part based Models
Object Detection with Discrmininatively Trained Part based Models
 
Intro matlab and convolution islam
Intro matlab and convolution islamIntro matlab and convolution islam
Intro matlab and convolution islam
 
Higham
HighamHigham
Higham
 
Generic Image Processing With Climb - Slides
Generic Image Processing With Climb - SlidesGeneric Image Processing With Climb - Slides
Generic Image Processing With Climb - Slides
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
 
5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!5HBC: How to Graph Implicit Relations Intro Packet!
5HBC: How to Graph Implicit Relations Intro Packet!
 
MATLABgraphPlotting.pptx
MATLABgraphPlotting.pptxMATLABgraphPlotting.pptx
MATLABgraphPlotting.pptx
 
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
 
The H.264 Integer Transform
The H.264 Integer TransformThe H.264 Integer Transform
The H.264 Integer Transform
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
Week6.ppt
Week6.pptWeek6.ppt
Week6.ppt
 
1533 game mathematics
1533 game mathematics1533 game mathematics
1533 game mathematics
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbit
 

Plus de zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009zukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-introzukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video searchzukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video searchzukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learningzukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionzukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick startzukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysiszukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structureszukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities zukun
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featureszukun
 
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...zukun
 
Quoc le tera-scale deep learning
Quoc le   tera-scale deep learningQuoc le   tera-scale deep learning
Quoc le tera-scale deep learningzukun
 
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...zukun
 
Lecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learningLecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learningzukun
 
Lecun 20060816-ciar-02-deep learning for generic object recognition
Lecun 20060816-ciar-02-deep learning for generic object recognitionLecun 20060816-ciar-02-deep learning for generic object recognition
Lecun 20060816-ciar-02-deep learning for generic object recognitionzukun
 
P05 deep boltzmann machines cvpr2012 deep learning methods for vision
P05 deep boltzmann machines cvpr2012 deep learning methods for visionP05 deep boltzmann machines cvpr2012 deep learning methods for vision
P05 deep boltzmann machines cvpr2012 deep learning methods for visionzukun
 
P06 motion and video cvpr2012 deep learning methods for vision
P06 motion and video cvpr2012 deep learning methods for visionP06 motion and video cvpr2012 deep learning methods for vision
P06 motion and video cvpr2012 deep learning methods for visionzukun
 
P04 restricted boltzmann machines cvpr2012 deep learning methods for vision
P04 restricted boltzmann machines cvpr2012 deep learning methods for visionP04 restricted boltzmann machines cvpr2012 deep learning methods for vision
P04 restricted boltzmann machines cvpr2012 deep learning methods for visionzukun
 

Plus de zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant features
 
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
 
Quoc le tera-scale deep learning
Quoc le   tera-scale deep learningQuoc le   tera-scale deep learning
Quoc le tera-scale deep learning
 
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
 
Lecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learningLecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learning
 
Lecun 20060816-ciar-02-deep learning for generic object recognition
Lecun 20060816-ciar-02-deep learning for generic object recognitionLecun 20060816-ciar-02-deep learning for generic object recognition
Lecun 20060816-ciar-02-deep learning for generic object recognition
 
P05 deep boltzmann machines cvpr2012 deep learning methods for vision
P05 deep boltzmann machines cvpr2012 deep learning methods for visionP05 deep boltzmann machines cvpr2012 deep learning methods for vision
P05 deep boltzmann machines cvpr2012 deep learning methods for vision
 
P06 motion and video cvpr2012 deep learning methods for vision
P06 motion and video cvpr2012 deep learning methods for visionP06 motion and video cvpr2012 deep learning methods for vision
P06 motion and video cvpr2012 deep learning methods for vision
 
P04 restricted boltzmann machines cvpr2012 deep learning methods for vision
P04 restricted boltzmann machines cvpr2012 deep learning methods for visionP04 restricted boltzmann machines cvpr2012 deep learning methods for vision
P04 restricted boltzmann machines cvpr2012 deep learning methods for vision
 

Modern features-part-3-software

  • 1. Software Feature implementation and computation Andrea Vedaldi, University of Oxford https://sites.google.com/site/eccv12features/ goo.gl/jKC2J
  • 2. 2 VLFeat MATLAB ease of use Covariant detectors, MSER, SIFT, etc ... OpenCV One-shop experience The most popular vision library Others There is certainly no lack of software!
  • 3. 3 VLFeat MATLAB ease of use Covariant detectors, MSER, SIFT, etc ... OpenCV One-shop experience The most popular vision library Others There is certainly no lack of software!
  • 4. VLFeat 4 An open and portable library of CV software http://www.vlfeat.org/benchmarks/index.html Quick Start with MATLAB >>"untar"http://www.vlfeat.org/download/vlfeat50.9.165bin.tar.gz" >>"run vlfeat-0.9.16/toolbox/vl_setup Mac Linux Windows Since 2008 ACM OSS award
  • 5. SIFT detector and descriptor 5 1. load an image imPath = fullfile(‘oxford.jpg’) ; im = imread(imPath) ; 2. convert it to single precision gray scale imgs = im2single(rgb2gray(im)) ; 3. run SIFT [frames, descrs] = vl_sift(imgs) ; 4. visualise keypoints imagesc(im) ; colormap gray; hold on ; vl_plotframe(frames) ; 5. visualise descriptors vl_plotsiftdescriptor(... descrs(:,432), frames(:,432)) ;
  • 6. Example: matching features 6 684 tentative matches nr : :h f t :a r / /h f t /a r h f t : /a
  • 7. Example: stitching 7 684 tentative matches 492 (76%) inliers mosaic • Live demonstration
  • 8. Other covariant detectors 8 frames = vl_covdet(imgs, 'verbose') ; imagesc(im) ; vl_plotframes(frames) ; Do not forget to convert the images to grayscale in single precision. Use im2single(im) and not single(im) !
  • 9. Understanding feature frames 9 x     x a11 a12 b x t1 affine tf. = + 1 y a21 a22 b y t2 b x b y y • frames has a feature frame for each column containing a stacked affine transformation (A,T) 2 3 t1 6 t2 7 6 7     6a11 7 x a11 a12 b x t1 frames(:,i) = 6 6a21 7 7 = + 6 7 y a21 a22 b y t2 4a12 5 a22
  • 10. A frame as an oriented ellipse 10 reference = two vectors uniquely identifies the affine 1 transformation b x b y reference = oriented ellipse
  • 11. Different cornerness measures 11 frames = vl_covdet(imgs, 'method', 'Hessian') ; DoG Hessian • Difference of Gaussian (Laplacian, trace of Hessian, or SIFT) • Hessian (determinant of) HarrisLaplace HessianLaplace
  • 12. Different cornerness measures 12 frames = vl_covdet(imgs, 'method', 'HarrisLaplace') ; HarrisLaplace HessianLaplace • Harris Laplace (Harris cornerness, Laplacian for scale selection) • Hessian Laplace MultiscaleHarris MultiscaleHessian
  • 13. Different cornerness measures 13 frames = vl_covdet(imgs, 'method', 'MultiscaleHarris') ; MultiscaleHarris MultiscaleHessian • Multiscale Harris (just a bunch of Harris) • Multiscale Hessian
  • 14. Affine adaptation 14 frames = vl_covdet(imgs, 'EstimateAffineShape', true) ;
  • 15. Upright features 15 By default the rotation is selected so that the vertical axis stays vertical. In formulas     x a11 0 b x t1 = + y a21 a22 b y t2 Remark: for general affine transformations the horizontal direction may appear rotated even for upright features.
  • 16. Orientation detection 16 frames = vl_covdet(imgs, 'EstimateOrientations', true) ;
  • 17. Computing descriptors 17 [frames, descrs] = vl_covdet(imgs) ; • Each column of descrs is a stacked SIFT descriptor • How is a SIFT descriptor associated to a feature? • What about other descriptors?
  • 18. Computing descriptors 18 [frames, descrs] = vl_covdet(imgs, 'Descriptor', 'patch') ; Each column of descrs is a stacked normalised image patch.
  • 19. The geometry of an normalised patch 19 • Normalisation and patch resampling is controlled by three parameters: (antialiasing effect) affine tf. (size of patch in normalised units) (number of pixels)
  • 20. Example: normalised patch for SIFT 20 =1 1 3 6 f v w = 15
  • 21. Custom frames 21 Example: running affine adaptation on a grid frames = vl_covdet(imgs, ... 'Frames', frames, ... 'EstimateAffineShape', true, ... 'EstiamteOrientation', true) ;
  • 22. Obtaining additional information on the features 22 [frames, descrs, info] = vl_covdet(imgs); info = gss: [1x1 struct] css: [1x1 struct] peakScores: [1x351 single] edgeScores: [1x351 single] orientationScores: [1x351 single] laplacianScaleScores: [1x351 single] 120 120 100 100 80 80 Occurences Occurences 60 60 40 40 20 20 0 0 −0.1 −0.05 0 0.05 0.1 0 2 4 6 8 10 Peak Score Edge Score
  • 23. Obtaining the scale space 23 [frames, descrs, info] = vl_covdet(imgs); info = gss: [1x1 struct] Gaussian css: [1x1 struct] scale space peakScores: [1x351 single] edgeScores: [1x351 single] orientationScores: [1x351 single] laplacianScaleScores: [1x351 single] octave −1 octave 0 octave 1 octave 2 octave 3
  • 24. Obtaining the scale space 24 [frames, descrs, info] = vl_covdet(imgs); info = gss: [1x1 struct] cornerness css: [1x1 struct] measure peakScores: [1x351 single] edgeScores: [1x351 single] orientationScores: [1x351 single] laplacianScaleScores: [1x351 single] octave −1 octave 0 octave 1 octave 2 octave 3
  • 25. Performance comparison 25 Oxford 5K lite retrieval benchmark Num. features / image mAP VL HessianLaplace (double) VL HessianLaplace (double) 7131 79.9% VL DoG (double) 5631 DoG (double) VL 85.1% VL Hessian (double) 3411 VL Hessian (double) 77.8% VL DoG (no aff) 2794 VL DoG (no aff) 74.0% VL HarrisLaplace (double) 2316 VL HarrisLaplace (double) 77.8% CMP Hessian 2292 CMP Hessian 77.1% VL HessianLaplace 2020 VL HessianLaplace 73.8% VL DoG 1854 VL DoG 80.1% VGG hes 1517 VGG hes 74.6% VGG har 1384 VGG har 71.9% VL Hessian 1089 VL Hessian 68.7% VL HarrisLaplace 765 VL HarrisLaplace 70.4% 0 2000 4000 6000 8000 0.6500 0.7125 0.7750 0.8375 0.9000
  • 26. Repeatability: viewpoint 26 Repeatability (graf) 100 VL DoG VL Hessian 90 VL HessianLaplace VL HarrisLaplace 80 VL DoG (double) VL Hessian (double) 70 VL HessianLaplace (double) Repeatability (graf) VL HarrisLaplace (double) 60 VLFeat SIFT CMP Hessian 50 VGG hes VGG har 40 30 20 10 0 30 40 50 60 20 Viewpoint angle
  • 27. Repeatability: viewpoint 27 Repeatability (wall) 100 VL DoG VL Hessian 90 VL HessianLaplace VL HarrisLaplace 80 VL DoG (double) VL Hessian (double) 70 VL HessianLaplace (double) Repeatability (wall) VL HarrisLaplace (double) 60 VLFeat SIFT CMP Hessian 50 VGG hes VGG har 40 30 20 10 0 30 40 50 60 20 Viewpoint angle
  • 28. Repeatability: scale 28 Repeatability (boat) 100 VL DoG VL Hessian 90 VL HessianLaplace VL HarrisLaplace 80 VL DoG (double) VL Hessian (double) 70 VL HessianLaplace (double) Repeatability (boat) VL HarrisLaplace (double) 60 VLFeat SIFT CMP Hessian 50 VGG hes VGG har 40 30 20 10 0 1.38 1.9 2.35 2.8 1.12 Scale changes
  • 29. Repeatability: JPEG compression 29 Repeatability (ubc) 100 VL DoG VL Hessian 90 VL HessianLaplace VL HarrisLaplace 80 VL DoG (double) VL Hessian (double) 70 VL HessianLaplace (double) Repeatability (ubc) VL HarrisLaplace (double) 60 VLFeat SIFT CMP Hessian 50 VGG hes VGG har 40 30 20 10 0 80 90 95 98 60 JPEG compression %
  • 30. Maximally Stable Extremal Regions (MSER) 30 [Matas et al. 2002] • Extracts MSER regions regions and fitted ellipses frames: imgs = uint8(rgb2gray(I)) ; [regions,"frames]"="vl_mser(imgs)"; • Control region stability: [regions,"frames]"="vl_mser(imgs,"... """"""""""""""""""""""""""""‘MinDiversity’,"0.7,"... """"""""""""""""""""""""""""‘MaxVariation’,"0.2,"... """"""""""""""""""""""""""""‘Delta’,"10)";
  • 31. Many other features and tools 31 superpixels MSER agglomerative information bottleneck distance transform di erent mode seeking algo- sent (some of) the data points nal to the Parzen density esti- wards the mode approximately ates mean shift trajectories by xt and in Fig. 2, medoid shifts circles. This disconnects por- alleviated (but not solved) by ect. 3) seeks the energy modes s, trading-o mode over- and randomized kd-trees fast k-means feature maps, stochastic gradient SVM s, where d is the dimension- is only O(dN 2 T ), where T Fast Dense SIFT lever implementations yield
  • 32. Many other features and tools 32 SLIC superpixels Histogram of Oriented Gradients (HOG) HARVEST Programme New SGD Learning of SVMs
  • 33. OpenCV 33 • The largest, best known vision library • Features - OpenCV 2.1: Harris, Tomasi&Shi, MSER, DoG, SURF, STAR and FAST, DoG + SIFT, SURF, HARRIS, GoodFeaturesToTrack - OpenCV 2.4: ORB, BRIEF, and FREAK Example: computing ORB features. #include <opencv2/core/core.hpp> #include <opencv2/features2d/features2d.hpp> #include <vector> Mat image = importImage8UC1(in[IN_I]); Mat descriptors; std::vector<KeyPoint> frames; ORB orb(numFeatures, scaleFactor, numLevels, edgeThreshold, 0, wtak, scoreTypeToORBPar(scoreType), patchSize); orb(image, Mat(), frames);
  • 34. This is not all folks 34 • Abundance of open source / free software for CV - Always check out authors home pages • Examples Rob Hess SIFT SURF http://robwhess.github.com/opensift/ http://www.vision.ee.ethz.ch/~surf/ Open SURF http://www.chrisevansdev.com/computer-vision-opensurf.html FAST corners http://www.edwardrosten.com/work/fast.html LIOP descriptors http://vision.ia.ac.cn/Students/bfan/index.htm ...
  • 35. Credits 35 Karel Lenc Daniele Perrone Michal Perdoch HARVEST Programme Krystian Mikolajczyk Tinne Tuytelaars Jiri Matas Cordelia Schmid Andrew Zisserman