Elamur Research

GMS: Grid-Based Motion Statistics for Fast, Ultra-Robust Feature Correspondence

Paper · 2017 · Jia-Wang Bian, Wen-Yan Lin, Yasuyuki Matsushita et al.

Summary

When a camera sees the same scene from different positions, a computer can try to recover the relationship between the views by finding points that appear in both images. The first pass usually compares small patches around distinctive points. That gives a list of proposed matches, but similar-looking patches can belong to different parts of the scene. A list with too many of these mistakes can defeat the geometric estimation that follows. Grid-Based Motion Statistics, or GMS, filters the list by looking at where the proposed matches begin and end. Its starting observation is that points close together in an image often lie on the same surface or object. When the matches are correct, points that start near each other therefore frequently arrive near each other in the other image.

GMS puts a grid over each image and counts matches between cells. For each cell in the first image, it tests the destination cell with the most matches. The test also counts matches in surrounding cell pairs whose positions agree with the proposed local movement. A concentrated group of matches has to provide enough support for the size of its neighborhood before GMS keeps the group. This creates a way to use plentiful features even when individual matches are ambiguous. Counting by cell avoids comparing every match with every other match. On Graffiti, the basic filter took about 2 ms on a single CPU thread at a feature budget of 50, 000. The expanded version also tries different grid sizes and neighborhood orientations for images that differ substantially in scale or rotation.

The experiments distinguish recovering plausible matches from recovering coordinates accurate enough to estimate geometry. On Graffiti and Wall, dense ASIFT features gave GMS more evidence to work with, while filtering by Lowe’s ratio test before GMS helped when using sparser SIFT features. The ratio test uses a feature’s best and next-best appearance matches to judge how distinctive the best choice is. On the wide-baseline Community Photo Collection benchmark, adding GMS after the SIFT ratio test raised fundamental-matrix estimation recall from 29.20 to 43.00. This metric is the percentage of image pairs for which the estimated geometry passed the benchmark’s error threshold. CODE, a more computationally expensive system with a different feature pipeline, reached 51.00 on the same dataset.

The expanded study also changed the matching stage in the monocular ORB-SLAM initializer. Its version used brute-force appearance matching followed by GMS and initialized successfully more often, reached its first successful initialization earlier, and produced more initial three-dimensional points on the tested KITTI fragments. Across these experiments, GMS serves as a fast way to prepare correspondences for a geometric estimator. Its evidence remains local. Repeated structures can attract groups of false matches, object boundaries can break the assumption of similar movement, and a match can land in the right grid cells while still being too far from its true position.

Deep dive: GMS: Grid-Based Motion Statistics for Fast, Ultra-Robust Feature Correspondence

Grid-Based Motion Statistics filters image feature matches by counting nearby agreements, improving the correspondences used to estimate camera geometry. · about 38 minutes to read

The problem and its context

From similar patches to the same scene point

A feature detector chooses image locations that can be described and searched for in another view. A feature descriptor summarizes the appearance around each location. A matcher compares descriptors and proposes pairs of points, called correspondences. If both points depict the same location in the world, the correspondence is correct. The distinction matters because the matcher has access to image measurements, while correctness concerns the scene that produced them. Patches around different windows, for instance, can be similar enough in appearance that a descriptor comparison proposes a connection between them.

Feature matching is an early step in structure from motion, which reconstructs scene structure and camera positions from images, and in visual simultaneous localization and mapping, or visual SLAM, which tracks a camera while building a map. Both uses give consequences to early matching mistakes. A reconstruction may rely on the proposed pairs to determine how views relate. A monocular SLAM system has to establish an initial map from views taken by a single camera before routine tracking and mapping can proceed. This involves triangulation, where corresponding image points help recover the position of a scene point in three dimensions. A correspondence to a different physical point gives that calculation the wrong observations.

The authors place GMS between appearance matching and the geometric estimation that depends on it. This placement is central to the paper. The input already contains proposed pairs, and the filter uses their coordinates to judge whether neighboring pairs lend each other support. A downstream algorithm then estimates the geometry. The quality of a correspondence can matter at both stages for different reasons. A false correspondence connects different scene points. A geometric outlier is a pair that fails to agree with a particular geometric explanation. A correct match on a moving object can be an outlier when estimating the geometry of a stationary scene. The correct image positions of the moving object may also constitute a coherent local group, so there is a reason a local screen could keep them.

In the pipeline the paper describes, RANSAC is a common approach for dealing with outliers during geometric fitting. It tries candidate geometric explanations from samples of the available correspondences and looks for agreement in the larger set. If false matches dominate the input, the estimator can have difficulty finding a sample that yields good geometry. GMS changes the evidence available to that search by removing many proposals before fitting begins. The geometric estimator can then use the surviving pairs to recover a relationship between the views and identify the points that agree with it.

How earlier filters used appearance and spatial arrangement

Lowe’s ratio test, abbreviated RT, screens proposals using descriptor distances. A nearest neighbor is the candidate in the other image with the closest descriptor under the chosen distance measure. The ratio test considers how close that candidate is relative to the next one. Two similarly good choices give weaker evidence for a unique match than a clear separation between them. This is a useful appearance test when the initial matcher can find a plausible candidate in several places. It evaluates that ambiguity for the feature in question, independently of whether other nearby features point to a consistent destination.

The paper gives an example in which ORB features still produce a noisy collection of matches after the ratio test. This motivates examining a different source of evidence. A correspondence that looks distinctive can be spatially isolated from other proposals. Conversely, a candidate with several plausible lookalikes might belong to a group whose links between the images are mutually consistent. GMS asks whether the proposed location agrees with what other nearby links suggest. That makes its evidence complementary to descriptor distinctiveness and explains why the experiments consider both orders of dependence on appearance evidence, with GMS either receiving the initial matches or operating on the set that has already passed RT.

The paper’s related-work discussion describes several ways of using more than descriptor distance. KVLD brings appearance and geometric constraints into the selection process. Vector field consensus, or VFC, treats the proposed links as evidence about a field of displacements between the point sets and seeks a set consistent with that field. CODE is the immediate inspiration for using motion smoothness. Its procedure reasons about coherence globally through nonlinear optimization. The GMS paper asks how much of the benefit of spatial agreement can be obtained from local counts. This matters when correspondence selection sits inside a system that has to run repeatedly as new images arrive.

