Feature detectors and descriptors
Functions
Functions and classes to detect and describe image features
Bundles OpenCV feature detectors and descriptors into the FeatureDD class
Also makes it easier to mix and match feature detectors and descriptors from different pacakges (e.g. skimage and OpenCV). See CensureVggFD for an example
Classes
Base feature detector
- class valis.feature_detectors.FeatureDD(kp_detector=None, kp_descriptor=None, rgb=False, n_levels=1)[source]
Abstract class for feature detection and description.
User can create other feature detectors as subclasses, but each must return keypoint positions in xy coordinates along with the descriptors for each keypoint.
Note that in some cases, such as KAZE, kp_detector can also detect features. However, in other cases, there may need to be a separate feature detector (like BRISK or ORB) and feature descriptor (like VGG).
- detectAndCompute(image, mask=None)
Detects and describes keypoints in image
DISK
- class valis.feature_detectors.DiskFD(kp_detector=<class 'kornia.feature.disk.disk.DISK'>, kp_descriptor=<class 'kornia.feature.disk.disk.DISK'>, num_features=7500, quant_image=True, rgb=False, device=None, *args, **kwargs)[source]
Bases:
KorniaFDDISK feature detector and descriptor, implemented in Kornia.
Citation
Michał Tyszkiewicz, Pascal Fua, and Eduard Trulls. Disk: learning local features with policy gradient. Advances in Neural Information Processing Systems, 33:14254–14265, 2020.
DeDoDe
- class valis.feature_detectors.DeDoDeFD(kp_detector=<class 'kornia.feature.dedode.dedode.DeDoDe'>, kp_descriptor=<class 'kornia.feature.dedode.dedode.DeDoDe'>, num_features=7500, quant_image=True, rgb=False, device=None, *args, **kwargs)[source]
Bases:
KorniaFDDeDoDe feature detector and descriptor, implemented in Kornia.
Citation
Johan Edstedt, Georg Bökman, Mårten Wadenbäck, and Michael Felsberg. DeDoDe: Detect, Don’t Describe — Describe, Don’t Detect for Local Feature Matching. In 2024 International Conference on 3D Vision (3DV). 2024.
KorniaFD
BRISK
KAZE
AKAZE
DAISY
LATCH
BOOST
VGG
Orb + Vgg
SuperPoint
- class valis.feature_detectors.SuperPointFD(keypoint_threshold=0.005, nms_radius=4, force_cpu=False, kp_descriptor=None, kp_detector=None, *args, **kwargs)[source]
Bases:
FeatureDDSuperPoint FeatureDD
Use SuperPoint to detect and describe features (detect_and_compute) Adapted from https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/match_pairs.py
References
Paul-Edouard Sarlin, Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. SuperGlue: Learning Feature Matching with Graph Neural Networks. In CVPR, 2020. https://arxiv.org/abs/1911.11763