[Decoder/BoundingBox] Add option to specify TF-SSD output tensors mapping
authorXavier Roumegue <xavier.roumegue@nxp.com>
Fri, 22 Jan 2021 19:46:02 +0000 (19:46 +0000)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 1 Feb 2021 23:28:26 +0000 (08:28 +0900)
commitf662391fa2131d1559ca21e042e7814d7d255177
tree98a3238ad3f128c537d01ce864e2acc35f7c71dd
parentb717235cfc72724398d487377806b398e7f130e6
[Decoder/BoundingBox] Add option to specify TF-SSD output tensors mapping

Recent tensor flow object detections neural network models use output
tensor mapping defined by google:

https://www.tensorflow.org/lite/models/object_detection/overview#output_signature

which is different than the one currently used on bounding boxes tensor
decoder element.

This patch adds the possibility to specify any output tensors mapping
through the option-3 parameter for tf-ssd mode using the following
convention:

locations index:classes index: scores index: number of detections index.

For example, option3=0:1:2:3 would map the output tensors as defined by
previous link, .i.e. :
- Bounding boxes locations tensor on index 0
- Classes tensor on index 1
- Scores tensor on index 2
- Number of detection tensor on index 3

option3 for tf-ssd mode is optional, and if not specified, the default
tensors mapping preserve the backward compatibility (.i.e. 3:1:2:0)

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c