The expanded study also discusses locality preserving matching, or LPM, and learning-based correspondence selection, or LC. LPM examines the structure of neighborhoods surrounding feature points. The authors characterize its assumptions about that structure as more restrictive than theirs. LC uses a trained neural network in conjunction with an essential matrix, a description of the geometric relation between views. The GMS paper reports that the LC authors favored using their method to select correspondences and then applying RANSAC for the fit. These related approaches illustrate the range of information a filter might use, from descriptor ambiguity to a local arrangement of points or a larger geometric relationship.

The design pressure from speed

There is a straightforward way to test the observation behind GMS. For each candidate, find every other match whose first endpoint is nearby and check how many second endpoints are nearby as well. This already poses a computational problem. If the procedure explicitly compares all pairs of candidates, the work grows quadratically with their number. The statistical argument in the paper, however, gives a reason to supply more features. A method that benefits from larger neighborhoods yet becomes expensive when it sees more proposals would have limited use in the setting the authors have in mind.

The grid changes the operation being repeated. Instead of separately asking each candidate which other candidates are close, the method assigns endpoints to cells and asks how many links connect each pair of cells. All candidates with the same pair of cells can then contribute to a shared test. This introduces an approximation to spatial proximity and makes the computation cheap enough to exploit the larger input. The design question shifts from finding a precise distance neighborhood for every point to choosing how to pool cells without losing too much spatial resolution.

The conference paper introduced GMS in 2017. The expanded journal study identifies scale and rotation enhancements, broader tests, and a real-time application among its additions. These extensions matter to the interpretation of the experiments. A fast count for nearby viewpoints addresses a narrower problem than applying that count when a neighborhood has changed orientation or apparent size. The broader evaluations examine what happens when the basic filter is adapted for those settings and when its output is used for geometry or initialization.

The method, step by step

The evidence behind a match

Suppose a group of nearby points in the first image lies on the same rigid structure. When that structure appears in the second image, a correctly matched point will frequently have company. Other features from its neighborhood should have matches in the same part of the second image. The new image positions can differ considerably from their original positions. What matters is that the endpoints of nearby correct links remain near each other. GMS calls the count of neighbors satisfying that condition the candidate’s motion support. Motion here refers to the apparent change in image coordinates between the views. It can arise from a change in the camera’s position or orientation.

A false proposal can still happen to land near other proposed destinations. The method relies on a difference in how often this happens. Consider a point whose descriptor has been matched to an unrelated patch elsewhere in the second image. Neighbors of the source point may have plausible descriptors at different destinations, so there may be few links nearby at both ends. When the source and destination are corresponding neighborhoods, the same test is more likely to find agreement. In either case the evidence comes from the arrangement of proposals the matcher supplied for that pair of images.

There are two nested questions in the original distance-based definition. Which proposals start close to the candidate? Among those, which also finish close to it? This order matters because the first set is the pool of opportunities for support. A count that looks persuasive in a sparse region may occur by chance in a region with far more proposals. The method therefore uses the number of source neighbors to set the support required for a positive decision.

How GMS filters candidate correspondences

The steps in order.

How GMS filters candidate correspondencesStep 1: Generate and optionally ratio-test appearance matches1. Generate and optionally ratio-test appearance matchesStep 2: Place a grid over each image2. Place a grid over each imageStep 3: Count candidate links between cell pairs3. Count candidate links between cell pairsStep 4: Choose each source cell’s busiest destination4. Choose each source cell’s busiest destinationStep 5: Count support across aligned neighboring cells5. Count support across aligned neighboring cellsStep 6: Keep central pairs whose support clears the threshold6. Keep central pairs whose support clears the thresholdStep 7: Repeat with shifted source grid positions7. Repeat with shifted source grid positionsStep 8: Compare scale or rotation settings when enabled8. Compare scale or rotation settings when enabled

Defining neighbors and support

The authors first define support without a grid. Let C be the set of proposed correspondences between images I₁ and I₂. A member cᵢ links point pᵢ in I₁ to point qᵢ in I₂. The neighbors of cᵢ are defined by the first endpoint.

Nᵢ = {cⱼ | cⱼ ∈ C, cⱼ ≠ cᵢ, d(pᵢ, pⱼ) < r₁}

Nᵢ is the neighbor set for candidate i, and i and j index correspondences. C is the input set and cⱼ is a proposed match in it. The vertical bar in the set reads as “such that,” ∈ means membership, and ≠ excludes the candidate itself. The function d gives the Euclidean distance in image coordinates between pᵢ and pⱼ, which are the first endpoints of cᵢ and cⱼ. The cutoff r₁ sets how near the points have to be in I₁, with < requiring a distance strictly below it.

The supporting set imposes the other image’s distance condition on those source neighbors.

Sᵢ = {cⱼ | cⱼ ∈ Nᵢ, d(qᵢ, qⱼ) < r₂}

Sᵢ is the set of similar neighbors of candidate i. The index j again identifies a proposed correspondence cⱼ. Membership in Nᵢ supplies the source-image condition. The points qᵢ and qⱼ are its destination endpoints in I₂, d is their Euclidean distance, and r₂ is the distance cutoff in that image. As before, the bar introduces the membership conditions and < makes the comparison strict. The support is |Sᵢ|, where the bars around a set denote its number of members.

The two cutoffs express different measurements. A candidate starting close to the reference point but ending far from its proposed partner belongs to the first set and contributes no support. A candidate ending close to that partner but starting far away does not enter the first set. Only a link whose endpoints pass both proximity tests contributes. Excluding the reference match ensures the count represents agreement from other candidates.

Why more neighbors can make a difference

The probability argument treats each source neighbor as a trial that can either supply support or fail to supply it. The authors use one support probability when the reference candidate is true and another when it is false. The symbol ε below names the latter probability.

