---
title: "Rethinking Visual Geo-localization for Large-Scale Applications"
description: "CosPlace learns to locate photos by training on small groups of street views, then searches a citywide image database with compact descriptors."
canonical: "https://research.elamur.ai/free/en/papers/berton-2022-rethinking-visual-geo-localization-large/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/berton-2022-rethinking-visual-geo-localization-large/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / Rethinking Visual Geo-localization for Large-Scale Applications

# Rethinking Visual Geo-localization for Large-Scale Applications

Paper · 2022 · Gabriele Berton, Carlo Masone and Barbara Caputo

**Authors:** [Gabriele Berton](https://md.research.elamur.ai/free/en/authors/gabriele-berton/), [Carlo Masone](https://md.research.elamur.ai/free/en/authors/carlo-masone/) and [Barbara Caputo](https://md.research.elamur.ai/free/en/authors/barbara-caputo/) · **Year:** 2022 · **Venue:** arXiv:2204.02287 · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**272** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4312854990) · [arXiv:2204.02287](https://openalex.org/S4210176548) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/2204.02287)
- [arXiv 2204.02287](https://arxiv.org/abs/2204.02287)
- [OpenAlex](https://openalex.org/W4312854990)

Citations: OpenAlex, 2026-10-14.

## Summary

A photo can show enough of a street to identify where it was taken, even when the person taking it supplies no location. A visual geo-localization system looks for that street in a collection of photographs with known coordinates. The challenge changes when the collection covers an entire city. The system needs enough reference views to find a useful match, and its training procedure has to cope with the same abundance of imagery. This paper asks how to train at that scale while keeping the search precise enough to be useful at street level.

The authors build San Francisco eXtra Large, or SF-XL, from street panoramas captured between 2009 and 2021. Its training collection contains 41.2M images. They propose a method called CosPlace that uses camera position and viewing direction to assign images to small classes. Two photos on opposite sides of a class boundary can show nearly the same scene, so the authors arrange the classes into groups and train on one group at a time. Within a group, the classes are separated geographically or by viewing direction. This lets the network learn to distinguish places without repeatedly searching the training collection for difficult examples. At test time, it turns each photo into a compact vector, called a descriptor, and uses similar reference descriptors to propose locations. The task at that point is a form of [information retrieval](https://md.research.elamur.ai/free/en/topics/information-retrieval/).

On the more varied SF-XL test set, whose queries come from Flickr, CosPlace puts a reference image within 25 meters of the correct location at rank one for 64.7% of queries, compared with 51.2% for SFRS. On the other SF-XL test set the corresponding results are 83.4% and 83.1%. CosPlace also has the highest average top-ranked recall across the five external benchmarks in the main comparison. It achieves these results with 512-dimensional descriptors, compared with 4096 for SFRS, and the authors report that its VGG-16 training run fits on a single GPU using 7.5 GB.

The experiments establish the value of the approach under particular conditions. CosPlace needs viewing directions during training and performs substantially worse when trained on very small samples. The main run uses roughly 5.6M images from the larger collection, and the citywide search tests use a 2.8M-image reference database. The authors make SF-XL, the CosPlace code, and trained networks available for research.

## Deep dive: Rethinking Visual Geo-localization for Large-Scale Applications

CosPlace learns to locate photos by training on small groups of street views, then searches a citywide image database with compact descriptors. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Locating a photo by finding a nearby view

Visual geo-localization starts with a query image and a reference database. The query is the photo whose location the system is asked to estimate. A reference image has a recorded geographical position, and the system can use that position as a hypothesis for the query. An application can return the position of its strongest match or keep a shortlist for further consideration. The paper studies the quality of those matches using a distance tolerance. The system gets credit when it finds a reference whose position lies close enough to the known position of the query.

The image comparison matters because photos taken near each other can look quite different. A camera may face a different way, the light may have changed, or something visible in the reference may be covered in the query. Conversely, the same type of building or street can appear in multiple places. A descriptor is a fixed-length numerical representation of an image that makes such comparisons possible. The network is trained so that comparing descriptors tends to favor views that help answer the location question. The descriptor's usefulness comes from how well it ranks relevant reference images among all the available alternatives.

The authors frame the problem around applications such as autonomous driving and assistive devices. An application that must work throughout a city needs reference coverage wherever people or vehicles may encounter a scene. Density matters within the area as well. A large collection concentrated in a small part of the city leaves the rest poorly covered. A collection that reaches across the city but samples it sparsely can still leave a query without a nearby reference. The paper's comparison of San Francisco datasets uses maps to distinguish coverage of an area from coverage within it. SF-XL is intended to supply both at once.

This is also a question about where to gather training imagery. Earlier benchmarks commonly held entire geographical areas apart between training and evaluation. Such a split asks whether a descriptor learned in one area works on views of another. The authors describe a different situation. An organization collecting images to support a service in a particular city already has a source of training examples from that city. Learning from those views lets it make more use of the collection it needs for retrieval. It also changes the interpretation of the evaluation. A system can be tested on new photographs of familiar geography, while transfer to unfamiliar places can be measured in a separate experiment.

Using the application area for training brings the scale problem forward. A citywide database is an expensive resource to search, and it is also an expensive resource to revisit throughout training. A descriptor that worked in a neighborhood can be deployed over a larger database in principle. The authors ask whether the procedure that produced it can itself benefit from the larger collection and whether the resulting descriptors are practical to store and search.

#### What earlier retrieval systems had to mine

The retrieval methods reviewed in the paper usually use a neural feature extractor followed by a layer that combines information from different parts of an image into a descriptor. A prominent example is NetVLAD, which aggregates local features into a vector suitable for comparing whole images. The paper treats it as both a baseline and an example of the architectural choices common in earlier place recognition. [NetVLAD](https://md.research.elamur.ai/free/en/papers/arandjelovic-2016-netvlad-cnn-architecture-weakly-supervised/).

The usual training objective was contrastive. In a triplet formulation, the network receives a query, a positive example that should be close to it in descriptor space, and a negative that should be farther away. Coordinates provide weak supervision. They can identify images from the vicinity of the query and rule out images far from it, even though proximity alone gives incomplete information about what the cameras see. The training procedure then has to choose suitable examples from a much larger supply.

Choosing a negative is especially important. A distant view that the network already ranks far below the correct match provides little reason for the descriptor to change. A distant location that the network currently confuses with the query gives it something to learn. Mining is the search for informative examples of this kind. Because the network changes during training, an example that appears difficult under its current descriptors may look easy later. Implementations described in the paper periodically recompute descriptors and retain them in a cache to make those decisions.

Earlier methods varied in how they used the mined examples. SARE could account for multiple negatives together. SFRS used information from selected image regions in addition to full images. These methods changed the evidence available to the training objective while retaining a need to identify useful examples. Partial mining reduced the scope of the search by looking at a sample of the collection. This reduced the work needed for a mining phase, with a corresponding restriction on which examples could be found and used.

There was a separate cost at retrieval time. If a system keeps a descriptor for every reference, the dimension of each descriptor affects both storage and the work of an exhaustive search. Earlier NetVLAD-based systems frequently used wide vectors. Some compressed them after training using principal component analysis, or PCA, which represents the vectors in fewer dimensions. The authors describe previous work in which reducing the width too far hurt recognition. Other systems used pooling to build a shorter descriptor in the first place. The paper therefore treats compactness as something an evaluation should measure alongside recall.

#### What earlier classification systems predicted

A second line of work divided the world into geographical regions and trained a classifier to predict which region contained an image. The paper describes the premise as semantic resemblance. Photos from the same broad area can share vegetation, types of vehicles, architecture, or writing even if they depict different streets. A system can use those recurring features to associate an unfamiliar scene with a broad part of the world.

The spatial scale of a classification output depends on the regions the system uses. A large region can be a viable answer for global photo geolocation. Its label alone gives little guidance about where on a particular street the photo was taken. Creating much smaller cells seems like a straightforward way to improve precision, but a fine map grid introduces a different problem. A shift just across a boundary can change a class label even when practically everything in view remains the same. It makes little sense to ask a network to distinguish such labels solely from their images.

CosPlace uses classification for a different part of the job. Its classes provide a way to train a descriptor, and the database supplies the locations returned at test time. In the intended design, members of a class depict a particular local view. The competition during training then takes place among classes that are meaningfully separated. This changes what the classifier has to learn while leaving the system free to search a reference collection whose locations were never among its training labels.

### The method, step by step

#### Turning camera poses into training labels

An SF-XL training image has a position and a heading. The position says where the camera was, and the heading says which direction it faced. The method uses both because location alone can group together views of different things. Imagine a camera at a point on a street that can see a nearby building in one direction and the opposite side of the street in another. The images share a location, but a learning objective that treats them as instances of the same visual class would give the network little reason to preserve the distinction between the two views.

The authors convert positions to Universal Transverse Mercator coordinates, or UTM. For a restricted geographical area this gives a planar representation with an east coordinate and a north coordinate in meters. They lay a square grid on that plane. Within each square, they divide headings into angular intervals. The cell and the interval together specify a class. A class thus describes where an image was taken and the direction from which it looks at the surrounding scene.

A panorama illustrates why the distinction is useful. Crops from the same panorama have the same camera position, but they look in different directions. In the paper's grid illustration, views with distinctly different headings occupy the same geographical cell and are assigned to separate classes. The illustration also shows the converse difficulty. Photos of the same building with similar headings can be assigned to different cells because their camera positions straddle a grid boundary. The images may be far more alike than some views within a single cell.

The class assignment can be written as follows.

```
Cₑᵢ,ₙⱼ,ₕₖ = { x : ⌊east(x) / M⌋ = eᵢ, ⌊north(x) / M⌋ = nⱼ, ⌊heading(x) / α⌋ = hₖ }
```

Here `x` denotes an image. `east(x)` and `north(x)` are its UTM coordinates, and `heading(x)` is its viewing direction. `M` is the side length of a grid cell in meters. `α` is the width of a heading interval in degrees. The floor brackets `⌊ ⌋` round each quotient down to an integer, and `/` denotes division. The resulting indices are `eᵢ` for the eastward cell, `nⱼ` for the northward cell, and `hₖ` for the heading interval. The subscripts `i`, `j`, and `k` distinguish index values along those axes. `Cₑᵢ,ₙⱼ,ₕₖ` names the class for the specified triplet. The braces collect all images satisfying the conditions after the colon, with the commas between conditions indicating that all of them must hold.

Smaller values of `M` and `α` make the label more specific. A broad cell or heading interval can put substantially different views under one label. A narrow interval can make a set of genuine matches easier to distinguish from other scenes when enough examples remain, but narrows the portion of the collection that can support that class. The position and heading boundaries are still present at any chosen resolution. The next step changes which classes ever compete with each other.

#### Keeping neighboring classes apart

CosPlace partitions the classes again, this time into groups. A group may contain classes from across the city. Its members are selected by a repeating pattern along the east and north axes and along the sequence of heading bins. The pattern can be understood by taking one cell, skipping intervening cells, and repeating that choice across the map. Shifting the pattern produces a different group. The same process assigns heading bins to different offsets. Each cell-and-heading class ends up in the group for its combination of offsets.

The formal rule uses remainders.

```
Gᵤᵥ𝓌 = { Cₑᵢ,ₙⱼ,ₕₖ : (eᵢ mod N = u) ∧ (nⱼ mod N = v) ∧ (hₖ mod L = w) }
```

`Gᵤᵥ𝓌` is the group indexed by `u`, `v`, and `w`. The class `Cₑᵢ,ₙⱼ,ₕₖ` and its indices are the same as in the preceding formula. `N` is the spacing period in grid cells along either map axis. `L` is the spacing period in heading intervals. `mod` takes the integer remainder, so `u` and `v` are possible remainders for division by `N`, and `w` is a possible remainder for division by `L`. Each remainder begins at zero and is smaller than the corresponding divisor. The symbol `∧` requires the conditions it joins to hold together. The braces collect the classes that satisfy the conditions after the colon.

A class has only one set of remainders and therefore belongs to one group. If two distinct classes in a group differ along a map axis, they must differ by at least a full spacing period in their cell indices. The minimum distance between their nearest edges reflects the intervening cells. The paper gives the separation as `M · (N − 1)` meters or `α · (L − 1)` degrees. Here `·` means multiplication and `−` means subtraction. The `1` accounts for the width of a class interval when measuring the gap between intervals. The separation is an alternative across coordinates. Classes in the same geographical cell can belong to the same group if their heading intervals have the required gap. Classes with the same heading interval can belong to that group if their cells are far enough apart.

The number of possible groups is `N × N × L`, with `×` denoting multiplication. The two factors of `N` account for the independent choices of offset for easting and northing. `L` accounts for the heading offset. The paper's illustration uses `N = 3`, `L = 2`, and `α = 60°` to show how different groups interleave. The illustrated group pattern gives the authors a way to keep adjacent bins out of one classification problem while retaining them as potential training data for another.

This arrangement leaves the label of a photo unchanged. A view at the edge of its cell remains in that cell. Its near duplicate across the boundary may have a different label and can take part in training with another group. What changes is the demand made on the classifier. The two labels are handled by different output layers, so the classifier on either group need not resolve the difference between almost identical views. Both groups can still shape the shared descriptor through their own sets of comparisons.

#### Learning a descriptor with rotating classifiers

A feature extraction backbone turns the image into numerical features. In the main convolutional architecture, generalized mean pooling, or GeM, combines features over the spatial extent of the image. A fully connected projection maps the pooled representation to the descriptor width. For most of the main experiments that width is 512. A separate fully connected classification layer for the current group maps the descriptor to scores for the classes in that group. This last layer has as many outputs as the group has classes. It is distinct from the projection that determines the size of the reusable descriptor.

The classification objective is the Large Margin Cosine Loss, also called CosFace, which the paper draws from face recognition. Its scores depend on the angular alignment of the image representation with the weights for a class. The training margin makes an image's correct class harder to separate from its competitors, encouraging a representation that can support a clearer distinction. The paper imports this loss and gives the group-specific objective in the following form.

```
ℒ_cosPlace = ℒ_lmcl(Gᵤᵥ𝓌)
```

`ℒ_cosPlace` denotes the training loss for the current CosPlace group. `ℒ_lmcl` stands for the Large Margin Cosine Loss, and its argument `Gᵤᵥ𝓌` identifies which group's images, labels, and classification outputs are involved. `u`, `v`, and `w` identify that group by their remainders. The equals sign says that the CosPlace objective on that group is the cosine-margin classification objective restricted to the group.

In practice, an epoch is spent on one group. Training then advances to the next group, switching the classification layer while retaining the shared image encoder and descriptor projection. When the schedule returns to a group, it again uses that group's classification layer. The shared part of the network consequently has to produce descriptors that support several classification problems. The group-specific layer only has to distinguish the classes within its group.

The group provides the alternatives for classification directly through its label set. There is no stage in which the training procedure looks across the gallery for the current network's most misleading image matches. There is also no cache of reference descriptors to refresh for that purpose. This is the source of the difference in training workload. The new procedure still learns from a large set of competing classes and still has to read and process its images. It avoids the extra collection-wide passes that conventional mining implementations interleave with the learning updates.

Training and retrieval with CosPlace The steps in order.

#### Putting SF-XL into the training procedure

The authors start from 3.43M Street View panoramas. A panorama represents a 360° view, and the authors take 12 horizontal crops from each to form the SF-XL image collection. The resulting 41.2M training images carry six-degrees-of-freedom pose information, including GPS position and heading. CosPlace uses the location and heading fields for its training classes. The Street View crops for training, validation, and the test reference collection have a resolution of 512 × 512.

The default grouping uses `M = 10` meters, `α = 30°`, `N = 5`, and `L = 2`. These settings produce 50 groups. The authors only consider cells with at least 10 panoramas for training. A panorama is a capture from which multiple directional crops can be obtained, so the filter is defined on the underlying captures rather than simply counting the crop files. The authors report that this filter discards about 15% of the images. A group has roughly 35k classes under the reported settings, with an average of 19.8 images per class.

The main training schedule uses 8 of the 50 groups, containing roughly 5.6M images. Group membership therefore does double duty. It controls which classes share a classifier, and the choice of which groups to train on determines the effective size of the training set. The authors choose a subset to enable repeated visits to the same groups during their run. The collection of 41.2M images makes that selection possible. The reported training run uses 13.6% of the collection.

An epoch consists of 10k iterations with the current group. The full schedule lasts 50 epochs, or 500k iterations, at a batch size of 32 images. Following each epoch, the authors evaluate retrieval on the validation set and retain the checkpoint with the best validation result for subsequent testing. This makes validation a check on the usefulness of the learned descriptors, even though the updates themselves come from classification.

The optimizer is Adam, with a learning rate of 0.00001. The image augmentations include color jitter and random cropping. The authors use random crops partly because SFRS, a comparison system, also incorporates cropped regions in its training procedure. CosPlace uses a margin of 0.40 in its cosine loss. The optimizer choice follows the earlier method [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/).

The main head-to-head experiments use the same VGG-16 backbone family as the comparison systems. VGG-16 supplies the convolutional features, with GeM and the projection forming the descriptor for CosPlace. The authors use a less costly ResNet-18 for ablations and preliminary work, and they also examine deeper residual networks and vision transformers. The grouping rule and the use of a temporary classifier are independent of how the backbone builds its image features. The main comparison uses the architecture introduced in [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://md.research.elamur.ai/free/en/papers/simonyan-2014-very-deep-convolutional-networks-large/).

#### Retrieving a location

At validation or test time, the system takes the descriptor from before the group classifier. It can encode the reference photos in advance and retain their descriptors alongside their coordinates. When a query arrives, the network encodes it in the same space. Nearest-neighbor search ranks reference images by descriptor similarity, and the stored positions of those images become candidate locations.

A query needs neither a heading nor a class assignment to follow that path. A reference photo from a new city also needs no place among the training classes. A geographical position is needed for that reference to provide a location, but the network can extract its descriptor without consulting its metadata. This is what makes the external benchmark tests possible. The shared descriptor has to generalize to the new views, while the reference collection supplies the geography specific to each test.

The stages have different scaling properties. Training avoids recomputing a collection-wide cache for mining. Inference still needs a reference collection and still bears the cost of searching it. The contribution at that stage is the small descriptor, which reduces how much data must be stored and compared for each reference. Training and retrieval therefore address separate costs through different parts of the same method.

### Experiments and results

#### The citywide test and the transfer tests

The SF-XL protocol distinguishes training, validation, the reference database for testing, and the test queries. The training collection spans the city and includes imagery from 2009 to 2021. The validation set also draws from across the city, with 8k reference images and 8k queries. The authors use a citywide test reference collection of 2.8M images, all from 2013. In the authors' account, creating descriptors for the entire 41.2M-image collection on one GPU would take days. The smaller test database offered a feasible evaluation while retaining the geographical extent of the larger collection.

Both SF-XL query sets are searched against that same reference database. SF-XL test v1 consists of 1000 Flickr photographs. The authors selected them by hand, verified their locations, and blurred faces and vehicle plates. The queries include night and grayscale images as well as views with obstructions and substantial viewpoint changes. Their shorter side was resized to 480 pixels. The reference images, by comparison, are daylit Street View crops taken in good weather with a consistent camera. This test places a diverse set of user photographs against a comparatively uniform reference collection.

SF-XL test v2 uses 598 queries from the San Francisco Landmark Dataset. Its query photographs are more homogeneous, generally with clear views and sunny conditions. They come with six-degrees-of-freedom pose labels, which make the set suitable for studies of camera pose. The experiments reported here use their positions for the same recall evaluation as v1. Because the two sets share their references, their results show how outcomes vary with query source and appearance under a common gallery.

The external evaluation covers Pitts250k, Pitts30k, Tokyo 24/7, Mapillary Street Level Sequences, and St Lucia. Commonly shortened to MSLS, Mapillary Street Level Sequences is evaluated on its validation set because its test labels were unavailable to the authors. Both MSLS and St Lucia contain forward-facing imagery collected from vehicles. The Pittsburgh and Tokyo benchmarks use Street View material for their reference databases. These differences give the authors several ways to examine transfer. A trained encoder encounters new locations as well as differences in acquisition, depending on the benchmark.

#### What counts as a successful retrieval

The main metric is recall at a rank cutoff. For a given query, a search succeeds if at least one reference within the specified distance appears among the results up to that cutoff. With R@1, the highest-ranked result must qualify. With R@5, a qualifying result anywhere in the first five is sufficient. The San Francisco tables also report R@10. The common threshold is 25 meters between the known query location and the reference position.

The ranks answer different practical questions. R@1 measures whether the descriptor search alone puts a nearby view first. A higher cutoff measures how frequently the search preserves a nearby view in a shortlist that could be used in another stage. One query contributes a single success at each cutoff, even if multiple references in its list satisfy the distance criterion. The metric depends on geographical proximity, so the returned photo can be useful under the protocol without showing exactly the same framing or orientation.

A recall score also depends on the reference collection. If no reference is close enough, a descriptor cannot retrieve a qualifying image. If many nearby references are available, there are more possible qualifying results. The shared database keeps that part of the test fixed when methods are compared on either San Francisco split. Comparing the raw percentages across different benchmarks also brings in differences in coverage, query difficulty, and collection procedure.

#### The comparison systems and their training data

The main comparison includes NetVLAD, CRN, SARE, and SFRS, as well as a GeM retrieval baseline. The authors train these systems on Pitts30k with color jitter. The GeM baseline is useful because it shares the choice of pooling with CosPlace while following a different training procedure. Its native descriptor dimension is 512 in the main tables. SARE and SFRS use 4096, and the main NetVLAD and CRN rows use 32,768.

For GeM and NetVLAD the authors can also run training on larger collections using partial mining. They include runs trained on MSLS and on SF-XL. Earlier mining-based systems distinguish a training query set from a database in which to seek positives and negatives. SF-XL comes as a single training collection, so the authors create partitions using dates. The partition called `SF-XL*` uses queries taken after 2010. The `SF-XL**` split puts the cutoff at 2015 and gives the reference side of training a denser collection. The starting stock of imagery is SF-XL in both instances, but which images can take which role changes.

The main comparison holds the VGG-16 backbone family constant. Descriptor widths and the training datasets still differ across rows. The authors explain the practical reasons. Pitts30k and MSLS lack the heading labels needed for the full CosPlace training procedure. Running several earlier techniques on SF-XL at full mining scale was also impractical. SFRS's implementation, for instance, relies on distances for pairs of training queries and database images. The number of those pairs grows with the sizes of both sets. Applying partial mining to SARE or SFRS in this comparison would require substantial changes to their procedures.

The external-benchmark table also includes published results for SPE-VLAD, SRALNet, APPSVR, and APANet where those results were available. The authors mark them as results they could not independently reproduce because public implementations were unavailable. For the external experiments they ran, the table reports averages over 3 runs with seeds 0, 1 and 2. The averages across benchmarks refer to methods with results across the relevant suite. The comparison focuses on the first retrieval itself and excludes methods that apply a separate reranking stage.

#### Finding matches in San Francisco

On SF-XL test v1, CosPlace leads the main comparison at the reported rank cutoffs. Its R@1 is 64.7, its R@5 is 73.3, and its R@10 is 76.6. SFRS, trained on Pitts30k, gives 51.2, 62.2, and 66.6 under the same protocol. CRN is another comparatively strong baseline on that split, at 45.8 for R@1 and 56.9 for R@5. The difference is especially relevant to the study's design because v1 deliberately combines diverse user photography with a homogeneous reference source.

Top-ranked recall on SF-XL test v1 CosPlace leads the retrieval baselines on the Flickr queries.

**The numbers**

| System or setting | R@1 % |
| --- | --- |
| GeM trained on Pitts30k | 21.7 |
| NetVLAD trained on Pitts30k | 40.0 |
| CRN trained on Pitts30k | 45.8 |
| SFRS trained on Pitts30k | 51.2 |
| CosPlace trained on SF-XL (this paper) | 64.7 |

In the chart, the star marks CosPlace. That run uses the CosPlace groups from SF-XL. The dated partitions used for mining apply to the baselines trained with them. NetVLAD trained on the partition with the 2010 cutoff reaches 38.3 R@1 on v1, and the run with the 2015 cutoff reaches 28.4. For comparison, the version trained on MSLS has 22.9 R@1. Enlarging the training collection under the available mining strategy thus gives mixed results and leaves a substantial gap to CosPlace on this set.

On SF-XL test v2, the strongest methods are much closer. CosPlace gives 83.4 R@1, 91.6 R@5, and 94.1 R@10. SFRS gives 83.1, 90.5, and 93.5. SARE trained on Pitts30k reaches 78.8 R@1. The v2 reference imagery is identical to v1's, so a change of database cannot account for the easier retrieval observed across the strongest systems. The authors describe less severe differences between many v2 queries and their references. Since the query sets also differ in composition, the results measure the overall difference between the query protocols and do not quantify the impact of any single appearance condition.

The city results also show why the choice of rank cutoff matters. A method can return a useful candidate farther down the list even when its first result misses the target area. The v1 numbers illustrate this for each of the stronger methods. CosPlace improves both first-result recall and the chance of including a candidate at the larger cutoffs. Its advantage on v2 is smaller at all of those ranks. The evidence therefore gives a more specific account than a single statement that citywide accuracy improved.

#### Transfer to established benchmarks

Across the five external benchmarks in the main comparison, CosPlace reaches average R@1 of 87.0 and average R@5 of 93.1. NetVLAD trained on MSLS and SFRS trained on Pitts30k each have average R@1 of 78.5. Their average R@5 values are 88.0 and 87.1, respectively. The paper describes the top-ranked average advantage over the next best result as 8.5% of R@1. The result summarizes breadth across benchmarks, and the individual scores show where that breadth comes from.

Average top-ranked recall across the external benchmarks CosPlace has the best average across the benchmark suite.

**The numbers**

| System or setting | R@1 % |
| --- | --- |
| GeM trained on MSLS | 66.6 |
| NetVLAD trained on Pitts30k | 72.0 |
| SARE trained on Pitts30k | 77.0 |
| SFRS trained on Pitts30k | 78.5 |
| NetVLAD trained on MSLS | 78.5 |
| CosPlace trained on SF-XL (this paper) | 87.0 |

On Tokyo 24/7, CosPlace records R@1 of 82.8 ± 0.9 and R@5 of 90.0 ± 0.6. The SFRS results are 78.5 ± 0.8 and 87.3 ± 0.5. On the MSLS validation split, CosPlace gives 79.5 ± 0.1 R@1, compared with 75.4 ± 0.4 for NetVLAD trained on MSLS. These two tests use different sources of reference imagery. Strong results on both support the paper's claim that the descriptor transfers across the image sources represented in its benchmark suite.

The Pittsburgh results put the average in perspective. On Pitts250k, SFRS gives 90.1 ± 0.3 R@1 while CosPlace gives 89.7 ± 0.0. At R@5 on that benchmark, CosPlace reaches 96.4 ± 0.2 and SFRS reaches 95.8 ± 0.2. On Pitts30k, SFRS has R@1 of 88.7 ± 0.3 and CosPlace has 88.5 ± 0.2. Methods trained on Pitts30k can therefore be particularly competitive on the Pittsburgh tests, depending on the rank cutoff.

St Lucia supplies a different comparison. CosPlace reaches 94.3 ± 0.4 R@1, while NetVLAD trained on MSLS reaches 92.8 ± 0.4 and SFRS trained on Pitts30k reaches 72.5 ± 3.6. At R@5, the MSLS-trained NetVLAD run gives 97.6 ± 0.3 and CosPlace gives 97.4 ± 0.3. Together with Pittsburgh, this shows why the paper distinguishes performance across settings from the best result in any one setting. Some baselines are competitive within the imagery they handle well. CosPlace retains strong recall across the suite with a single training source.

#### Efficiency and comparisons at the same descriptor width

The paper reports GPU requirements for the VGG-16 configuration used in its main results. The SFRS training setup uses four GPUs with 11 GB apiece, while CosPlace uses 7.5 GB on a single GPU. The authors describe the training GPU memory reduction as roughly 80%. There is also the separate cost of creating and storing cached features for mining. For a full-scale conventional cache on SF-XL, the authors estimate that extracting descriptors would require a forward pass over 40M images, that storage would reach 5TB, and that the refresh would be needed every 1000 iterations. That is an estimate for the contemplated scaling of the older procedure, whereas 7.5 GB describes the actual CosPlace training configuration.

The reported CosPlace run takes approximately one day on SF-XL, similar to the reported duration of SFRS training on Pitts30k. A V100 extracts 80 images per second with the VGG-16 encoder. The authors attribute much of descriptor extraction speed to the backbone and find similar rates among methods with the same backbone. Once reference descriptors can be prepared offline, exhaustive neighbor search is the part where a smaller vector makes a direct computational difference. The authors describe the search with 512-dimensional CosPlace vectors as 8 times faster than with 4096-dimensional SFRS vectors and 64 times faster than with 32k-dimensional NetVLAD vectors in the large-database setting they discuss. Those comparisons concern the exhaustive search cost as a function of descriptor width.

The appendix also compares methods at a fixed descriptor width of 512. This separates the question of who has the best retrieval results at native widths from the question of what each system can do under the same descriptor storage constraint. On SF-XL test v1 in that comparison, CosPlace gives 65.1 R@1 and SFRS gives 35.6. On test v2, the corresponding values are 83.4 and 78.1. On the MSLS validation split, CosPlace gives 79.6 ± 0.5 R@1 and the MSLS-trained NetVLAD run gives 72.6 ± 0.5. The appendix reports a separate set of runs, so its numbers should be read within that setting. The equal-width comparison shows that the compact retrieval result persists when competitors' outputs are also made compact.

An exploratory comparison asks how encoders trained for landmark retrieval perform when evaluated by geographical recall. The compared configurations share a residual backbone, GeM pooling, and a 512-dimensional output. With ResNet-50, the SF-XL and CosPlace configuration reaches 92.3 R@1 on Pitts250k, against 85.8 for the Google Landmark training configuration and 84.5 for SfM120k. On Tokyo 24/7 with ResNet-101, the corresponding results are 88.9, 77.8, and 77.5. The landmark configurations were trained with a triplet loss. These are comparisons of what the trained encoders retrieve on a common set of tests. The training objectives, datasets, and available labels differ, so the comparison does not isolate the loss. The paper also provides qualitative examples of the images retrieved by CosPlace and several baselines to complement the recall figures.

### What the ablations show

#### Position and heading both affect the training problem

The main grouping ablation holds the cell side at 10 meters and varies how classes use headings and how those classes are separated. The results are R@1 on the SF-XL validation split. With a heading interval of 360°, every direction in a cell falls into the same class. When the procedure uses this broad interval and gives all geographical cells to a single group, recall is 85.8. Keeping the broad interval and separating cells with `N = 5` raises recall to 88.5. Within this comparison, geographical separation helps even when the label makes no distinction among directions.

Introducing headings changes both the content of each class and the potential for neighboring classes to compete. With a heading interval of 30°, geographical spacing set to `N = 5`, and angular spacing set to `L = 1`, recall is 88.2. Geographical separation helps with neighboring cells under this setting, but neighboring direction bins can still compete within a cell. With `N = 1` and `L = 2`, recall is 77.1. This time the procedure spaces heading bins and leaves adjacent geographical cells together. Both kinds of separation are active in the standard setting, which achieves 90.9.

Effect of class separation on SF-XL validation recall The setting that separates adjacent cells and adjacent heading bins has the highest recall.

**The numbers**

| System or setting | R@1 % |
| --- | --- |
| Position classes with no group separation | 85.8 |
| Position classes with geographical separation | 88.5 |
| Position and heading classes with geographical separation | 88.2 |
| Position and heading classes with angular separation | 77.1 |
| CosPlace with geographical and angular separation (this paper) | 90.9 |

These comparisons explain why a heading field by itself is an incomplete change. Heading can give a class a more consistent visual target, but it also creates new boundaries between views of similar scenes. Under geographical spacing alone, switching from a single directional bin to narrow directional bins leaves the result slightly lower in these runs. When adjacent heading bins are kept apart, direction becomes useful in combination with geographical separation. The ablation supports the paper's explanation that classification depends as much on what is placed in competition as on which images receive the same label.

The broader sweep in the appendix changes the class widths `M` and `α` and the spacing parameters `N` and `L`. The authors evaluate these choices on the SF-XL validation set with ResNet-18. The parameters influence both the visual coherence of a class and the amount of data available in a group. A narrow class limits the shift in position or heading among its examples. Greater spacing separates the competitors but can leave fewer classes for training, especially when a dataset is geographically small. The selected settings reflect that balance on SF-XL.

#### Group construction and the number of groups are distinct choices

The appendix also varies how many properly spaced groups the encoder sees. Training on a single such group lowers SF-XL validation R@1 by just 1% in the authors' sweep, with the best observed result at 8 of the 50 groups. This experiment answers a different question from the test that puts every class in a single group. In that earlier test, adjacent classes compete directly. Here, the selected group already excludes those neighbors from its own classifier, and the question is how much further benefit comes from letting the encoder learn across several alternative groupings.

A single well-separated group can contain views distributed across the city and a substantial set of classes. Additional groups expose the encoder to other positions and headings in the same shared descriptor space. The schedule has a fixed training length in the main configuration, so using more groups changes how often each group can recur during training. The reported optimum is evidence for the authors' choice of schedule and grouping on their validation split. The paper does not present it as a general optimum for other cities, image collections, or training budgets.

#### Pooling, backbone, and descriptor size

Using ResNet-18, the authors replace GeM with average pooling or max pooling while retaining CosPlace training. Pooling reduces the spatial feature output to a fixed-size representation. Average pooling gives broad influence to responses across the image, while max pooling keeps the strongest response for each feature. GeM gives a generalized mean aggregation. The experiment makes it possible to ask how much of the result depends on this particular pooling choice.

The paper reports good performance with max pooling as well as GeM. On Pitts250k, max pooling reaches 90.8 R@1, compared with 90.4 for GeM and 88.5 for average pooling. GeM has the stronger result on Tokyo 24/7 at 81.6, against 78.1 for max pooling and 73.7 for average pooling. On the MSLS validation set the values are 81.8 for GeM, 80.5 for max pooling, and 78.5 for average pooling. The different outcomes indicate that the precise pooling operation affects recall. They also show that the classification procedure can learn competitive descriptors through a conventional max pooling architecture.

The backbone experiments vary both the feature extractor and the width of its output. The convolutional runs use VGG-16 and residual networks, including ResNet-18, ResNet-50, and ResNet-101. They use GeM followed by a projection, and the paper explores descriptor widths from 32-D to 2048-D. The results show strong performance for residual backbones with compact outputs. The authors highlight the ResNet-101 configuration with 128-D descriptors as outperforming the previous state of the art in their comparison. The appendix also reports that the evaluated 128-D CosPlace configurations outperform the 4096-D NetVLAD baseline trained on Pitts30k across the test datasets under consideration. The residual architectures follow [Deep Residual Learning for Image Recognition](https://md.research.elamur.ai/free/en/papers/he-2015-deep-residual-learning-image-recognition/).

The vision transformer experiments use a different path to form the descriptor. The compact transformer configurations use the 384-D output from their sequence pooling stage. The ViT configuration passes its classification token through a small projection network with a tanh activation, yielding a 768-D output. The authors report that taking the classification token directly gave lower recall in preliminary tests. The ViT setup follows the original treatment in [An Image is Worth 16x16 Words](https://md.research.elamur.ai/free/en/papers/dosovitskiy-2020-image-worth-16x16-words-transformers/).

The transformer runs have lower results than the stronger convolutional runs in the paper's comparisons. The authors keep training settings such as learning rate and optimizer common across architectures, and the input sizes differ. The convolutional runs use 512 × 512, while ViT and CCT224 use 224×224 and CCT384 uses 384×384. The evidence shows that the grouping and classification procedure can be used with both kinds of backbone, with the observed ranking tied to the training and resolution choices tested.

#### Reducing the training collection

The downward-scaling comparison samples progressively smaller training collections from SF-XL. In this experiment, Pitts250k R@1 moves from 90.4 with 5.6M images to 86.0 with 120k, 82.1 with 12k, and 73.3 with 1.2k. Tokyo 24/7 shows 81.6, 67.9, 61.3, and 45.7 at those sizes. The MSLS validation result similarly moves from 81.8 at 5.6M to 55.0 at 1.2k. St Lucia begins at 98.8 and still reaches 85.2 in the smallest condition. The amount of degradation varies across benchmarks, and the direction of the change is consistent in this comparison.

The distinction between the sample-size experiment and the group-count experiment matters. A single group drawn from a dense citywide collection can still offer many classes and many views. Reducing the number of available images by sampling creates a different scarcity, even if the geographical source stays the same. The small-data results support the authors' claim that CosPlace is particularly suited to settings with abundant imagery. They also show that avoiding mining solves a computational problem while leaving the need for substantial visual evidence intact.

### Limitations

#### Limits the authors identify

CosPlace uses heading labels to construct its training classes. This requirement rules out the full procedure on common training collections such as Pitts30k and MSLS. The authors argue that new imagery can acquire heading from a sensor, as it can acquire position, without a manual annotation process. That argument concerns new collection. An existing dataset with positions alone still lacks the information the standard grouping needs. The experiments with wide heading intervals show what happens when the training rule uses position alone in the authors' ablation, with its best reported setting below the full position-and-heading configuration on SF-XL validation.

The authors also identify limited downward scalability. Their training-set size experiment shows that a few successful retrievals can survive substantial sub-sampling, while the strongest results depend on far more images. The relevant resources include repeated observations within cells as well as overall coverage. This is reflected in the rule that excludes cells with fewer than 10 panoramas. A small dataset may have too few classes, too few appearances of a class, or both under the chosen partition.

At the other end of the scale, the authors point out that the main run trains on only 13.6% of SF-XL. They demonstrate that the procedure can learn from millions of images in their schedule. The effect of training on all the groups, revisiting each sufficiently often, and using the full collection remains open. The test database also covers the city with 2.8M images, rather than evaluating retrieval over all 41.2M. Those choices make the experiment feasible while bounding what the paper establishes about using the entire collection.

#### Limits of the comparisons

The principal comparisons measure complete training and retrieval configurations. The common VGG-16 backbone reduces one source of variation, and the fixed-width appendix controls the length of the descriptors. The systems still use different training sets, pooling mechanisms, objectives, or mining strategies. That matters when attributing gains. GeM and NetVLAD trained on SF-XL with partial mining supply evidence that access to a larger collection alone did not guarantee strong results under the tested procedure. They do not tell us how an otherwise equivalent triplet-based run with full mining could have performed on that data.

The authors' controlled grouping tests provide a more direct comparison of the rules within CosPlace. Those experiments establish that separating adjacent classes improves retrieval in the SF-XL validation setup. They do not independently measure how much of the main cross-benchmark gain comes from training in San Francisco, from using a geographically dense collection, or from the loss itself. The architecture experiments show compatibility with different backbones under common settings. They leave open the relative results after a full tuning effort for each backbone.

The San Francisco evaluation tests new queries in the geography used for training. This is deliberate and appropriate to the application the authors propose. The external tests supply complementary evidence about transfer. Taken together, the two kinds of tests show that the encoder can work in a familiar city under changing query conditions and can also be used elsewhere with a suitable reference collection. The paper trains on one citywide collection. It leaves the reproducibility of the same data and training strategy across multiple densely sampled cities for further evaluation.

The query construction limits more specific claims about robustness. The v1 queries are hand selected and include substantial changes in lighting, viewpoint, and visibility. Aggregate recall across those queries does not determine how much each change matters or how frequently the same changes would occur in another application. Comparing v1 with v2 holds the reference database fixed while changing several aspects of the queries together. It shows that CosPlace's advantage varies by query set, with limited evidence for attributing the difference to any isolated condition.

Finally, a reference within 25 meters satisfies the reported task. The score gives no estimate of errors within that radius, and the experiments do not evaluate recovery of the query's full camera pose. The v2 labels make a pose study possible, but the paper's results for that split concern retrieval. The same scope applies to computational performance. The paper reports memory, timing, and descriptor size in named configurations, with a search comparison based on exhaustive nearest neighbors. It leaves open end-to-end latency under other indexing methods and the effect of adding a reranking stage.

### What came after

No follow-up studies are identified for discussion.

## Cite

Cite as Gabriele Berton, Carlo Masone and Barbara Caputo. 2022. Rethinking Visual Geo-localization for Large-Scale Applications. arXiv:2204.02287.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2204.02287](https://doi.org/10.48550/arxiv.2204.02287) · [arXiv 2204.02287](https://arxiv.org/abs/2204.02287)

```bibtex
@misc{berton2022rethinking,
  title = {{Rethinking Visual Geo-localization for Large-Scale Applications}},
  author = {Gabriele Berton, Carlo Masone and Barbara Caputo},
  year = {2022},
  doi = {10.48550/arxiv.2204.02287},
  eprint = {2204.02287},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2204.02287}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
