Fix yolo build error 35/284035/1
authorKwanghoon Son <k.son@samsung.com>
Wed, 9 Nov 2022 03:21:21 +0000 (22:21 -0500)
committerKwanghoon Son <k.son@samsung.com>
Wed, 9 Nov 2022 03:21:21 +0000 (22:21 -0500)
Change-Id: I87bb85d4ad8c096acef479dc29fb9d42c88205a9
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
mv_machine_learning/inference/src/InputMetadata.cpp

index bda1ec4..33255af 100644 (file)
@@ -171,19 +171,17 @@ int InputMetadata::GetPreProcess(JsonObject *root)
                                LOGI("%u: scale[%3.2f], zeropoint[%3.2f]", elem, s, z);
                        }
                }
-               option.insert(std::make_pair(iterLayer->first, opt));
-       }
 
-       if (json_object_has_member(preprocess_object, "resize")) {
-               const char *resizer = static_cast<const char *>(json_object_get_string_member(preprocess_object, "resize"));
-               if (strcmp(resizer, "LETTERBOX") == 0) {
-                       opt.resizer = Resizer::LETTERBOX;
-                       LOGI("resizer changed to letterbox");
+               if (json_object_has_member(pObject, "resize")) {
+                       const char *resizer = static_cast<const char *>(json_object_get_string_member(pObject, "resize"));
+                       if (strcmp(resizer, "LETTERBOX") == 0) {
+                               opt.resizer = Resizer::LETTERBOX;
+                               LOGI("resizer changed to letterbox");
+                       }
                }
+               option.insert(std::make_pair(iterLayer->first, opt));
        }
 
-       option.insert(std::make_pair(iterLayer->first, opt));
-
        LOGI("LEAVE");
 
        return MEDIA_VISION_ERROR_NONE;