> For the complete documentation index, see [llms.txt](https://docs.earthindex.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.earthindex.ai/improve-your-results/how-search-works.md).

# How Earth Index finds matches

How Earth Index turns satellite imagery into numbers and finds tiles that look like your examples.

Earth Index does not look for objects by name. It looks for tiles of the map whose imagery resembles the tiles you labelled. Knowing how it measures "resembles" helps you choose better labels.

## The short version

* The map is cut into 320 m squares called tiles. A pre-trained model describes each tile with a list of 384 numbers, called an embedding.
* Tiles that look alike get similar numbers. A search finds the tiles whose numbers are closest to your examples.
* The model is fixed. Your labels are the only part you control, so they decide the result.

![Tiles become lists of numbers, and search finds the tiles nearest to your examples.](https://182773137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQB2eToY1Iv2IH6cERjn%2Fuploads%2Fgit-blob-1ae36879ae234b9602158f5d8aab317e19d01f96%2Fhow-search-works.svg?alt=media)

## Tiles become numbers

Earth Index cuts your area of interest into tiles of 320 m by 320 m. For each tile, a model that was trained on a large collection of satellite images reads the imagery and writes a list of 384 numbers. That list is the tile's embedding.

You never see these numbers. They matter because of one property: two tiles that look alike to the model get lists that are close to each other. A forest tile sits near other forest tiles, and an airstrip sits near other airstrips.

## Search means finding nearby tiles

When you label a tile as positive, you pick a point in this number space. Earth Index then looks for the tiles that sit closest to your examples and returns them as predictions.

The model never learns your target by name. It only knows which tiles are near your examples. If your examples are alike, the results are tight. If they are mixed, the results are scattered.

## Why your labels decide the result

The imagery, the model and the tile grid are the same for every user. The one thing that differs between a good search and a poor one is the set of labels you give it.

* **Positive labels** tell the search what to find.
* **Negative labels** tell it what to avoid. See [Why negatives matter](/improve-your-results/why-negatives-matter.md).
* **Varied examples** cover the different ways your target looks. See [Choose good examples](/improve-your-results/choose-good-examples.md).

{% hint style="success" %}
**What to do**

Treat each label as a point on a map of looks, not as a pin on a place. Choose tiles that show the range of looks you want, and add look-alikes that you do not want as negatives.
{% endhint %}

<details>

<summary>Go deeper</summary>

The model is SSL4EO-S12, a vision transformer (ViT-S/16) that was pre-trained on Sentinel-2 imagery without human labels (self-supervised learning). It reads the 12 spectral bands of Sentinel-2 Level-2A imagery and outputs one 384-number embedding for each tile. Earth Index measures how close two embeddings are with cosine distance.

* [SSL4EO-S12 paper](https://arxiv.org/abs/2211.07044)
* [SSL4EO-S12 code and models](https://github.com/zhu-xlab/SSL4EO-S12)

</details>

## Related

* [What the satellite sees](/improve-your-results/beyond-true-color.md)
* [Choose good examples](/improve-your-results/choose-good-examples.md)
* [Glossary](/reference/glossary.md)
