diff options
author | Inki Dae <inki.dae@samsung.com> | 2020-06-16 10:18:46 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2020-06-26 08:58:22 +0900 |
commit | 4a9d76e1ff6ec4d7b9a20ce6c28aa3eebc7096ab (patch) | |
tree | e30e81948596b7c83d1eec854ecbdcd5cbd99043 | |
parent | 7f4fde27995c5f9ab9bf079c7a6fec0bbd9968e3 (diff) | |
download | mediavision-4a9d76e1ff6ec4d7b9a20ce6c28aa3eebc7096ab.tar.gz mediavision-4a9d76e1ff6ec4d7b9a20ce6c28aa3eebc7096ab.tar.bz2 mediavision-4a9d76e1ff6ec4d7b9a20ce6c28aa3eebc7096ab.zip |
test: Do not set array size explictly
Change-Id: Ia8b4c081d74bcb3f36e2469dad96df9d64f0ed62
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | test/testsuites/inference/inference_test_suite.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/test/testsuites/inference/inference_test_suite.c b/test/testsuites/inference/inference_test_suite.c index 4929301a..5f5cbdb2 100644 --- a/test/testsuites/inference/inference_test_suite.c +++ b/test/testsuites/inference/inference_test_suite.c @@ -437,8 +437,8 @@ int perform_configuration(mv_engine_config_h *engine_cfg) int err = MEDIA_VISION_ERROR_NONE; int sel_opt = 0; - const int options[13] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; - const char *names[13] = { "Set Model Configuration", + const int options[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; + const char *names[] = { "Set Model Configuration", "Set Model Weights", "Set Model Data Type", "Set Model UserFile", @@ -548,7 +548,7 @@ int perform_tflite_mobilenetv1_config(mv_engine_config_h *engine_cfg) } char *inputNodeName = "input_2"; - char *outputNodeName[1] = { "dense_3/Softmax" }; + char *outputNodeName[] = { "dense_3/Softmax" }; mv_engine_config_set_string_attribute( handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, IC_TFLITE_WEIGHT_PATH); @@ -611,7 +611,7 @@ int perform_armnn_mobilenetv1_config(mv_engine_config_h *engine_cfg) } char *inputNodeName = "input_2"; - char *outputNodeName[1] = { "dense_3/Softmax" }; + char *outputNodeName[] = { "dense_3/Softmax" }; mv_engine_config_set_string_attribute( handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, IC_TFLITE_WEIGHT_PATH); @@ -674,7 +674,7 @@ int perform_nnfw_mobilenetv1_quant_config(mv_engine_config_h *engine_cfg) } char *inputNodeName = "input"; - char *outputNodeName[1] = { "MobilenetV1/Predictions/Reshape_1" }; + char *outputNodeName[] = { "MobilenetV1/Predictions/Reshape_1" }; mv_engine_config_set_string_attribute( handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, IC_Q_TFLITE_WEIGHT_PATH); @@ -737,7 +737,7 @@ int perform_vivante_inceptionv3_config(mv_engine_config_h *engine_cfg) } char *inputNodeName = "input"; - char *outputNodeName[1] = { "InceptionV3/Predictions/Peshape_1" }; + char *outputNodeName[] = { "InceptionV3/Predictions/Peshape_1" }; mv_engine_config_set_string_attribute(handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, @@ -805,7 +805,7 @@ int perform_opencv_caffe_squeezenet_config(mv_engine_config_h *engine_cfg) } char *inputNodeName = "data"; - char *outputNodeName[1] = { "prob" }; + char *outputNodeName[] = { "prob" }; mv_engine_config_set_string_attribute(handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, @@ -861,8 +861,8 @@ int perform_image_classification() int err = MEDIA_VISION_ERROR_NONE; int sel_opt = 0; - const int options[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - const char *names[9] = { "Configuration", + const int options[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + const char *names[] = { "Configuration", "TFLite(cpu + Mobilenet)", "OpenCV(cpu + Squeezenet)", "ARMNN(cpu + Mobilenet)", @@ -1128,7 +1128,7 @@ int perform_tflite_mobilenetv1ssd_config(mv_engine_config_h *engine_cfg) } char *inputNodeName = "normalized_input_image_tensor"; - char *outputNodeName[4] = { "TFLite_Detection_PostProcess", + char *outputNodeName[] = { "TFLite_Detection_PostProcess", "TFLite_Detection_PostProcess:1", "TFLite_Detection_PostProcess:2", "TFLite_Detection_PostProcess:3" }; @@ -1263,7 +1263,7 @@ int perform_armnn_mobilenetv1ssd_config(mv_engine_config_h *engine_cfg) } char *inputNodeName = "normalized_input_image_tensor"; - char *outputNodeName[4] = { "TFLite_Detection_PostProcess", + char *outputNodeName[] = { "TFLite_Detection_PostProcess", "TFLite_Detection_PostProcess:1", "TFLite_Detection_PostProcess:2", "TFLite_Detection_PostProcess:3" }; @@ -1316,8 +1316,8 @@ int perform_object_detection() int err = MEDIA_VISION_ERROR_NONE; int sel_opt = 0; - const int options[7] = { 1, 2, 3, 4, 5, 6, 7 }; - const char *names[7] = { "Configuration", + const int options[] = { 1, 2, 3, 4, 5, 6, 7 }; + const char *names[] = { "Configuration", "TFLITE(CPU) + MobileNetV1+SSD", "OPENCV(CPU) + MobileNetV1+SSD", "ARMNN(CPU) + MobileNetV1+SSD", @@ -1555,7 +1555,7 @@ int perform_tflite_mobilenetv1ssd_face(mv_engine_config_h *engine_cfg) } char *inputNodeName = "normalized_input_image_tensor"; - char *outputNodeName[4] = { "TFLite_Detection_PostProcess", + char *outputNodeName[] = { "TFLite_Detection_PostProcess", "TFLite_Detection_PostProcess:1", "TFLite_Detection_PostProcess:2", "TFLite_Detection_PostProcess:3" }; @@ -1618,7 +1618,7 @@ int perform_opencv_resnet10ssd_face(mv_engine_config_h *engine_cfg) } char *inputNodeName = "data"; - char *outputNodeName[1] = { "detection_out" }; + char *outputNodeName[] = { "detection_out" }; mv_engine_config_set_string_attribute(handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, @@ -1683,7 +1683,7 @@ int perform_armnn_mobilenetv1ssd_face(mv_engine_config_h *engine_cfg) } char *inputNodeName = "normalized_input_image_tensor"; - char *outputNodeName[4] = { "TFLite_Detection_PostProcess", + char *outputNodeName[] = { "TFLite_Detection_PostProcess", "TFLite_Detection_PostProcess:1", "TFLite_Detection_PostProcess:2", "TFLite_Detection_PostProcess:3" }; @@ -1733,8 +1733,8 @@ int perform_face_detection() int err = MEDIA_VISION_ERROR_NONE; int sel_opt = 0; - const int options[7] = { 1, 2, 3, 4, 5, 6, 7 }; - const char *names[7] = { "Configuration", + const int options[] = { 1, 2, 3, 4, 5, 6, 7 }; + const char *names[] = { "Configuration", "TFLite(CPU) + MobileNetV1 + SSD", "OPENCV(CPU) + Resnet10 + SSD", "ARMNN(CPU) + MobileNetV1 + SSD", @@ -1905,8 +1905,8 @@ int perform_face_detection() } sel_opt = 0; - const int options_last[2] = { 1, 2 }; - const char *names_last[2] = { "Yes", "No" }; + const int options_last[] = { 1, 2 }; + const char *names_last[] = { "Yes", "No" }; while (sel_opt == 0) { sel_opt = show_menu("Run Face Detection again?:", options_last, @@ -1969,7 +1969,7 @@ int perform_tflite_TweakCNN(mv_engine_config_h *engine_cfg) } char *inputNodeName = "INPUT_TENSOR_NAME"; - char *outputNodeName[1] = { "OUTPUT_TENSOR_NAME" }; + char *outputNodeName[] = { "OUTPUT_TENSOR_NAME" }; mv_engine_config_set_string_attribute(handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, @@ -2027,7 +2027,7 @@ int perform_opencv_cnncascade(mv_engine_config_h *engine_cfg) } char *inputNodeName = "data"; - char *outputNodeName[1] = { "Sigmoid_fc2" }; + char *outputNodeName[] = { "Sigmoid_fc2" }; mv_engine_config_set_string_attribute(handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, @@ -2076,8 +2076,8 @@ int perform_facial_landmark_detection() int err = MEDIA_VISION_ERROR_NONE; int sel_opt = 0; - const int options[6] = { 1, 2, 3, 4, 5, 6 }; - const *names[6] = { "Configuration", + const int options[] = { 1, 2, 3, 4, 5, 6 }; + const *names[] = { "Configuration", "Tflite(CPU) + TweakCNN", "OPENCV(CPU) + TweakCNN", "Prepare", @@ -2235,8 +2235,8 @@ int perform_facial_landmark_detection() } sel_opt = 0; - const int options_last[2] = { 1, 2 }; - const char *names_last[2] = { "Yes", "No" }; + const int options_last[] = { 1, 2 }; + const char *names_last[] = { "Yes", "No" }; while (sel_opt == 0) { sel_opt = show_menu( @@ -2300,7 +2300,7 @@ int perform_armnn_pose_estimation_detection(mv_engine_config_h *engine_cfg) } char *inputNodeName = "image"; - char *outputNodeName[1] = { "Convolutional_Pose_Machine/stage_5_out" }; + char *outputNodeName[] = { "Convolutional_Pose_Machine/stage_5_out" }; mv_engine_config_set_string_attribute( handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, PE_TFLITE_WEIGHT_PATH); @@ -2344,8 +2344,8 @@ int perform_pose_estimation_detection() int err = MEDIA_VISION_ERROR_NONE; int sel_opt = 0; - const int options[5] = { 1, 2, 3, 4, 5 }; - const *names[5] = { "Configuration", "ARMNN(CPU) + PoseEstimation", + const int options[] = { 1, 2, 3, 4, 5 }; + const *names[] = { "Configuration", "ARMNN(CPU) + PoseEstimation", "Prepare", "Run", "Back" }; mv_engine_config_h engine_cfg = NULL; @@ -2483,8 +2483,8 @@ int perform_pose_estimation_detection() } sel_opt = 0; - const int options_last[2] = { 1, 2 }; - const char *names_last[2] = { "Yes", "No" }; + const int options_last[] = { 1, 2 }; + const char *names_last[] = { "Yes", "No" }; while (sel_opt == 0) { sel_opt = show_menu( @@ -2513,8 +2513,8 @@ int main() { int sel_opt = 0; - const int options[6] = { 1, 2, 3, 4, 5, 6 }; - const char *names[6] = { "Image Classification", "Object Detection", + const int options[] = { 1, 2, 3, 4, 5, 6 }; + const char *names[] = { "Image Classification", "Object Detection", "Face Detection", "Facial LandmarkDetection", "Pose Estimation", "Exit" }; @@ -2570,8 +2570,8 @@ int main() } sel_opt = 0; - const int options_last[2] = { 1, 2 }; - const char *names_last[2] = { "Yes", "No" }; + const int options_last[] = { 1, 2 }; + const char *names_last[] = { "Yes", "No" }; while (sel_opt == 0) { sel_opt = |