[TEST] Test protobuf and flatbuf support tensors
authorGichan Jang <gichan2.jang@samsung.com>
Fri, 12 Mar 2021 04:47:03 +0000 (13:47 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 15 Mar 2021 02:29:21 +0000 (11:29 +0900)
Test whether flatbuffer and protobuf support other/tensors.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
tests/nnstreamer_flatbuf/runTest.sh
tests/nnstreamer_protobuf/runTest.sh

index ef323da..d319920 100755 (executable)
@@ -102,4 +102,18 @@ callCompareTest testsynch19_2.golden testsynch19_2.log 4-3 "Tensor mux Compare 4
 callCompareTest testsynch19_3.golden testsynch19_3.log 4-4 "Tensor mux Compare 4-4" 1 0
 callCompareTest testsynch19_4.golden testsynch19_4.log 4-5 "Tensor mux Compare 4-5" 1 0
 
+# test other/tensors
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_mux name=tensors_mux sync_mode=basepad sync_option=1:50000000 ! tensor_decoder mode=flatbuf ! other/flatbuf-tensor ! tensor_converter ! multifilesink location=testsynch19_5_%1d.log \
+    tensor_mux name=tensor_mux0  sync_mode=slowest ! tensor_decoder mode=flatbuf ! other/flatbuf-tensor ! tensor_converter ! tensors_mux.sink_0 \
+    tensor_mux name=tensor_mux1  sync_mode=slowest ! tensor_decoder mode=flatbuf ! other/flatbuf-tensor ! tensor_converter ! tensors_mux.sink_1 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)10/1\" ! pngdec ! tensor_converter ! tensor_mux0.sink_0 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)20/1\" ! pngdec ! tensor_converter ! tensor_mux0.sink_1 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! tensor_mux1.sink_0 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)20/1\" ! pngdec ! tensor_converter ! tensor_mux1.sink_1" 5 0 0 $PERFORMANCE
+callCompareTest testsynch19_0.golden testsynch19_5_0.log 5-1 "Tensor mux Compare 5-1" 1 0
+callCompareTest testsynch19_1.golden testsynch19_5_1.log 5-2 "Tensor mux Compare 5-2" 1 0
+callCompareTest testsynch19_2.golden testsynch19_5_2.log 5-3 "Tensor mux Compare 5-3" 1 0
+callCompareTest testsynch19_3.golden testsynch19_5_3.log 5-4 "Tensor mux Compare 5-4" 1 0
+callCompareTest testsynch19_4.golden testsynch19_5_4.log 5-5 "Tensor mux Compare 5-5" 1 0
+
 report
index fa5029e..949a70f 100755 (executable)
@@ -102,4 +102,18 @@ callCompareTest testsynch19_2.golden testsynch19_2.log 4-3 "Tensor mux Compare 4
 callCompareTest testsynch19_3.golden testsynch19_3.log 4-4 "Tensor mux Compare 4-4" 1 0
 callCompareTest testsynch19_4.golden testsynch19_4.log 4-5 "Tensor mux Compare 4-5" 1 0
 
+# test other/tensors
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_mux name=tensors_mux sync_mode=basepad sync_option=1:50000000 ! tensor_decoder mode=protobuf ! other/protobuf-tensor ! tensor_converter ! multifilesink location=testsynch19_5_%1d.log \
+    tensor_mux name=tensor_mux0  sync_mode=slowest ! tensor_decoder mode=protobuf ! other/protobuf-tensor ! tensor_converter ! tensors_mux.sink_0 \
+    tensor_mux name=tensor_mux1  sync_mode=slowest ! tensor_decoder mode=protobuf ! other/protobuf-tensor ! tensor_converter ! tensors_mux.sink_1 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)10/1\" ! pngdec ! tensor_converter ! tensor_mux0.sink_0 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)20/1\" ! pngdec ! tensor_converter ! tensor_mux0.sink_1 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! tensor_mux1.sink_0 \
+    multifilesrc location=\"testsequence03_%1d.png\" index=0 caps=\"image/png, framerate=(fraction)20/1\" ! pngdec ! tensor_converter ! tensor_mux1.sink_1" 5 0 0 $PERFORMANCE
+callCompareTest testsynch19_0.golden testsynch19_5_0.log 5-1 "Tensor mux Compare 5-1" 1 0
+callCompareTest testsynch19_1.golden testsynch19_5_1.log 5-2 "Tensor mux Compare 5-2" 1 0
+callCompareTest testsynch19_2.golden testsynch19_5_2.log 5-3 "Tensor mux Compare 5-3" 1 0
+callCompareTest testsynch19_3.golden testsynch19_5_3.log 5-4 "Tensor mux Compare 5-4" 1 0
+callCompareTest testsynch19_4.golden testsynch19_5_4.log 5-5 "Tensor mux Compare 5-5" 1 0
+
 report