sample_id.ann.ann module¶
-
class
sample_id.ann.ann.
Matcher
(metadata)[source]¶ Bases:
abc.ABC
Nearest neighbor matcher that may use one of various implementations under the hood.
-
classmethod
create
(sr=None, hop_length=None, **kwargs)[source]¶ Create an instance, pass any kwargs needed by the subclass.
- Return type
-
filter_matches
(matches, abs_thresh=0.25, ratio_thresh=None, cluster_dist=4.0, cluster_size=2, match_orientation=True, ordered=False, cluster_filter=None)[source]¶
-
find_samples
(fp, k=1, abs_thresh=0.25, ratio_thresh=None, cluster_dist=20.0, cluster_size=2, match_orientation=True, ordered=False, cluster_filter=None)[source]¶ - Return type
-
classmethod
from_fingerprint
(fp, **kwargs)[source]¶ Useful for determining metadata for the Matcher based on the data being added.
- Return type
-
classmethod
from_fingerprints
(fingerprints, **kwargs)[source]¶ My data is small, just create and train the entire matcher.
- Return type
-
classmethod
load
(filepath, blocksize=10485760, threads=None, **kwargs)[source]¶ Load a matcher from disk.
- Return type
-
abstract
nearest_neighbors
(fp, k=1)[source]¶ Fetch nearest neighbors to this fingerprint’s keypoints.
-
classmethod