From: Yongjoo Ahn Date: Fri, 1 Sep 2023 06:41:43 +0000 (+0900) Subject: [test] Replace tensorflow1-lite with tensorflow2-lite in SSAT tests X-Git-Tag: accepted/tizen/unified/20230907.175333~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e08afc794fa7bb1738505a89359061e1cd94d2e8;p=platform%2Fupstream%2Fnnstreamer.git [test] Replace tensorflow1-lite with tensorflow2-lite in SSAT tests - Let's use tensorflow2-lite rather than deprecated tf1-lite. Signed-off-by: Yongjoo Ahn --- diff --git a/tests/meson.build b/tests/meson.build index 6e26557..5318f9d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -43,7 +43,7 @@ unittest_util_dep = declare_dependency(link_with: unittest_util_shared, subdir('nnstreamer_repo_dynamicity') # filter_reload (Currently, the reload test for tensor filter requires tflite) -if tflite_support_is_available +if tflite2_support_is_available subdir('nnstreamer_filter_reload') endif @@ -384,11 +384,11 @@ if get_option('install-test') install_subdir('nnstreamer_filter_custom', install_dir: unittest_install_dir) if tflite_support_is_available install_subdir('nnstreamer_filter_tensorflow_lite', install_dir: unittest_install_dir) + endif + if tflite2_support_is_available install_subdir('nnstreamer_decoder_image_labeling', install_dir: unittest_install_dir) install_subdir('nnstreamer_decoder_image_segment', install_dir: unittest_install_dir) install_subdir('nnstreamer_filter_reload', install_dir: unittest_install_dir) - endif - if tflite2_support_is_available install_subdir('nnstreamer_filter_tensorflow2_lite', install_dir: unittest_install_dir) endif if have_python3 diff --git a/tests/nnstreamer_decoder_image_labeling/runTest.sh b/tests/nnstreamer_decoder_image_labeling/runTest.sh index 99f5bb1..50cd9a2 100644 --- a/tests/nnstreamer_decoder_image_labeling/runTest.sh +++ b/tests/nnstreamer_decoder_image_labeling/runTest.sh @@ -24,9 +24,9 @@ PATH_TO_PLUGIN="../../build" if [[ -d $PATH_TO_PLUGIN ]]; then ini_path="${PATH_TO_PLUGIN}/ext/nnstreamer/tensor_filter" if [[ -d ${ini_path} ]]; then - check=$(ls ${ini_path} | grep tensorflow1-lite.so) + check=$(ls ${ini_path} | grep tensorflow2-lite.so) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi @@ -47,9 +47,9 @@ else fi if [[ -d ${value} ]]; then - check=$(ls ${value} | grep tensorflow1-lite.so) + check=$(ls ${value} | grep tensorflow2-lite.so) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi @@ -71,7 +71,7 @@ PATH_TO_MODEL="../test_models/models/mobilenet_v1_1.0_224_quant.tflite" PATH_TO_LABEL="../test_models/labels/labels.txt" PATH_TO_IMAGE="../test_models/data/orange.png" -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=\"${PATH_TO_IMAGE}\" ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw, format=RGB, framerate=0/1 ! tensor_converter ! tensor_filter framework=\"tensorflow1-lite\" model=\"${PATH_TO_MODEL}\" ! \ +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=\"${PATH_TO_IMAGE}\" ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw, format=RGB, framerate=0/1 ! tensor_converter ! tensor_filter framework=\"tensorflow2-lite\" model=\"${PATH_TO_MODEL}\" ! \ tee name=t ! queue ! tensor_transform mode=typecast option=uint8 ! tensor_decoder mode=image_labeling option1=\"${PATH_TO_LABEL}\" ! filesink location=\"tensordecoder.orange.uint8.log\" \ t. ! queue ! tensor_transform mode=typecast option=uint16 ! tensor_decoder mode=image_labeling option1=\"${PATH_TO_LABEL}\" ! filesink location=\"tensordecoder.orange.uint16.log\" \ t. ! queue ! tensor_transform mode=typecast option=uint32 ! tensor_decoder mode=image_labeling option1=\"${PATH_TO_LABEL}\" ! filesink location=\"tensordecoder.orange.uint32.log\" \ diff --git a/tests/nnstreamer_decoder_image_segment/runTest.sh b/tests/nnstreamer_decoder_image_segment/runTest.sh index f7d35e7..1b3164c 100644 --- a/tests/nnstreamer_decoder_image_segment/runTest.sh +++ b/tests/nnstreamer_decoder_image_segment/runTest.sh @@ -24,9 +24,9 @@ PATH_TO_PLUGIN="../../build" if [[ -d $PATH_TO_PLUGIN ]]; then ini_path="${PATH_TO_PLUGIN}/ext/nnstreamer/tensor_filter" if [[ -d ${ini_path} ]]; then - check=$(ls ${ini_path} | grep tensorflow1-lite.so) + check=$(ls ${ini_path} | grep tensorflow2-lite.so) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi @@ -47,9 +47,9 @@ else fi if [[ -d ${value} ]]; then - check=$(ls ${value} | grep tensorflow1-lite.so) + check=$(ls ${value} | grep tensorflow2-lite.so) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi @@ -68,12 +68,12 @@ fi PATH_TO_MODEL="../test_models/models/deeplabv3_257_mv_gpu.tflite" # THIS SHOULD EMIT ERROR -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=1 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=640,height=480 ! tee name=t t. ! queue ! mix. t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! tensor_decoder mode=image_segment option1=tflite-deeplab ! mix. videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! videoconvert ! fakesink" 0_n 0 1 +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=1 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=640,height=480 ! tee name=t t. ! queue ! mix. t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! tensor_decoder mode=image_segment option1=tflite-deeplab ! mix. videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! videoconvert ! fakesink" 0_n 0 1 # THIS WON'T FAIL, BUT NOT MUCH MEANINGFUL. -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=257 ! tee name=t t. ! queue ! mix. t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! tensor_decoder mode=image_segment option1=tflite-deeplab ! mix. videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! videoconvert ! fakesink" 0_p 0 0 +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=257 ! tee name=t t. ! queue ! mix. t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! tensor_decoder mode=image_segment option1=tflite-deeplab ! mix. videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! videoconvert ! fakesink" 0_p 0 0 -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=257 ! tee name=t t. ! queue ! mix. t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! tensor_decoder mode=image_segment option1=tflite-deeplab ! mix. videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! filesink location=test_output.0" 1 0 0 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=257 ! tee name=t t. ! queue ! mix. t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! tensor_decoder mode=image_segment option1=tflite-deeplab ! mix. videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! filesink location=test_output.0" 1 0 0 $PERFORMANCE callCompareTest test_golden.0 test_output.0 1 "test with videotestsrc" 0 @@ -82,7 +82,7 @@ gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} \ videotestsrc num_buffers=4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=257 ! tee name=t \ t. ! queue ! mix. \ t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! \ - tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} latency=1 throughput=1 ! \ + tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} latency=1 throughput=1 ! \ tensor_decoder mode=image_segment option1=snpe-deeplab option2=180 ! mix. \ videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! videoconvert ! fakesink" \ 2 0 0 $PERFORMANCE @@ -92,7 +92,7 @@ gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} \ videotestsrc num_buffers=1 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=257 ! tee name=t \ t. ! queue ! mix. \ t. ! queue ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,div:255.0 ! \ - tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! \ + tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! \ tensor_decoder mode=image_segment option1=snpe-depth ! mix. \ videomixer name=mix sink_0::alpha=0.7 sink_1::alpha=0.6 ! videoconvert ! fakesink" \ 3_n 0 1 diff --git a/tests/nnstreamer_filter_reload/runTest.sh b/tests/nnstreamer_filter_reload/runTest.sh index 37dc727..bbcca40 100644 --- a/tests/nnstreamer_filter_reload/runTest.sh +++ b/tests/nnstreamer_filter_reload/runTest.sh @@ -28,9 +28,9 @@ PATH_TO_PLUGIN="../../build" if [[ -d $PATH_TO_PLUGIN ]]; then ini_path="${PATH_TO_PLUGIN}/ext/nnstreamer/tensor_filter" if [[ -d ${ini_path} ]]; then - check=$(ls ${ini_path} | grep tensorflow1-lite.${SO_EXT}) + check=$(ls ${ini_path} | grep tensorflow2-lite.${SO_EXT}) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi @@ -51,9 +51,9 @@ else fi if [[ -d ${value} ]]; then - check=$(ls ${value} | grep tensorflow1-lite.${SO_EXT}) + check=$(ls ${value} | grep tensorflow2-lite.${SO_EXT}) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi diff --git a/tests/nnstreamer_filter_tensorflow_lite/runTest.sh b/tests/nnstreamer_filter_tensorflow_lite/runTest.sh index c9086c6..8e1a4cf 100644 --- a/tests/nnstreamer_filter_tensorflow_lite/runTest.sh +++ b/tests/nnstreamer_filter_tensorflow_lite/runTest.sh @@ -24,9 +24,9 @@ PATH_TO_PLUGIN="../../build" if [[ -d $PATH_TO_PLUGIN ]]; then ini_path="${PATH_TO_PLUGIN}/ext/nnstreamer/tensor_filter" if [[ -d ${ini_path} ]]; then - check=$(ls ${ini_path} | grep tensorflow1-lite.so) + check=$(ls ${ini_path} | grep tensorflow2-lite.so) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi @@ -47,9 +47,9 @@ else fi if [[ -d ${value} ]]; then - check=$(ls ${value} | grep tensorflow1-lite.so) + check=$(ls ${value} | grep tensorflow2-lite.so) if [[ ! $check ]]; then - echo "Cannot find tensorflow1-lite shared lib" + echo "Cannot find tensorflow2-lite shared lib" report exit fi @@ -69,35 +69,35 @@ PATH_TO_MODEL="../test_models/models/mobilenet_v1_1.0_224_quant.tflite" PATH_TO_LABEL="../test_models/labels/labels.txt" PATH_TO_IMAGE="../test_models/data/orange.png" -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! filesink location=tensorfilter.out.log" 1 0 0 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! filesink location=tensorfilter.out.log" 1 0 0 $PERFORMANCE python3 checkLabel.py tensorfilter.out.log ${PATH_TO_LABEL} orange testResult $? 1 "Golden test comparison" 0 1 # Fail test for invalid input properties -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} input=7:1 inputtype=float32 ! filesink location=tensorfilter.out.log" 2F_n 0 1 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} input=7:1 inputtype=float32 ! filesink location=tensorfilter.out.log" 2F_n 0 1 $PERFORMANCE # Fail test for invalid output properties -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} output=1:7 outputtype=int8 ! filesink location=tensorfilter.out.log" 3F_n 0 1 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} output=1:7 outputtype=int8 ! filesink location=tensorfilter.out.log" 3F_n 0 1 $PERFORMANCE PATH_TO_MULTI_TENSOR_OUTPUT_MODEL="../test_models/models/multi_person_mobilenet_v1_075_float.tflite" # Simple tests for multi-tensor output model # This should emit error because of invalid width and height size -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=353,height=257 ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,add:-127.5,div:127.5 ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MULTI_TENSOR_OUTPUT_MODEL} ! fakesink" 4_n 0 1 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=353,height=257 ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,add:-127.5,div:127.5 ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MULTI_TENSOR_OUTPUT_MODEL} ! fakesink" 4_n 0 1 $PERFORMANCE # This won't fail, but not much meaningful -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=353 ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,add:-127.5,div:127.5 ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MULTI_TENSOR_OUTPUT_MODEL} ! fakesink" 5 0 0 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=257,height=353 ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,add:-127.5,div:127.5 ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MULTI_TENSOR_OUTPUT_MODEL} ! fakesink" 5 0 0 $PERFORMANCE # Input and output combination test -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc pattern=13 num-buffers=1 ! videoconvert ! video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! tee name=t t. ! queue ! mux.sink_0 t. ! queue ! filesink location=combi.dummy.golden buffer-mode=unbuffered sync=false async=false filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! mux.sink_1 tensor_mux name=mux ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} input-combination=1 output-combination=i0,o0 ! tensor_demux name=demux demux.src_0 ! filesink location=tensorfilter.combi.in.log buffer-mode=unbuffered sync=false async=false demux.src_1 ! filesink location=tensorfilter.combi.out.log buffer-mode=unbuffered sync=false async=false" 7 0 0 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc pattern=13 num-buffers=1 ! videoconvert ! video/x-raw,width=640,height=480,framerate=30/1 ! tensor_converter ! tee name=t t. ! queue ! mux.sink_0 t. ! queue ! filesink location=combi.dummy.golden buffer-mode=unbuffered sync=false async=false filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! mux.sink_1 tensor_mux name=mux ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} input-combination=1 output-combination=i0,o0 ! tensor_demux name=demux demux.src_0 ! filesink location=tensorfilter.combi.in.log buffer-mode=unbuffered sync=false async=false demux.src_1 ! filesink location=tensorfilter.combi.out.log buffer-mode=unbuffered sync=false async=false" 7 0 0 $PERFORMANCE callCompareTest combi.dummy.golden tensorfilter.combi.in.log 7_0 "Output Combination Golden Test 7-0" 1 0 python3 checkLabel.py tensorfilter.combi.out.log ${PATH_TO_LABEL} orange testResult $? 1 "Golden test comparison" 0 1 -# Test the backend setting done with tensorflow1-lite +# Test the backend setting done with tensorflow2-lite # This also performs tests for generic backend configuration parsing function run_pipeline() { - gst-launch-1.0 --gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} accelerator=$1 ! filesink location=tensorfilter.out.log 2>info + gst-launch-1.0 --gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} accelerator=$1 ! filesink location=tensorfilter.out.log 2>info } arch=$(uname -m) @@ -195,20 +195,20 @@ cat info | grep "accl = ${auto_accl}$" testResult $? 2-17 "accelerator set test" 0 1 # Property reading test for accelerator before setting the framework (analogous test is 2-3) -gst-launch-1.0 --gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter accelerator=true:!npu,gpu framework=tensorflow1-lite model=${PATH_TO_MODEL} ! filesink location=tensorfilter.out.log 2>info +gst-launch-1.0 --gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter accelerator=true:!npu,gpu framework=tensorflow2-lite model=${PATH_TO_MODEL} ! filesink location=tensorfilter.out.log 2>info cat info | grep "accl = gpu$" testResult $? 2-18 "accelerator set test" 0 1 # Dimension declaration test cases -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! \"other/tensors,num_tensors=1,dimensions=1001:1:1\" ! filesink location=tensorfilter.out.log" 3 0 0 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! \"other/tensors,num_tensors=1,dimensions=1001:1:1\" ! filesink location=tensorfilter.out.log" 3 0 0 $PERFORMANCE python3 checkLabel.py tensorfilter.out.log ${PATH_TO_LABEL} orange testResult $? 3 "Golden test comparison" 0 1 -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! \"other/tensors,num_tensors=1,dimensions=(string)1001:1\" ! filesink location=tensorfilter.out.log" 4 0 0 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! \"other/tensors,num_tensors=1,dimensions=(string)1001:1\" ! filesink location=tensorfilter.out.log" 4 0 0 $PERFORMANCE python3 checkLabel.py tensorfilter.out.log ${PATH_TO_LABEL} orange testResult $? 4 "Golden test comparison" 0 1 -gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow1-lite model=${PATH_TO_MODEL} ! \"other/tensors,num_tensors=1,dimensions=(string)1001\" ! filesink location=tensorfilter.out.log" 5 0 0 $PERFORMANCE +gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow2-lite model=${PATH_TO_MODEL} ! \"other/tensors,num_tensors=1,dimensions=(string)1001\" ! filesink location=tensorfilter.out.log" 5 0 0 $PERFORMANCE python3 checkLabel.py tensorfilter.out.log ${PATH_TO_LABEL} orange testResult $? 5 "Golden test comparison" 0 1