mv_machine_learning: fix wrong tensor order 67/279967/1
authorInki Dae <inki.dae@samsung.com>
Fri, 19 Aug 2022 12:00:08 +0000 (21:00 +0900)
committerInki Dae <inki.dae@samsung.com>
Fri, 19 Aug 2022 12:00:08 +0000 (21:00 +0900)
[Verion] : 0.23.19-0
[Issue type] : bug fix

Fixed wrong tensor order. Tensor order, NWHC, doesn't exist.
So correct the tensor order and return width, height and channel value
correctly.

Change-Id: I53b3078d2121c9718bc5a9864ebefd0d5907b7af
Signed-off-by: Inki Dae <inki.dae@samsung.com>
mv_machine_learning/inference/src/InputMetadata.cpp
packaging/capi-media-vision.spec

index d6bc290..2ca878d 100644 (file)
@@ -207,23 +207,23 @@ namespace inference
        int LayerInfo::GetWidth() const {
                if (shapeType == INFERENCE_TENSOR_SHAPE_NCHW) {
                        return dims[3];
-               } else { // INFERENCE_TENSOR_SHAPE_NWHC
-                       return dims[1];
+               } else { // INFERENCE_TENSOR_SHAPE_NHWC
+                       return dims[2];
                }
        }
 
        int LayerInfo::GetHeight() const {
                if (shapeType == INFERENCE_TENSOR_SHAPE_NCHW) {
                        return dims[2];
-               } else { // INFERENCE_TENSOR_SHAPE_NWHC
-                       return dims[2];
+               } else { // INFERENCE_TENSOR_SHAPE_NHWC
+                       return dims[1];
                }
        }
 
        int LayerInfo::GetChannel() const {
                if (shapeType == INFERENCE_TENSOR_SHAPE_NCHW) {
                        return dims[1];
-               } else { // INFERENCE_TENSOR_SHAPE_NWHC
+               } else { // INFERENCE_TENSOR_SHAPE_NHWC
                        return dims[3];
                }
        }
index 8de4f60..beedef3 100644 (file)
@@ -1,6 +1,6 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.23.18
+Version:     0.23.19
 Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-3-Clause