RoMaFeatureMatcher

class giant.image_processing.feature_matchers.RoMaFeatureMatcher(options=None)[source]

Implementation of a matcher using RoMa.

Initialize the RomaKeypointMatcher.

Parameters:
  • options (RoMaFeatureMatcherOptions | None) – The options to configure with

  • romatch_checkpoint – Path to the RoMa model checkpoint.

allowed_dtypes: list[type[Any] | dtype[Any] | _SupportsDType[dtype[Any]] | tuple[Any, Any] | list[Any] | _DTypeDict | str | None] = [<class 'numpy.uint8'>]

A list of dtypes allowed by the detector.

This must be implemented by subclasses.

match_images(image1, image2)[source]

Matches keypoints by overriding the base class method to use RoMa’s end-to-end matching process.

Parameters:
  • image1 (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The first image to match (as a NumPy array).

  • image2 (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The second image to match (as a NumPy array).

Returns:

An array of the matched keypoint locations of shape (N, 2, 2).

Return type:

ndarray[tuple[Any, …], dtype[float64]]