mv_machine_learning: code refactoring to meta file approach
[Issue type] code refactoring
Did code refactoring to meta file approach by doing,
- Change existing meta file format with more generic way.
With this change, we can describe all input and output tensors of models.
Existing meta file didn't describe output tensor information but only
decoding way, and it made the use of multiple tensor descriptions
with their pre/post process ways not possible because tensor and
pre/post process information was handled separetely.
So we don't need to thinking of them separetely because each tensor
can or can't include pre/post process task according to a given model
file and even there are many combinations of them.
- Introduce MetadataType.h header file which includes meta file approach
common types.
- Introduce LabelInfo.h/cpp, NumberInfo.h/cpp.
The main purpose of this refactoring applies the enhanced meta file format,
Before
======
{
"inputmetadata" :
{
"tensor_info" : [
{
"name" : "xxx",
...
}
]
"preprocess" : [
{
"normalization" : [
{
...
}
]
...
}
]
}
"outputmetadata" :
{
"box" :
{
"name" : "tensor1_name",
..
},
"score" :
{
"name" : "tensor2_name",
},
...
}
}
[After]
=======
{
"input" : [
{
"tensor1" : {
"name" : "xxx",
...
"preprocess" : {
"normalization" : {
...
}
}
}
...
}
]
"output" : [
{
"tensor1" : {
"name" : "tensor1_name",
...
"postprocess" : {
"box" : {
...
}
}
},
"tensor2" : {
"name" : "tensor2_name",
...
"postprocess" : {
"score" : {
...
}
}
}
...
}
]
}
Change-Id: I9d9be615dc3dd972d506b807030c745d8a0916a9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
21 files changed: