From 2b428034c9f6b2074f72888ce15344dbe55f1978 Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Tue, 6 Oct 2020 10:45:32 +0100 Subject: IVGCVSW-5405 Remove boost::make_iterator_range and boost::to_upper_copy * Removed from ModelAccuracyTool-Armnn and ImageCSVFileGenerator * Fixed formatting in ImageCSVFileGenerator Signed-off-by: Matthew Sloyan Change-Id: I09dfca27813582cc48f46d0507680368ed823a9c --- tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp') diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp index edc7e1cc33..dccf5ffdcd 100644 --- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp +++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp @@ -10,7 +10,6 @@ #include #include -#include #include using namespace armnn::test; @@ -391,11 +390,14 @@ map LoadValidationImageFilenamesAndLabels(const string { // Populate imageFilenames with names of all .JPEG, .PNG images std::vector imageFilenames; - for (const auto& imageEntry : - boost::make_iterator_range(fs::directory_iterator(fs::path(imageDirectoryPath)))) + for (const auto& imageEntry : fs::directory_iterator(fs::path(imageDirectoryPath))) { fs::path imagePath = imageEntry.path(); - std::string imageExtension = boost::to_upper_copy(imagePath.extension().string()); + + // Get extension and convert to uppercase + std::string imageExtension = imagePath.extension().string(); + std::transform(imageExtension.begin(), imageExtension.end(), imageExtension.begin(), ::toupper); + if (fs::is_regular_file(imagePath) && (imageExtension == ".JPEG" || imageExtension == ".PNG")) { imageFilenames.push_back(imagePath.filename().string()); -- cgit v1.2.1