﻿# SuperPoint features: keep each descriptor attached to its selected keypoint

Preserve SuperPoint keypoint coordinates, detection scores, descriptors and valid-point masks as a coupled feature set before passing them to a matcher.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-superpoint-keypoint-descriptor-mask-alignment/
Language: en

## Recognize the coupled feature output

SuperPoint jointly produces interest-point detections and descriptors. The [original paper](https://arxiv.org/abs/1712.07629) describes detection and description as related outputs of a shared network. A descriptor represents visual information associated with a selected image location; it is not an independent category prediction. Downstream matching therefore needs the correspondence between coordinate, descriptor and detection score to remain intact through filtering, batching and serialization.

## Preserve indexing when selecting points

The [official implementation](https://github.com/magicleap/SuperPointPretrainedNetwork) provides the reference detection and description procedure. If an application sorts locations by score or restricts their number, apply the same selection to all coupled arrays. Sorting only coordinates while retaining the original descriptor order produces numerically well-shaped data that describes the wrong point-feature associations. A matcher can still return plausible lines, making an indexing bug look like an ordinary failure of visual similarity.

## Respect the batch validity information

The [Transformers interface](https://huggingface.co/docs/transformers/model_doc/superpoint) documents keypoints, scores, descriptors and a mask for valid detections in batched output. Do not interpret padded entries as additional interest points. Keep validity attached to each image when splitting a batch into individual results. The number of allocated positions in a tensor does not independently establish how many points were actually selected for that image under the current detection configuration.

## Maintain the image coordinate convention

Check whether the selected interface exposes normalized or image-space coordinates and how postprocessing restores the target size. A later resize or crop can invalidate a previously correct association with the source image if coordinates are not transformed consistently. Descriptor comparison and geometric verification also answer different questions. Similar local appearance can propose a correspondence without proving that the matched pair obeys the camera geometry required by a reconstruction task.

## Test the complete feature handoff

Use a pair with repeated texture and another with a clear distinctive structure. Save the selected feature indices and confirm that visualization draws the same points whose descriptors reach the matcher. The guides to [image geometry](/journal/data-guide-image-exif-box-coordinate/) and [ragged-batch masks](/journal/learn-ragged-batch-padding-masks/) explain related handling. SuperPoint's specific boundary is the coupled feature record: location, score, descriptor and validity must travel together, rather than becoming independently convenient arrays that lose their original correspondence.
