diff options
-rw-r--r-- | tests/YoloDatabase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/YoloDatabase.cpp b/tests/YoloDatabase.cpp index 0f5dee026c..472fc8083d 100644 --- a/tests/YoloDatabase.cpp +++ b/tests/YoloDatabase.cpp @@ -83,7 +83,10 @@ std::unique_ptr<YoloDatabase::TTestCaseData> YoloDatabase::GetTestCaseData(unsig try { InferenceTestImage image(imagePath.c_str()); - image.Resize(YoloImageWidth, YoloImageHeight, CHECK_LOCATION()); + if (YoloImageWidth != image.GetWidth() || YoloImageHeight != image.GetHeight()) + { + image.Resize(YoloImageWidth, YoloImageHeight, CHECK_LOCATION()); + } imageData = GetImageDataInArmNnLayoutAsNormalizedFloats(ImageChannelLayout::Rgb, image); } catch (const InferenceTestImageException& e) |