Matcher handler

class luna_backport3.app.handlers.matcher_handler.MatchHandler(request)[source]

Match handler

Resource: “/{api_version}/matching/match”

async post()[source]

Match a descriptor or person by descriptors, see spec_matching_match.

Raises:

VLException(Error.RequiredQueryParameterNotFound, 400, isCriticalError=False) – if required query parameter not found

Return type:

HTTPResponse

class luna_backport3.app.handlers.matcher_handler.MatchingIdentifyHandler(request)[source]

Identify handler

Resource: “/{api_version}/matching/identify”

async post()[source]

Match a descriptor or person by persons, see spec_matching_identify.

Raises:

VLException(Error.RequiredQueryParameterNotFound, 400, isCriticalError=False) – if required query parameter not found

Return type:

HTTPResponse

class luna_backport3.app.handlers.matcher_handler.MatchingSearchHandler(request)[source]

Search handler

Resource: “/{api_version}/matching/search”

static getHandlerPolicies(imageProcessingParams, matchPolicy, limit, listId=None, personIds=None, descriptorIds=None)[source]

Get policies as dict :param imageProcessingParams: prepared image processing params :param matchPolicy: prepared match policy :param limit: matching limit :param listId: list id :param personIds: person ids :param descriptorIds: descriptor ids

Returns:

search handler policies

Return type:

SearchHandlerPolicies

async getMatchByPersons(listId=None, personIds=None)[source]

Get match by persons :param listId: list id :param personIds: person ids

Returns:

True if match by persons else False

Raises:

VLException(Error.ListNotFound, 400, isCriticalError=False) if list not found

Return type:

bool

async getMatchPolicy(limit, listId=None, personIds=None, descriptorIds=None)[source]

Get match policy depends on input parameters :param limit: limit :param listId: list id :param personIds: person ids :param descriptorIds: descriptor ids

Returns:

match policy or None if got only person ids and persons have not descriptors

Return type:

Optional[MatchPolicy]

async post()[source]

Search a face on image by persons or descriptors, see spec_matching_search.

Raises:
  • VLException(Error.RequiredQueryParameterNotFound, isCriticalError=400, False) – if required query parameter not found

  • VLException(Error.UnsupportedQueryParam, 400, isCriticalError=False) – if unsupported query parameter found

Return type:

HTTPResponse

class luna_backport3.app.handlers.matcher_handler.MatchingVerifyHandler(request)[source]

Verify handler

Resource: “/{api_version}/matching/verify”

async post()[source]

Verify a descriptor by a person, see spec_matching_verify.

Return type:

HTTPResponse