Linker task

To make a linker task it needs to get list_id to link faces to and some face_ids. Optionally, it is possible to set create_list parameter to 1 to create a new list (a faces link target). It is possible to get faces using one of two ways: getting faces from Luna Faces or Luna Events 1. Also, it needs account_id to create a task. If create_time_lt filter is not specified, it will be set to the current time.

Luna Faces

There are three filters to get faces from service. One can use them separately or together or do not use any filters (warning: it can be a very long task, depends on the count of faces in the database)

Filters:

account_id: required, filter by account id
list_id: id of the list, which faces will be linked to
create_time__gte: lower included bound for object create_time
create_time__lt: upper bound for object create_time (current time for default)
face_ids: face ids
user_data: user data filter
external_ids: filter by list of external Ids
face_id__lt: face_id upper excluded boundary
face_id__gte: face_id lower included boundary

Luna Events

There some filters, that also can be used separately or together:

Filters:

account_id: required, filter by account id
create_time__lt: upper bound for object create time (current time for default)
create_time__gte: lower included bound for object create_time
sources: source filter
event_ids: event ids
handler_ids: handler ids
top_matching_candidates_label: top matching candidate label
top_similar_object_ids: top similar object ids
top_similar_external_ids: top similar external ids
top_similar_object_similarity__gte: top similar object similarity lower included bound
top_similar_object_similarity__lt: top similar object similarity upper excluded bound
age__lt: age upper excluded bound
age__gte: age lower included bound
gender: gender filter
emotions: emotions filter
ethnic_groups: ethnic group filter
face_ids: face ids
user_data: user data filter
tags: tags filter
cities: city location filter
areas: area location filter
districts: district location filter
streets: street location filter
house_numbers: house number location filter
geo_position: geo position filter
masks: medical mask state filter
track_ids: track id filter
liveness: liveness state filter

Task performance:

  • Firstly, it checks the existence of specified list_id; or if create_list parameter set to 1 - creates a new list with user_data if specified.

  • It gets face id boundaries (for Luna Faces) or events’ page numbers (for Luna Events). Then forms one or several subtasks with about 1000 face ids per each - depends on face id spreading.

  • For each subtask: it gets face ids (for events - 1), specified for the current subtask by filters in the subtask content, and makes a request to the Luna Faces to link specified faces to the specified list. Each subtask saves its result to the Luna Image Store

  • After the last subtask is done, it collects results from all subtasks, merges and puts them to the Luna Image Store (as task result)


1(1,2)

for Luna Events:

  • get event with its descriptor from Luna Events

  • create face, attribute(s) and sample(s) in Luna Faces

  • link created face to the list