|Sᵢ| ∼ { B(|Nᵢ|, t)  if cᵢ is correct
        { B(|Nᵢ|, ε)  if cᵢ is wrong

The count |Sᵢ| is the support for match cᵢ, and ∼ means that the count is treated as following the distribution shown for its case. B is a binomial distribution, with trial count |Nᵢ|, the size of the source neighborhood, and a probability of success per trial. The probability t describes support for a correct reference match, and ε describes support for a wrong one. The braces group the two cases. For the binomial argument, a trial succeeds when a source neighbor also agrees in the destination image. The distribution describes support using a common probability within a case and effectively treats the trials as independent.

The paper connects t to the quality of the input features. If a proposed reference link is correct and nearby scene points move together in image coordinates, the proportion of those neighbors with correct matches helps determine how frequently their links will support it. For a wrong reference link, support requires a neighbor to end near a destination that is already wrong. The authors expect this to be infrequent when errors are dispersed. Repeated architectural elements give a reason for ε to rise. A collection of adjacent source points can all have plausible lookalikes in another part of the image. The analysis takes t to be larger than ε.

The conditional expectations express how many supporting neighbors the authors would expect to count in each case.

E[|Sᵢ|] = { Eₜ = |Nᵢ| · t  if cᵢ is correct
          { Eբ = |Nᵢ| · ε  if cᵢ is wrong

E denotes expectation and the square brackets surround the count being averaged. Eₜ and Eբ denote the expected counts for true and false reference matches, respectively. The index i identifies cᵢ and its sets Sᵢ and Nᵢ. The bars give the set sizes, t and ε are the corresponding support probabilities, and the centered dot means multiplication. The cases apply to a neighborhood of the same size, so the expected counts differ because the probabilities differ.

The spread around those expectations also matters. A count can fall below or above its expectation, and values observed in the two cases can overlap. The conditional variances in the paper are the binomial variances.

V[|Sᵢ|] = { Vₜ = |Nᵢ| · t · (1 − t)  if cᵢ is correct
          { Vբ = |Nᵢ| · ε · (1 − ε)  if cᵢ is wrong

V denotes variance, with Vₜ and Vբ giving the cases for correct and wrong cᵢ. Its supporting and candidate neighborhoods are Sᵢ and Nᵢ, with their sizes indicated by bars. The symbols t and ε again give the probability of support. The number 1 represents total probability, so subtracting the corresponding support probability gives the probability of failing to support the candidate. The centered dots multiply the neighborhood size, the success probability, and its complement.

To describe how well the two cases separate, the paper compares the distance between their expected counts with the combined width given by their standard deviations.

P = |Eₜ − Eբ| / (√Vₜ + √Vբ)

P is the authors’ partitionability measure. Eₜ and Eբ are the true- and false-match expectations. The surrounding bars give the absolute value of their difference. Vₜ and Vբ are the corresponding variances. Each square root gives a standard deviation, the plus sign adds those standard deviations, and the slash divides the difference in expectations by their sum. P describes distributional separation. The filter itself uses the observed count and a threshold.

Substituting the binomial expressions shows the role of neighborhood size directly.

P = √|Nᵢ| · (t − ε) / (√(t · (1 − t)) + √(ε · (1 − ε)))

Here |Nᵢ| is the number of source neighbors for the reference correspondence indexed by i. The probabilities t and ε apply when that correspondence is true and false, respectively. The expression uses the paper’s assumption that t exceeds ε, so their difference is positive. The centered dots multiply the terms, the square roots in the denominator apply to the probability products, and the slash divides the entire numerator by their sum. The denominator depends on the probabilities. With those fixed, the square root of the neighborhood size supplies the growth in separation.

In plain terms, gathering more neighbors can make a modest difference in support probability easier to see. The expected gap between the counts grows with the number of trials, while the spread measured in standard deviations grows more slowly. The paper also predicts better separation from stronger input correspondences, which can raise the support probability for a correct match. This gives two routes to improving the evidence. One is to find more features in a neighborhood. The other is to improve the quality of their proposals. The experiments revisit both routes.

Turning support into a decision

The filter applies a strict threshold to the support count.

cᵢ ∈ { T  if |Sᵢ| > τᵢ
     { F  otherwise

The candidate cᵢ is assigned to T, the set classified as true, or F, the set classified as false. Membership is denoted by ∈, and the brace indicates the two cases. The count |Sᵢ| is compared with τᵢ, the threshold for candidate i. The greater-than sign means equality follows the “otherwise” case. These are the filter’s assignments. Ground truth in the experiments is determined separately.

The threshold scales with the square root of the source neighborhood size.

τᵢ = α · √|Nᵢ|

The symbol τᵢ is the required support level for cᵢ, |Nᵢ| counts its source-image neighbors, and the square root acts on that count. The multiplier α is an empirical setting, with the centered dot indicating multiplication. The authors report finding useful settings from 4 to 6 and use 4 in their implementation. The separation argument motivates the form of this rule. The implementation chooses the multiplier empirically, without needing estimated values for t and ε for each test pair.

Replacing many distance checks with cell counts

In a direct implementation, finding the support for a candidate by scanning the full input takes work proportional to the number of candidates. Repeating that scan for each candidate gives O(N²), where N is the size of C and O expresses the growth of the work with input size. The paper describes approximate nearest-neighbor search as a way to reduce this to O(N log(N)), where log is the logarithm. It puts the work of its grid-based alternative at O(N), using a fixed grid setting for the comparison. The grid turns many individual searches into a pass that assigns endpoints to cells and accumulates counts.

Let G₁ and G₂ be the grids laid over the first and second images. Their cells do not overlap within a given placement. For a match starting in Gₐ in the first grid and ending in Gᵦ in the second, the basic cell definition takes source neighbors from Gₐ.

Nᵢ = {cⱼ | cⱼ ∈ Cₐ, cᵢ ≠ cⱼ}

Nᵢ is the grid-based neighbor set for cᵢ. The set Cₐ contains the candidate matches whose first endpoint falls in source cell Gₐ. The indices i and j label correspondences, the bar introduces the conditions, ∈ requires cⱼ to belong to Cₐ, and ≠ prevents the reference correspondence from counting as its own neighbor. Every candidate in the same source cell has the same number of neighbors under this rule.

The analogous rule for similar neighbors requires both endpoints to fall in the reference cells.

Sᵢ = {cⱼ | cⱼ ∈ Cₐᵦ, cᵢ ≠ cⱼ}

Sᵢ contains supporting candidates for cᵢ. The set Cₐᵦ consists of matches from Gₐ to Gᵦ. A candidate cⱼ belongs to Sᵢ if it is a member of Cₐᵦ and differs from cᵢ, as indicated by ∈ and ≠ to the right of the bar. With the reference candidate removed, all links from the same source cell to the same destination cell share the same support count. The algorithm can therefore decide at the level of a cell pair and apply that decision to all of its matches.

For each source cell, the authors test the destination cell that receives the largest number of proposals from it. Other destinations for that source cell are left out of the test for that grid placement. This is an early selection by central cell count. The full support test then asks whether the surrounding area backs up the leading destination. Thus a destination can have the largest count for its source cell and still fail the support threshold. The combination keeps the algorithm from having to evaluate every possible pairing of a source cell and a destination cell.

The grid introduces a boundary effect. Two nearby endpoints can fall into different cells because a grid line passes between them. The algorithm runs with the initial source grid and repeats after moving it by half a cell width horizontally, vertically, and in both directions. It collects the accepted matches across these placements. A group cut by a line in an initial placement can have a better opportunity to contribute together in another. This addresses a boundary created by the grid. A physical boundary between surfaces can still break motion smoothness.

Borrowing support from the surrounding cells

Cell size affects both the amount and the precision of the evidence. A small cell identifies a compact area but may have few features. A large cell provides more matches to count while grouping endpoints over a larger area. The authors keep the cells small and expand the support calculation through a motion kernel. This is a pattern specifying which neighboring source and destination cells are paired when looking for support around a proposed central link.

In the basic kernel, imagine a central source cell and the cells around it. The proposed destination has its own central cell and surrounding cells. A neighbor above the center in the first pattern is paired with a neighbor above the center in the second pattern, with corresponding pairings elsewhere in the pattern. Support comes from links that follow the arrangement. A link starting in the right neighborhood and ending in the destination neighborhood still has to connect cells that the kernel pairs. The paper’s scheme includes the central pair and eight surrounding pairs.

The source pool is the union of correspondence sets associated with the source cells of the kernel.

C_A = Cₐ₁ ∪ Cₐ₂ ∪ Cₐ₃ ∪ … ∪ Cₐ₉

C_A is the full set of proposals that start in the source neighborhood A. The symbols Cₐ₁ through Cₐ₉ denote sets of links starting in the individual source cells indexed by a₁ through a₉. The union sign ∪ gathers their members into a single set, and the ellipsis denotes the intervening cells. As with the single-cell test, the reference correspondence itself is removed when forming its neighbors.

Nᵢ = {cⱼ | cⱼ ∈ C_A, cᵢ ≠ cⱼ}

Nᵢ is now the neighbor set under the kernel. The symbol cⱼ is a proposed match with index j, and cᵢ is the reference with index i. The bar introduces the conditions that cⱼ belongs to the source pool C_A, written with ∈, and differs from cᵢ, written with ≠. A link may enter this pool regardless of its destination.

The kernel’s potential supporting matches come from a more selective union.

C_AB = Cₐ₁ᵦ₁ ∪ Cₐ₂ᵦ₂ ∪ Cₐ₃ᵦ₃ ∪ … ∪ Cₐ₉ᵦ₉

C_AB is the union of proposals following the pairings between source neighborhood A and destination neighborhood B. Each set, such as Cₐ₁ᵦ₁, counts links with a first endpoint in the source cell indexed by a₁ and a second endpoint in the destination cell indexed by b₁. The subscripts through a₉ and b₉ enumerate the paired positions. The union sign combines the sets, and the ellipsis includes the intervening pairs. A source cell contributes supporting links through its paired destination cell.

Sᵢ = {cⱼ | cⱼ ∈ C_AB, cᵢ ≠ cⱼ}

Sᵢ is the set of similar neighbors under the kernel. As before, cᵢ is the reference proposal and cⱼ a candidate counted from the pool. The bar is followed by membership in C_AB, denoted by ∈, and exclusion of the reference candidate, denoted by ≠. The wider pattern increases the evidence available to judge the central pair. Passing the test returns the matches in that central pair. The surrounding pairs contribute evidence to that decision and can have their own tests when considered as central pairs.

The algorithm writes the test directly in terms of the sizes of the pools.

s = |C_AB| − 1

The symbol s is the observed support for the central pair. C_AB is the union of matches in the kernel’s paired cells and the bars count its members. Subtracting 1 removes the reference link. The central pair’s candidates share the same count, since each would remove its own link from the same pool.

τ = α · √(|C_A| − 1)

The symbol τ is the central pair’s threshold, α the empirical multiplier, and |C_A| the number of matches starting in the kernel’s source cells. Subtracting 1 again removes the reference link, and the square root acts on the remaining count. The algorithm adds the central pair’s correspondences to its output if s exceeds τ. The default setting has 20×20 cells, and the implementation uses C++ and OpenCV. GMS was also incorporated into OpenCV.

Accounting for rotation and scale

In the basic kernel, offsets around the source center and the destination center have the same orientation. A substantial image rotation can change these offsets. For instance, the scene content that appears above the source center can be displaced toward the side of the destination center by rotation. A correct central match can lose support when its neighbors follow this new arrangement and the kernel continues to expect the old one. The multi-rotation version fixes the source pattern and rotates the destination pattern through the paper’s 8 possible kernels. It runs the filter for each and chooses the result with the most retained correspondences. The count is available without reference geometry. Its use embodies the expectation that a more suitable pattern will allow a larger coherent set to survive.

Scale changes affect the area covered by a neighborhood relative to scene content. When a structure occupies much more of one image, equally divided grids can group different portions of it on the two sides. The multi-scale version changes the grid in the second image while holding the first fixed. The paper describes this change in terms of a multiplier on the number of cells along each dimension.

(n · α) × (n · α)

Here n is the number of cells along each side of the original n×n grid, α is the relative grid-size multiplier in the scale discussion, and each centered dot multiplies n by that multiplier. The × separates the resulting horizontal and vertical grid dimensions. The authors reuse α in this part of the paper for a different quantity from the support-threshold multiplier. The scale version tests 5 candidates, including equal scale, and keeps the result with the most selected matches. The basic version uses equal scale and the unrotated kernel for regular image pairs such as video frames.

There is no GMS training stage in this procedure. Its data are candidate correspondences for the current image pair. Descriptor extraction and matching supply those candidates. The grid assignments and counts are computed afresh, and the tested scales, kernels, grid positions, and threshold specify how to filter them. An upstream descriptor can itself be learned, as in one of the experiments, without changing how GMS obtains its decision. The trial runs for different scale and rotation settings have no data dependence on each other, so the authors point out that they could be parallelized. Their implementation and timing measurements use a single CPU thread.

Experiments and results

Feature correspondence under viewpoint change

The paper starts its correspondence tests with Graffiti and Wall from VGG. Each sequence has six images and reference homographies linking the first image to the others. A homography gives a mapping between image coordinates for the views used in this evaluation. The setup yields five pairs per sequence, with increasing viewpoint difficulty. To judge a candidate, the experiment maps its image location using the reference homography and checks the error against the proposed partner. An error smaller than 10 pixels qualifies as correct in the main precision and recall comparison.

Precision measures how many retained correspondences meet the correctness criterion as a proportion of all correspondences the filter retains. Recall measures how much of the available correct correspondence set it keeps. Together they describe the tradeoff between removing wrong links and preserving usable ones. A method can raise precision by making severe cuts, so the viewpoint tests compare both measures across the pairs. The stricter localization experiment also revisits what it means for a retained correspondence to count as correct.

The paper compares the ratio test alone, GMS on the initial correspondences, and GMS after the ratio test. It uses both SIFT and ASIFT for generating candidates in this comparison. The feature counts printed with the Graffiti plots are 1741 for SIFT and 31,199 for ASIFT. The corresponding Wall plots give 2748 and 58,049. ASIFT supplies more correct correspondences on the most difficult viewpoint pairs in the paper’s experiments, giving GMS a larger pool to draw from. When given ASIFT proposals, GMS achieves high precision and recall. When it receives the sparser SIFT proposals directly, recall suffers.

The combination with RT gives a different result on SIFT. Its input has already passed an appearance distinctiveness check, so the local support calculation takes place in a smaller but cleaner set. SIFT–RT–GMS generally has higher precision than SIFT–RT while keeping similar recall in this viewpoint comparison. Since RT–GMS only filters what RT hands it, the recall of RT is an upper bound for that combination. The higher precision is evidence about which proposals survive the additional screen. The method cannot recover a correct SIFT correspondence that was missing from the initial candidates or discarded by RT.

The separate error-threshold experiment pools the correspondences across the Graffiti pairs. Its plots examine the initial candidate set as well as the outputs of RT, GMS, and their combination. Tightening the permitted error exposes a difference between matching the right vicinity and recovering an accurate position. At strict thresholds such as 1 or 2 pixels, the filtered SIFT correspondences have higher precision than the filtered ASIFT correspondences. The authors attribute this to ASIFT yielding many plausible but less accurately localized matches. A broad correctness tolerance can count such a match as useful. A geometric computation that depends on precise image coordinates is more sensitive to the remaining error.

When the images differ in size or orientation

The transformation tests use Venice for scale, Semper for rotation, and Boat for both changes together. These evaluations begin with SIFT and run the GMS variants on the matches that have already passed RT. This places the emphasis on what changes when the geometry of the support pattern changes. The compared filters see proposals from the same appearance-matching pipeline.

The basic grid test is sensitive to large relative changes. The scale search improves the Venice results, the rotation search improves the Semper results, and using both helps on Boat. The paper reports that the enhanced variants can approach RT’s recall while improving precision. Its visual comparison uses the hardest pair of each sequence and plots at most 100 correspondences for readability. That cap is a display choice. The precision and recall results describe the method’s output under the evaluation.

This test is especially informative alongside the viewpoint experiment. Enough candidates must first be available from the descriptor matcher. The GMS setting must then allow them to support each other. Improving the pattern can help rescue matches whose neighbors were present but counted as inconsistent under an equal-scale, unrotated interpretation. That is a change to the selection stage. The search does not introduce additional descriptor matches.

What the runtime measurements cover

For timing, the authors vary the number of Graffiti features with ASIFT. The basic GMS filter takes about 2 ms on a single CPU thread when the feature count reaches 50, 000. This is the cost of selecting correspondences after proposals are available. Feature detection, descriptor calculation, and the initial search for matches are separate work. The paper presents the measurement as evidence that a filter can use a large candidate supply and remain inexpensive within a broader pipeline.

The transformation searches repeat the basic procedure. The scale version tests its settings 5 times, and the rotation version tests its settings 8 times. The authors describe the combined version as costing 40 times as much as the basic filter. The work can be distributed because one setting does not need the output of another. The paper gives matching the basic runtime with 5 or 8 threads as a theoretical possibility for the respective individual searches. Its demonstrated timing is for the single-thread implementation.

The paper also gives reported costs for other correspondence selectors. LC takes 13 ms on a GPU or 25 ms on a CPU for 2K putative matches in the result quoted by the paper. It describes LPM as taking a few milliseconds to process 1000 proposed matches, and CODE as requiring several seconds for correspondence selection. The authors describe CODE as 1000× slower than GMS in their baseline discussion. These comparisons help characterize the practical motivation for GMS. The quoted processing conditions differ across methods, including the number of candidates and whether the quoted run used a CPU or GPU.

Estimating geometry on FM-Bench

The next experiment asks what happens when the selected correspondences are used for a concrete geometric task. Given a point in one view, epipolar geometry constrains a matching point in the other to a line. A fundamental matrix represents this relationship between image coordinates. The authors feed the correspondence sets into a RANSAC-based 8-point estimator and compare the recovered matrix with reference geometry. This permits a distinction between selecting visually plausible correspondences and selecting correspondences that let an estimator recover the right relationship between views.

FM-Bench contains TUM, KITTI, Tanks and Temples, and Community Photo Collection. TUM and KITTI supply short-baseline video pairs from indoor and outdoor settings, respectively. Tanks and Temples, abbreviated T&T, and Community Photo Collection, abbreviated CPC, supply wider-baseline examples for reconstruction. A wide baseline here means a more substantial change between the paired views. CPC contains images taken by tourists and collected from the Internet, so the views are less controlled than consecutive video frames. The benchmark uses 1000 randomly chosen matching image pairs per dataset for testing.

In the common pipeline, the difference-of-Gaussians detector, abbreviated DoG, finds the points and SIFT describes them. The authors take this implementation from VLFeat and use its default parameters. The average numbers of detections are 1082 for TUM, 1751 for KITTI, 8133 for T&T, and 7213 for CPC. The ratio test uses a threshold of 0.8. In the RT baseline, those filtered matches go straight to the estimator. LPM, LC, and GMS receive the SIFT–RT matches and make an additional selection. LC uses the weights supplied by its authors. The tested configuration uses basic GMS on TUM and KITTI and the multi-scale setting on T&T and CPC. The paper leaves the rotation search off for these datasets because the tested views lack substantial relative image rotation.

CODE is evaluated as an integrated system. It uses its own GPU-ASIFT feature extraction and nonlinear correspondence selection, and the benchmark takes its output correspondences. The comparison with CODE consequently answers how the complete correspondence systems perform before the common geometric fit. The comparison among the SIFT–RT variants more directly shows what the different selection stages do with the same input matches.

The benchmark measures disagreement between the recovered and reference matrices using normalized symmetric geometry distance, or NSGD. The paper describes generating virtual correspondences from the matrices and checking their distances from the epipolar lines predicted by the other matrix. Evaluating the relation in both directions makes the distance symmetric. Scaling by the image diagonal helps compare errors across image resolutions. The reported fundamental-matrix recall is the percentage of tested image pairs whose distance passes the threshold of 0.05. This is a success rate over image pairs. The earlier homography-based correspondence recall concerns individual matches.

The paper additionally reports the percentage of inliers among correspondences after RANSAC. These are judged using the distance to the reference epipolar lines, with a tolerance based on the image diagonal.

α · l

The product is the inlier distance tolerance. In this metric α is 0.003 and l is the length of the image diagonal. The centered dot denotes multiplication. Distances smaller than the product qualify. This α belongs to the evaluation criterion, independent of the GMS threshold and the grid-size multiplier.

Fundamental-matrix estimation recall on FM-Bench Community Photo Collection

GMS has the highest recall among the shared SIFT pipelines, and CODE leads overall.

Fundamental-matrix estimation recall on FM-Bench Community Photo CollectionSIFT–RT: 29.20SIFT–RT29.20SIFT–RT–LPM: 39.40SIFT–RT–LPM39.40SIFT–RT–LC: 39.40SIFT–RT–LC39.40SIFT–RT–GMS (this paper): 43.00SIFT–RT–GMS (this paper)43.00CODE: 51.00CODE51.00
The numbers
System or settingFM recall %
SIFT–RT29.20
SIFT–RT–LPM39.40
SIFT–RT–LC39.40
SIFT–RT–GMS (this paper)43.00
CODE51.00

On T&T, the same fundamental-matrix recall metric gives 70.00 for SIFT–RT, 80.70 for SIFT–RT–LPM, 76.60 for SIFT–RT–LC, and 80.90 for SIFT–RT–GMS. CODE reaches 89.40. The wide-baseline results show the strongest benefits from adding GMS to the ratio-tested SIFT pipeline. The paper also varies the NSGD threshold on T&T and CPC and plots the resulting recall. Looking across thresholds tests whether the comparison depends wholly on the choice of 0.05.

The short-baseline datasets give a more mixed picture of the size of the benefit. On TUM, the fundamental-matrix recall of SIFT–RT is 57.40 and that of SIFT–RT–GMS is 59.20. SIFT–RT–LPM reaches 58.90, SIFT–RT–LC reaches 54.10, and CODE reaches 62.50. On KITTI, SIFT–RT and SIFT–RT–GMS both reach 91.70. The corresponding recalls for the LPM and LC additions are 91.50 and 89.70, with CODE at 92.50. The ratio-tested features and estimator already recover usable geometry often in the KITTI setup, and GMS does not change the reported recall at this threshold.

Post-RANSAC inlier rate on FM-Bench Tanks and Temples

GMS gives the highest inlier rate among the shared SIFT pipelines, with CODE higher overall.

Post-RANSAC inlier rate on FM-Bench Tanks and TemplesSIFT–RT: 75.20SIFT–RT75.20SIFT–RT–LPM: 81.62SIFT–RT–LPM81.62SIFT–RT–LC: 84.01SIFT–RT–LC84.01SIFT–RT–GMS (this paper): 84.38SIFT–RT–GMS (this paper)84.38CODE: 89.14CODE89.14
The numbers
System or settingInlier %
SIFT–RT75.20
SIFT–RT–LPM81.62
SIFT–RT–LC84.01
SIFT–RT–GMS (this paper)84.38
CODE89.14

On CPC, the post-RANSAC inlier percentage is 67.14 for SIFT–RT and 85.90 for SIFT–RT–GMS, compared with 78.17 for SIFT–RT–LPM and 83.99 for SIFT–RT–LC. CODE reaches 90.16. A cleaner returned correspondence set and a successfully recovered fundamental matrix are related outcomes, but the measures can rank systems differently. On KITTI, for instance, the SIFT–RT–LC inlier percentage is 99.44, compared with 98.58 for SIFT–RT–GMS, even though the LC pipeline has lower fundamental-matrix recall there. Whether a particular fit has a high proportion of geometrically accurate matches and how often a pipeline recovers acceptable geometry across image pairs are distinct questions.

Pairing GMS with HardNet descriptors

The authors test the method with HardNet descriptors to examine how it performs with a different source of appearance evidence. One pipeline uses DoG to detect points, while the other uses HessAff. Both describe their detected points with HardNet, apply the ratio test, and run GMS. The geometric estimator is also different in this experiment. It uses least median of squares, abbreviated LMedS, which judges fits by the median squared residual. The paper says this estimator performed better in FM-Bench and compares the two HardNet pipelines with CODE under the changed setup.

On TUM, fundamental-matrix recall is 68.60 for DoG–HardNet–RT–GMS, 66.40 for HessAff–HardNet–RT–GMS, and 67.50 for CODE. On KITTI, those results are 92.10, 91.80, and 91.90, respectively. On T&T, the DoG and HessAff GMS variants reach 92.20 and 90.90, while CODE reaches 92.70. On CPC the variants reach 60.10 and 60.80, with CODE at 61.80. These results show that GMS can operate with feature inputs that yield a competitive pipeline on this evaluation. The switch in geometric estimator matters when interpreting the HardNet results alongside the earlier SIFT comparison.

Starting a monocular map

The ORB-SLAM experiment puts the correspondence filter into an initializer. The original initializer uses a bag-of-words-based matching stage, which groups image features through a visual vocabulary to guide matching. The modified version replaces that stage with brute-force nearest-neighbor matching and then uses GMS for selection. The chosen matches are sent to geometry recovery and triangulation to make the initial map. For initialization in images similar to KITTI’s, the authors retain the default detector settings, which yield 4K well-distributed ORB features.

The evaluation uses KITTI odometry sequences 00–10, cut into nonoverlapping fragments of 20 consecutive frames. An initialization counts as successful if the estimated pose is within 5 degrees of the reference for both rotation and translation. To assess how early it succeeds, the paper records the position of the first successfully initialized image in its fragment. It also reports the number of three-dimensional points created by initialization. These measures distinguish reliability, the frame position at which initialization is reached, and the size of the initial map.

In the first sequence row of the reported results, the original and modified initializers have success ratios of 0.77 and 0.95. Their mean first-success orders are 2.8 and 1.18, and their mean initial point counts are 140.44 and 929.59. The row with an original success ratio of 0.11 reaches 0.80 with the modified initializer. In that row, first-success order changes from 4.16 to 3.88 and initial point count from 119.00 to 519.77. The comparison shows a benefit to the complete matching-stage replacement on the tested fragments. Earlier first success here refers to frame order. The standalone GMS timing measures the cost of filtering candidates.

What the ablations show

Filtering the appearance candidates first

The formal FM-Bench ablation removes the ratio test before GMS. With RT in place, the pipeline’s fundamental-matrix recall is 59.20 on TUM, 91.70 on KITTI, 80.90 on T&T, and 43.00 on CPC. Omitting RT gives 51.9, 90.6, 73.4, and 31.4 on the same respective datasets. The paired settings answer whether the spatial screen alone can use all the initial SIFT proposals as effectively as it uses the candidates that also passed an appearance test. Under this geometry evaluation, the ratio test helps across the benchmark.

The authors attribute the decrease without RT to inaccurately localized correspondences. A central cell pair contains a range of possible endpoint coordinates. When its supporting pattern clears the threshold, weak candidates within the accepted cells can go along with better ones. The ratio test gives each proposal an individual appearance check before the shared decision. This can improve the quality of the pool even though it also removes candidates that could have supplied support. The experiment gives direct evidence for the usefulness of the combined procedure. The attribution to inaccuracies is supported separately by the correspondence evaluation under stricter pixel tolerances.

This comparison also explains why adding every available match is an incomplete reading of the statistical result. Increasing the neighborhood size helps in the formal argument when the difference between the correct and incorrect support probabilities holds. Expanding the input by including much weaker candidates can also change those probabilities and can introduce errors within otherwise plausible cell pairs. The number of trials and the quality of those trials affect the filter together.

Testing whether the scale search earns its cost

The second formal ablation compares the multi-scale version with basic GMS on the wide-baseline subsets. Without multi-scale search, fundamental-matrix recall is 78.6 on T&T and 37.8 on CPC. With it, the recalls are 80.90 and 43.00. The results establish an advantage for the search on those datasets in the paper’s pipeline. The short-baseline TUM and KITTI settings already use basic GMS, so the table supplies no corresponding scale-removal results there.

The transformation sequences provide a related comparison at the correspondence level. The scale variant is tested on Venice and the rotation variant on Semper. Boat tests the joint search. The experiments hold the SIFT and RT stages constant and vary the GMS setting. This isolates whether alternative neighborhood pairings give existing correct proposals a better chance of supporting one another. The FM-Bench scale ablation then asks whether that improvement carries through to estimated geometry on a different set of image pairs. FM-Bench leaves rotation search disabled, so its ablation speaks to scale.

Varying the amount and quality of input evidence

On Graffiti, the authors randomly subsample detected ASIFT features in each image and vary the maximum feature budget. The plotted settings include 100 at the sparse end and 50K at the dense end. Because the comparison starts from the same feature family, it provides a more direct look at feature quantity than switching between SIFT and ASIFT. As the budget shrinks, GMS applied directly to the proposals depends more strongly on the remaining feature supply. The ratio test on its own is less sensitive to the number of features, and combining RT with GMS reduces the feature requirement relative to running GMS alone. In the paper’s comparison, that combination gives the most accurate matching.

This behavior follows from where each procedure gets its information. RT judges descriptor ambiguity for an individual query. GMS needs other correspondences in the candidate’s neighborhood. If the source cell and the surrounding cells contain few usable proposals, the strongest destination can still have little collective evidence. Dense ASIFT proposals help under viewpoint change by supplying more of that evidence. A smaller but cleaner set from RT can also help, because fewer of its neighbors are weak appearance matches. Neither pattern requires feature count to predict performance on its own.

The stricter Graffiti test shows another aspect of input quality. Dense ASIFT proposals provide good overall coverage, yet after filtering they count less favorably under the strict localization thresholds than the filtered SIFT proposals. Thus feature quantity, the proportion of correct proposals, and the coordinate accuracy of those proposals describe different properties of the input. GMS directly counts spatial agreement at grid resolution. The two homography-based tests together show why its apparent success depends on the error tolerance used to judge the returned points.

The HardNet comparison tests compatibility with a stronger appearance pipeline under the LMedS estimator. The DoG variant and the HessAff variant share HardNet and GMS but differ in which points are detected, so the relative results between them concern those complete feature settings. Comparison with the earlier SIFT experiment also changes the estimator. The paper connects its findings to the prediction that better input correspondences help the support test. The experiments establish competitive performance in this configuration, while leaving the individual contribution of the descriptor and the estimator unresolved.

Limitations

Limits identified by the authors

The smoothness assumption is local and can break at physical boundaries. Close pixels can belong to different surfaces, and those surfaces can have different image displacements. A correct match near such a boundary may have neighbors that move in a different way. Its observed support can then be weak even though the two individual endpoints are correct. The authors consider the assumption adequate for producing useful hypotheses and mention edge detection and segmentation as possible directions for future work. The grid shifts address the influence of cell placement, while those proposed directions concern boundaries in the scene itself.

Repetitive structure creates the converse problem. Several wrong matches can agree locally. A group of neighboring points may all be mapped to a similar-looking region elsewhere in the image, yielding enough support to survive. In the probability argument, this can raise the support probability associated with a wrong match and narrow the gap the filter needs. The authors leave heavily repetitive scenes to methods that can reason using global geometry. The count in the motion kernel supplies evidence that a mapping is locally coherent. It offers limited evidence about which of several coherent mappings identifies the right physical structure.

The authors also flag coordinate accuracy as a direct consequence of making decisions by cell pair. GMS can keep inaccurate correspondences that fall within a correct pair of cells. They describe those matches as potentially useful for an application such as object retrieval, where recognizing a common object can tolerate rougher locations. Epipolar geometry estimation is more sensitive to the positions. The paper mitigates this with a ratio-test prefilter, which changes the candidates supplied to the grid. The procedure still selects given coordinates and leaves their precision dependent on detection, description, and matching.

Limits of the evidence and the setup

The separation argument is conditional. A binomial distribution is a way to describe support when neighboring trials behave with common probabilities within each case and with independent outcomes. Correspondences in images can share appearance, belong to repeated patterns, or be affected together by a viewpoint change. The experiments support the usefulness of the count on the tested images. They do not establish that any increase in feature budget must improve a given pair, especially when the new features introduce correlated wrong proposals or accumulate outside the neighborhoods that need support. The empirical threshold and the choice of kernel matter to the result.

The grid also prunes by the busiest destination for each source cell before evaluating the wider neighborhood. A wrong destination with the most central matches can preempt testing a correct candidate destination under that placement. Conversely, a source cell spanning different motions may have valid links into several destination regions. The algorithm’s goal of returning a strong subset makes this tradeoff understandable. It bounds what the accepted correspondences say about completeness. The scale and rotation variants select a setting by total retained count for the pair. The tests establish gains for the reported transformations, without testing a procedure that estimates a separate transformation for every portion of a scene.

The benchmark’s reference geometry has different origins across datasets. TUM and KITTI supply camera parameters from which the reference fundamental matrices are derived. For T&T and CPC, the authors obtain camera estimates using COLMAP reconstruction. They report average reprojection error below one pixel for that reconstruction procedure. In those wide-baseline datasets, NSGD therefore measures agreement with geometry inferred from the image collections. This is a meaningful common benchmark for comparing methods, with a different source of reference evidence from the two video datasets.

The two experiments closest to deployment measure specific portions of their systems. The Graffiti runtime covers filtering after candidate generation and does not measure multi-thread execution. The ORB-SLAM evaluation stops at successful initialization and map creation in short fragments. It does not measure long-run tracking or trajectory accuracy for the modified system. It also changes the appearance matching stage and adds GMS as part of the same replacement, so that comparison cannot attribute the entire initialization gain to GMS alone. In FM-Bench, CODE’s integrated feature pipeline and the shared-input SIFT comparison likewise support different claims about the contribution of selection.

What came after

SuperGlue is a later citing work from 2019 on learning feature matching with graph neural networks. It takes up feature matching through a learned graph-based approach. GMS supplies spatial context through a hand-specified grid, a neighborhood pairing pattern, and counts from the current image pair. SuperGlue’s stated approach puts a graph neural network at the center of learning how to match features. The citation places the graph-based method in the same line of work on how to use relationships among features when deciding on correspondences.

The journal study also describes applications that used the conference version of GMS. Causo and colleagues included it in an item-picking system for the Amazon Robotics Challenge. The paper reports that the system picked all the target items in the shortest time. That is a result for the complete picking system. In this application, GMS provided correspondence selection inside a larger system whose objective was to identify and pick physical objects.

Zhang and colleagues extended the idea for tracking in dynamic scenes. This setting directly encounters an issue raised by the GMS paper. A scene can contain several coherent motions, and correct matches on a moving object can disagree with the geometry used to track the camera. Their work used GMS and extended the idea to address tracking under those conditions. The journal study reports a more accurate camera trajectory than ORB-SLAM2 on TUM for the resulting system. The reported gain concerns the dynamic-scene system, which extends the use of grid-based motion evidence beyond the original correspondence filter.

Yoon and colleagues used GMS for point-cloud triangulation in a system for three-dimensional trajectory reconstruction. Their use connects the matching stage to a geometric operation also examined in the ORB-SLAM initializer. The application needs image observations to recover three-dimensional positions, and the GMS output supplies correspondences to that operation. Across these uses, the authors’ implementation also became available in OpenCV. That made the filter accessible as a component that could receive feature matches from an application’s existing pipeline.

Cite

Cite as Jia-Wang Bian, Wen-Yan Lin, Yasuyuki Matsushita, Sai-Kit Yeung, Tan-Dat Nguyen and Ming‐Ming Cheng. 2017. GMS: Grid-Based Motion Statistics for Fast, Ultra-Robust Feature Correspondence. IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/cvpr.2017.302

@inproceedings{bian2017gms,
  title = {{GMS: Grid-Based Motion Statistics for Fast, Ultra-Robust Feature Correspondence}},
  author = {Jia-Wang Bian, Wen-Yan Lin, Yasuyuki Matsushita, Sai-Kit Yeung, Tan-Dat Nguyen and Ming‐Ming Cheng},
  booktitle = {IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings},
  year = {2017},
  doi = {10.1109/cvpr.2017.302},
  url = {https://doi.org/10.1109/cvpr.2017.302}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bian-2017-gms-grid-based-motion-statistics/