mv_machine_learning: add async API for face detection task group
authorInki Dae <inki.dae@samsung.com>
Fri, 12 May 2023 07:23:53 +0000 (16:23 +0900)
committerKwanghoon Son <k.son@samsung.com>
Tue, 4 Jul 2023 05:08:39 +0000 (14:08 +0900)
commite7987a76f1bcc5396a61db94721e11074331a338
tree293d614e03a13bd1ed5503b9ed52b9e272612be5
parent8cfa515df3b9830e5a2849c3820010477f8f6682
mv_machine_learning: add async API for face detection task group

[Issue type] : new feature

Add async API support for face detection task group.

For async API support, it implements '_incoming_queue' to store
input tensors requested by user and '_outgoing_queue' to retrieve
the final result after decoding the inference results obtained
by processing each input tensor from the '_incoming_queue'.

When a user requests the result, the final result is retrieved from
'_outgoing_queue' and stored in '_current_result' for consistency
because user can use two more native API to get the result, which
is maintained until the next inference request is made.

In default, async API has frame skip behavior if previous request is being
performed. And which in turn, it minimizes time delay between input frame
and inference result. There is no longer a need to perform complex tasks
in application code to reduce the time delay with this patch.

Change-Id: If46e7f9a3a8e5ffbe564cea0439ff3dfe762e6c9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
include/mv_face_detection_internal.h
include/mv_face_detection_type.h
mv_machine_learning/object_detection/include/face_detection_adapter.h
mv_machine_learning/object_detection/src/face_detection_adapter.cpp
mv_machine_learning/object_detection/src/mv_face_detection.cpp
test/testsuites/machine_learning/object_detection/test_object_detection_async.cpp