Revert yolov5 test cases
authorTae-Young Chung <ty83.chung@samsung.com>
Tue, 5 Apr 2022 03:11:06 +0000 (12:11 +0900)
committerInki Dae <inki.dae@samsung.com>
Wed, 20 Jul 2022 05:16:40 +0000 (14:16 +0900)
[Version] 0.18.1-0
[Issue type] revert

After redesigning test cases of yolov5 test cases, it will be back.
Now, revert them.

Change-Id: I475a74448fd011f33d162d7ba3974a0ce01baa3c
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
test/testsuites/machine_learning/inference/test_object_detection.cpp

index 98925e93295c1e98d5675e8fa4bbb7affe60a87a..75b54b0eef3ad9af9bc659bf3192e1a1eb4d30e4 100644 (file)
        MV_CONFIG_PATH \
        "/res/inference/images/dog2.jpg"
 
-#define OD_TFLITE_WEIGHT_YOLO_V5m_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5m-fp32-416.tflite"
-#define OD_SNPE_WEIGHT_YOLO_V5m_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5m-fp32-416.dlc"
-#define OD_SNPE_WEIGHT_QUANT_YOLO_V5m_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5m-quant-416.dlc"
-
-#define OD_TFLITE_WEIGHT_YOLO_V5s_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5s-fp32-416.tflite"
-#define OD_SNPE_WEIGHT_YOLO_V5s_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5s-fp32-416.dlc"
-#define OD_SNPE_WEIGHT_QUANT_YOLO_V5s_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5s-quant-416.dlc"
-
-#define OD_SNPE_WEIGHT_QC_YOLO_V5m_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5m.dlc"
-#define OD_SNPE_WEIGHT_QUANT_QC_YOLO_V5m_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5m_quantize.dlc"
-#define OD_SNPE_WEIGHT_QC_YOLO_V5s_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5s.dlc"
-#define OD_SNPE_WEIGHT_QUANT_QC_YOLO_V5s_416_PATH \
-       MV_CONFIG_PATH                      \
-       "/models/OD/snpe/yolov5s_quantize.dlc"
-
-#define OD_LABEL_YOLO_V5_416_PATH \
-       MV_CONFIG_PATH                \
-       "models/OD/snpe/label_coco_80.txt"
-
 void _object_detected_cb(mv_source_h source, const int number_of_objects,
                                                 const int *indices, const char **names,
                                                 const float *confidences,
@@ -82,22 +45,6 @@ public:
        }
 };
 
-class TestObjectDetectionSnpe : public TestInference
-{
-public:
-       void inferenceDog()
-       {
-               TestInference::ConfigureInference();
-
-               ASSERT_EQ(MediaVision::Common::ImageHelper::loadImageToSource(
-                                                 IMG_DOG, mv_source),
-                                 MEDIA_VISION_ERROR_NONE);
-               ASSERT_EQ(mv_inference_object_detect(mv_source, infer,
-                                                                                        _object_detected_cb, NULL),
-                                 MEDIA_VISION_ERROR_NONE);
-       }
-};
-
 TEST_P(TestObjectDetectionTflite, MobilenetV1_SSD)
 {
        engine_config_hosted_tflite_model(engine_cfg, OD_TFLITE_WEIGHT_MOBILENET_V1_SSD_300_PATH,
@@ -133,128 +80,9 @@ TEST_P(TestObjectDetectionTflite, MobilenetV1_SSD)
        inferenceDog();
 }
 
-
-TEST_P(TestObjectDetectionSnpe, YoloV5mQC)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_QC_YOLO_V5m_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionSnpe, YoloV5mQC_Quantized)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_QUANT_QC_YOLO_V5m_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionSnpe, YoloV5sQC)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_QC_YOLO_V5s_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionSnpe, YoloV5sQC_Quantized)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_QUANT_QC_YOLO_V5s_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionTflite, YoloV5m)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_tflite_model(
-                       engine_cfg, OD_TFLITE_WEIGHT_YOLO_V5m_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionSnpe, YoloV5m)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_YOLO_V5m_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionSnpe, YoloV5m_Quantized)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_QUANT_YOLO_V5m_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionTflite, YoloV5s)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_tflite_model(
-                       engine_cfg, OD_TFLITE_WEIGHT_YOLO_V5s_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionSnpe, YoloV5s)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_YOLO_V5s_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
-TEST_P(TestObjectDetectionSnpe, YoloV5s_Quantized)
-{
-       ASSERT_TRUE(_use_json_parser);
-       engine_config_hosted_snpe_model(
-                       engine_cfg, OD_SNPE_WEIGHT_QUANT_YOLO_V5s_416_PATH,
-                       OD_LABEL_YOLO_V5_416_PATH,
-                       _use_json_parser, _target_device_type);
-
-       inferenceDog();
-}
-
 INSTANTIATE_TEST_CASE_P(Prefix, TestObjectDetectionTflite,
                                                ::testing::Values(
                                                        ParamTypes(false, MV_INFERENCE_TARGET_DEVICE_CPU),
                                                        ParamTypes(true, MV_INFERENCE_TARGET_DEVICE_CPU)
                                                )
 );
-
-INSTANTIATE_TEST_CASE_P(Prefix, TestObjectDetectionSnpe,
-                                               ::testing::Values(
-                                                       ParamTypes(true, MV_INFERENCE_TARGET_DEVICE_CPU),
-                                                       ParamTypes(true, MV_INFERENCE_TARGET_DEVICE_GPU),
-                                                       ParamTypes(true, MV_INFERENCE_TARGET_DEVICE_CUSTOM)
-                                               )
-);
\ No newline at end of file