Descriptor matching¶
Face descriptor matching¶
It is possible to match a pair (or more) previously extracted descriptors to find out their similarity. With this information, it is possible to implement face search and other analysis applications.
It is possible to match a pair of descriptors with each other or a single descriptor with a descriptor batch.
A simple rule to help you decide which storage to opt for:
when searching among less than a hundred descriptors use separate descriptor object;
when searching among bigger number of descriptors use a batch.
Module contains a face descriptor estimator
See `face descriptor`_.
Descriptor
garbage score
- Type
float
Get descriptor as bytes.
Returns:
- Return type
bytes
Convert to dict
- Returns
Dict with keys “descriptor” and “score”
- Return type
Dict
[str
,Union
[float
,bytes
]]
Convert descriptor to list of ints :returns: list of ints.
- Return type
List
[int
]
Get model of descriptor :returns: model version
- Return type
int
Get raw descriptors :returns: bytes with metadata
- Return type
bytes
Face descriptor batch.
list of garbage scores
- Type
List[float]
Add descriptor to end of batch.
- Parameters
descriptor – descriptor
- Return type
None
Get batch in json like object.
- Returns
list of descriptors dict
- Return type
List
[Dict
[~KT, ~VT]]
Face Descriptor factory.
faceEngine
- Type
Generate core descriptor
- Returns
core descriptor
- Return type
IDescriptorPtr
Generate core descriptors batch.
- Parameters
size – batch size
- Returns
batch
- Return type
IDescriptorBatchPtr
Module realize face descriptor match.
see face descriptors matching.
Base estimator class. Class is a container for core estimations. Mostly estimate attributes can be get through a corresponding properties.
core matcher
- Type
IDescriptorMatcherPtr
face descriptor factory
Match face descriptor vs face descriptors.
- Returns
List of matching results if match by several descriptors otherwise one MatchingResult.
- Return type
Union
[MatchingResult
,List
[MatchingResult
]]
Structure for storing matching results.
L2 distance between descriptors
- Type
float
descriptor similarity [0..1]
- Type
float