IVGCVSW-2900 Adding the Accuracy Checker Tool and tests

Change-Id: I4ac325e45f2236b8e0757d21046f117024ce3979
Signed-off-by: Éanna Ó Catháin <eanna.ocathain@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3056c9..c54c395 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,8 @@
     src/armnnUtils/HeapProfiling.hpp
     src/armnnUtils/LeakChecking.cpp
     src/armnnUtils/LeakChecking.hpp
+    src/armnnUtils/ModelAccuracyChecker.cpp
+    src/armnnUtils/ModelAccuracyChecker.hpp
     src/armnnUtils/CsvReader.cpp
     src/armnnUtils/CsvReader.hpp
     src/armnnUtils/FloatingPointConverter.cpp
@@ -455,6 +457,7 @@
         src/armnn/test/GraphUtils.hpp
         src/armnn/test/InstrumentTests.cpp
         src/armnn/test/LayerValidateOutputTest.cpp
+        src/armnn/test/ModelAccuracyCheckerTest.cpp
         src/armnn/test/NetworkTests.cpp
         src/armnn/test/ObservableTest.cpp
         src/armnn/test/OptimizerTests.cpp
diff --git a/src/armnn/test/ModelAccuracyCheckerTest.cpp b/src/armnn/test/ModelAccuracyCheckerTest.cpp
new file mode 100644
index 0000000..f3a6c9d
--- /dev/null
+++ b/src/armnn/test/ModelAccuracyCheckerTest.cpp
@@ -0,0 +1,98 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#include "ModelAccuracyChecker.hpp"
+
+#include <boost/algorithm/string.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+#include <string>
+#include <boost/log/core/core.hpp>
+#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
+#include <boost/variant.hpp>
+
+using namespace armnnUtils;
+
+struct TestHelper {
+    const std::map<std::string, int> GetValidationLabelSet()
+    {
+        std::map<std::string, int> validationLabelSet;
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000001", 2));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000002", 9));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000003", 1));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000004", 6));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000005", 5));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000006", 0));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000007", 8));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000008", 4));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000009", 3));
+        validationLabelSet.insert( std::make_pair("ILSVRC2012_val_00000009", 7));
+
+        return validationLabelSet;
+    }
+};
+
+BOOST_AUTO_TEST_SUITE(ModelAccuracyCheckerTest)
+
+using TContainer = boost::variant<std::vector<float>, std::vector<int>, std::vector<unsigned char>>;
+
+BOOST_FIXTURE_TEST_CASE(TestFloat32OutputTensorAccuracy, TestHelper)
+{
+    ModelAccuracyChecker checker(GetValidationLabelSet());
+
+    // Add image 1 and check accuracy
+    std::vector<float> inferenceOutputVector1 = {0.05f, 0.10f, 0.70f, 0.15f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
+    TContainer inference1Container(inferenceOutputVector1);
+    std::vector<TContainer> outputTensor1;
+    outputTensor1.push_back(inference1Container);
+
+    std::string imageName = "ILSVRC2012_val_00000001.JPEG";
+    checker.AddImageResult<TContainer>(imageName, outputTensor1);
+
+    // Top 1 Accuracy
+    float totalAccuracy = checker.GetAccuracy(1);
+    BOOST_CHECK(totalAccuracy == 100.0f);
+
+    // Add image 2 and check accuracy
+    std::vector<float> inferenceOutputVector2 = {0.10f, 0.0f, 0.0f, 0.0f, 0.05f, 0.70f, 0.0f, 0.0f, 0.0f, 0.15f};
+    TContainer inference2Container(inferenceOutputVector2);
+    std::vector<TContainer> outputTensor2;
+    outputTensor2.push_back(inference2Container);
+
+    imageName = "ILSVRC2012_val_00000002.JPEG";
+    checker.AddImageResult<TContainer>(imageName, outputTensor2);
+
+    // Top 1 Accuracy
+    totalAccuracy = checker.GetAccuracy(1);
+    BOOST_CHECK(totalAccuracy == 50.0f);
+
+    // Top 2 Accuracy
+    totalAccuracy = checker.GetAccuracy(2);
+    BOOST_CHECK(totalAccuracy == 100.0f);
+
+    // Add image 3 and check accuracy
+    std::vector<float> inferenceOutputVector3 = {0.0f, 0.10f, 0.0f, 0.0f, 0.05f, 0.70f, 0.0f, 0.0f, 0.0f, 0.15f};
+    TContainer inference3Container(inferenceOutputVector3);
+    std::vector<TContainer> outputTensor3;
+    outputTensor3.push_back(inference3Container);
+
+    imageName = "ILSVRC2012_val_00000003.JPEG";
+    checker.AddImageResult<TContainer>(imageName, outputTensor3);
+
+    // Top 1 Accuracy
+    totalAccuracy = checker.GetAccuracy(1);
+    BOOST_CHECK(totalAccuracy == 33.3333321f);
+
+    // Top 2 Accuracy
+    totalAccuracy = checker.GetAccuracy(2);
+    BOOST_CHECK(totalAccuracy == 66.6666641f);
+
+    // Top 3 Accuracy
+    totalAccuracy = checker.GetAccuracy(3);
+    BOOST_CHECK(totalAccuracy == 100.0f);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/armnnUtils/ModelAccuracyChecker.cpp b/src/armnnUtils/ModelAccuracyChecker.cpp
new file mode 100644
index 0000000..bee5ca2
--- /dev/null
+++ b/src/armnnUtils/ModelAccuracyChecker.cpp
@@ -0,0 +1,31 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include <vector>
+#include <map>
+#include <boost/log/trivial.hpp>
+#include "ModelAccuracyChecker.hpp"
+
+namespace armnnUtils
+{
+
+armnnUtils::ModelAccuracyChecker::ModelAccuracyChecker(const std::map<std::string, int>& validationLabels)
+    : m_GroundTruthLabelSet(validationLabels){}
+
+float ModelAccuracyChecker::GetAccuracy(unsigned int k)
+{
+    if(k > 10) {
+        BOOST_LOG_TRIVIAL(info) << "Accuracy Tool only supports a maximum of Top 10 Accuracy. "
+                                   "Printing Top 10 Accuracy result!";
+        k = 10;
+    }
+    unsigned int total = 0;
+    for (unsigned int i = k; i > 0; --i)
+    {
+        total += m_TopK[i];
+    }
+    return static_cast<float>(total * 100) / static_cast<float>(m_ImagesProcessed);
+}
+}
\ No newline at end of file
diff --git a/src/armnnUtils/ModelAccuracyChecker.hpp b/src/armnnUtils/ModelAccuracyChecker.hpp
new file mode 100644
index 0000000..abf994b
--- /dev/null
+++ b/src/armnnUtils/ModelAccuracyChecker.hpp
@@ -0,0 +1,103 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <cstddef>
+#include <string>
+#include <map>
+#include <vector>
+#include <boost/variant/apply_visitor.hpp>
+#include <iostream>
+#include <armnn/Types.hpp>
+#include <functional>
+#include <algorithm>
+
+namespace armnnUtils
+{
+
+using namespace armnn;
+
+class ModelAccuracyChecker
+{
+public:
+    ModelAccuracyChecker(const std::map<std::string, int>& validationLabelSet);
+
+    float GetAccuracy(unsigned int k);
+
+    template<typename TContainer>
+    void AddImageResult(const std::string& imageName, std::vector<TContainer> outputTensor)
+    {
+        // Increment the total number of images processed
+        ++m_ImagesProcessed;
+
+        std::map<int, float> confidenceMap;
+        auto & output = outputTensor[0];
+
+        // Create a map of all predictions
+        boost::apply_visitor([&](auto && value)
+                             {
+                                 int index = 0;
+                                 for (const auto & o : value)
+                                 {
+                                     if (o > 0)
+                                     {
+                                         confidenceMap.insert(std::pair<int, float>(index, static_cast<float>(o)));
+                                     }
+                                     ++index;
+                                 }
+                             },
+                             output);
+
+        // Create a comparator for sorting the map in order of highest probability
+        typedef std::function<bool(std::pair<int, float>, std::pair<int, float>)> Comparator;
+
+        Comparator compFunctor =
+            [](std::pair<int, float> element1, std::pair<int, float> element2)
+            {
+                return element1.second > element2.second;
+            };
+
+        // Do the sorting and store in an ordered set
+        std::set<std::pair<int, float>, Comparator> setOfPredictions(
+            confidenceMap.begin(), confidenceMap.end(), compFunctor);
+
+        std::string trimmedName = GetTrimmedImageName(imageName);
+        int value = m_GroundTruthLabelSet.find(trimmedName)->second;
+
+        unsigned int index = 1;
+        for (std::pair<int, float> element : setOfPredictions)
+        {
+            if(element.first == value)
+            {
+                ++m_TopK[index];
+            } else
+            {
+                ++index;
+            }
+        }
+    }
+
+    std::string GetTrimmedImageName(const std::string& imageName) const
+    {
+        std::string trimmedName;
+        size_t lastindex = imageName.find_last_of(".");
+        if(lastindex != std::string::npos)
+        {
+            trimmedName = imageName.substr(0, lastindex);
+        } else
+        {
+            trimmedName = imageName;
+        }
+        return trimmedName;
+    }
+
+private:
+    const std::map<std::string, int> m_GroundTruthLabelSet;
+    std::vector<unsigned int> m_TopK = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    unsigned int m_ImagesProcessed = 0;
+};
+} //namespace armnnUtils
+
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 028fc82..dfcf4b4 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -291,6 +291,32 @@
     addDllCopyCommands(ExecuteNetwork)
 endif()
 
+if(BUILD_ACCURACY_TOOL)
+    macro(AccuracyTool executorName)
+        target_link_libraries(${executorName} ${CMAKE_THREAD_LIBS_INIT})
+        if(OPENCL_LIBRARIES)
+            target_link_libraries(${executorName} ${OPENCL_LIBRARIES})
+        endif()
+        target_link_libraries(${executorName}
+                ${Boost_SYSTEM_LIBRARY}
+                ${Boost_FILESYSTEM_LIBRARY}
+                ${Boost_PROGRAM_OPTIONS_LIBRARY})
+        addDllCopyCommands(${executorName})
+    endmacro()
+
+    set(ModelAccuracyTool-Armnn_sources
+            ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp)
+
+    add_executable_ex(ModelAccuracyTool ${ModelAccuracyTool-Armnn_sources})
+    target_include_directories(ModelAccuracyTool PRIVATE ../src/armnn)
+    target_include_directories(ModelAccuracyTool PRIVATE ../src/armnnUtils)
+    target_include_directories(ModelAccuracyTool PRIVATE ../src/backends)
+    target_link_libraries(ModelAccuracyTool inferenceTest)
+    target_link_libraries(ModelAccuracyTool armnn)
+    target_link_libraries(ModelAccuracyTool armnnSerializer)
+    AccuracyTool(ModelAccuracyTool)
+endif()
+
 if(BUILD_ARMNN_QUANTIZER)
     macro(ImageTensorExecutor executorName)
         target_link_libraries(${executorName} ${CMAKE_THREAD_LIBS_INIT})
diff --git a/tests/InferenceTest.cpp b/tests/InferenceTest.cpp
index 89e78de..cf97459 100644
--- a/tests/InferenceTest.cpp
+++ b/tests/InferenceTest.cpp
@@ -92,6 +92,12 @@
 
 bool ValidateDirectory(std::string& dir)
 {
+    if (dir.empty())
+    {
+        std::cerr << "No directory specified" << std::endl;
+        return false;
+    }
+
     if (dir[dir.length() - 1] != '/')
     {
         dir += "/";
@@ -103,6 +109,12 @@
         return false;
     }
 
+    if (!boost::filesystem::is_directory(dir))
+    {
+        std::cerr << "Given directory [" << dir << "] is not a directory" << std::endl;
+        return false;
+    }
+
     return true;
 }
 
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
new file mode 100644
index 0000000..7b96830
--- /dev/null
+++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
@@ -0,0 +1,289 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include "ModelAccuracyChecker.hpp"
+#include "../InferenceTest.hpp"
+#include "../ImagePreprocessor.hpp"
+#include "armnnDeserializer/IDeserializer.hpp"
+
+#include <boost/filesystem.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/program_options/variables_map.hpp>
+
+using namespace armnn::test;
+
+namespace po = boost::program_options;
+
+bool CheckOption(const po::variables_map& vm,
+                 const char* option)
+{
+    // Check that the given option is valid.
+    if (option == nullptr)
+    {
+        return false;
+    }
+
+    // Check whether 'option' is provided.
+    return vm.find(option) != vm.end();
+}
+
+template<typename T, typename TParseElementFunc>
+std::vector<T> ParseArrayImpl(std::istream& stream, TParseElementFunc parseElementFunc, const char * chars = "\t ,:")
+{
+    std::vector<T> result;
+    // Processes line-by-line.
+    std::string line;
+    while (std::getline(stream, line))
+    {
+        std::vector<std::string> tokens;
+        try
+        {
+            // Coverity fix: boost::split() may throw an exception of type boost::bad_function_call.
+            boost::split(tokens, line, boost::algorithm::is_any_of(chars), boost::token_compress_on);
+        }
+        catch (const std::exception& e)
+        {
+            BOOST_LOG_TRIVIAL(error) << "An error occurred when splitting tokens: " << e.what();
+            continue;
+        }
+        for (const std::string& token : tokens)
+        {
+            if (!token.empty()) // See https://stackoverflow.com/questions/10437406/
+            {
+                try
+                {
+                    result.push_back(parseElementFunc(token));
+                }
+                catch (const std::exception&)
+                {
+                    BOOST_LOG_TRIVIAL(error) << "'" << token << "' is not a valid number. It has been ignored.";
+                }
+            }
+        }
+    }
+
+    return result;
+}
+
+map<std::string, int> LoadValidationLabels(const string & validationLabelPath);
+
+template<armnn::DataType NonQuantizedType>
+auto ParseDataArray(std::istream & stream);
+
+template<>
+auto ParseDataArray<armnn::DataType::Float32>(std::istream & stream)
+{
+    return ParseArrayImpl<float>(stream, [](const std::string& s) { return std::stof(s); });
+}
+
+int main(int argc, char* argv[])
+{
+    try
+    {
+        using namespace boost::filesystem;
+        armnn::LogSeverity level = armnn::LogSeverity::Debug;
+        armnn::ConfigureLogging(true, true, level);
+        armnnUtils::ConfigureLogging(boost::log::core::get().get(), true, true, level);
+
+        // Set-up program Options
+        namespace po = boost::program_options;
+
+        std::vector<armnn::BackendId> computeDevice;
+        std::vector<armnn::BackendId> defaultBackends = {armnn::Compute::CpuAcc, armnn::Compute::CpuRef};
+        std::string modelPath;
+        std::string dataDir;
+        std::string inputName;
+        std::string outputName;
+        std::string validationLabelPath;
+
+        const std::string backendsMessage = "Which device to run layers on by default. Possible choices: "
+                                            + armnn::BackendRegistryInstance().GetBackendIdsAsString();
+
+        po::options_description desc("Options");
+        try
+        {
+            // Adds generic options needed to run Accuracy Tool.
+            desc.add_options()
+                ("help", "Display help messages")
+                ("model-path,m", po::value<std::string>(&modelPath)->required(), "Path to armnn format model file")
+                ("compute,c", po::value<std::vector<armnn::BackendId>>(&computeDevice)->default_value(defaultBackends),
+                 backendsMessage.c_str())
+                ("data-dir,d", po::value<std::string>(&dataDir)->required(),
+                 "Path to directory containing the ImageNet test data")
+                ("input-name,i", po::value<std::string>(&inputName)->required(),
+                 "Identifier of the input tensors in the network separated by comma.")
+                ("output-name,o", po::value<std::string>(&outputName)->required(),
+                 "Identifier of the output tensors in the network separated by comma.")
+                ("validation-labels-path,v", po::value<std::string>(&validationLabelPath)->required(),
+                 "Path to ImageNet Validation Label file");
+        }
+        catch (const std::exception& e)
+        {
+            // Coverity points out that default_value(...) can throw a bad_lexical_cast,
+            // and that desc.add_options() can throw boost::io::too_few_args.
+            // They really won't in any of these cases.
+            BOOST_ASSERT_MSG(false, "Caught unexpected exception");
+            std::cerr << "Fatal internal error: " << e.what() << std::endl;
+            return 1;
+        }
+
+        po::variables_map vm;
+        try
+        {
+            po::store(po::parse_command_line(argc, argv, desc), vm);
+
+            if (vm.count("help"))
+            {
+                std::cout << desc << std::endl;
+                return 1;
+            }
+            po::notify(vm);
+        }
+        catch (po::error& e)
+        {
+            std::cerr << e.what() << std::endl << std::endl;
+            std::cerr << desc << std::endl;
+            return 1;
+        }
+
+        // Check if the requested backend are all valid
+        std::string invalidBackends;
+        if (!CheckRequestedBackendsAreValid(computeDevice, armnn::Optional<std::string&>(invalidBackends)))
+        {
+            BOOST_LOG_TRIVIAL(fatal) << "The list of preferred devices contains invalid backend IDs: "
+                                     << invalidBackends;
+            return EXIT_FAILURE;
+        }
+        armnn::Status status;
+
+        // Create runtime
+        armnn::IRuntime::CreationOptions options;
+        armnn::IRuntimePtr runtime(armnn::IRuntime::Create(options));
+        std::ifstream file(modelPath);
+
+        // Create Parser
+        using IParser = armnnDeserializer::IDeserializer;
+        auto armnnparser(IParser::Create());
+
+        // Create a network
+        armnn::INetworkPtr network = armnnparser->CreateNetworkFromBinary(file);
+
+        // Optimizes the network.
+        armnn::IOptimizedNetworkPtr optimizedNet(nullptr, nullptr);
+        try
+        {
+            optimizedNet = armnn::Optimize(*network, computeDevice, runtime->GetDeviceSpec());
+        }
+        catch (armnn::Exception& e)
+        {
+            std::stringstream message;
+            message << "armnn::Exception (" << e.what() << ") caught from optimize.";
+            BOOST_LOG_TRIVIAL(fatal) << message.str();
+            return 1;
+        }
+
+        // Loads the network into the runtime.
+        armnn::NetworkId networkId;
+        status = runtime->LoadNetwork(networkId, std::move(optimizedNet));
+        if (status == armnn::Status::Failure)
+        {
+            BOOST_LOG_TRIVIAL(fatal) << "armnn::IRuntime: Failed to load network";
+            return 1;
+        }
+
+        // Set up Network
+        using BindingPointInfo = InferenceModelInternal::BindingPointInfo;
+
+        const armnnDeserializer::BindingPointInfo&
+            inputBindingInfo = armnnparser->GetNetworkInputBindingInfo(0, inputName);
+
+        std::pair<armnn::LayerBindingId, armnn::TensorInfo>
+            m_InputBindingInfo(inputBindingInfo.m_BindingId, inputBindingInfo.m_TensorInfo);
+        std::vector<BindingPointInfo> inputBindings  = { m_InputBindingInfo };
+
+        const armnnDeserializer::BindingPointInfo&
+            outputBindingInfo = armnnparser->GetNetworkOutputBindingInfo(0, outputName);
+
+        std::pair<armnn::LayerBindingId, armnn::TensorInfo>
+            m_OutputBindingInfo(outputBindingInfo.m_BindingId, outputBindingInfo.m_TensorInfo);
+        std::vector<BindingPointInfo> outputBindings = { m_OutputBindingInfo };
+
+        path pathToDataDir(dataDir);
+        map<string, int> validationLabels = LoadValidationLabels(validationLabelPath);
+        armnnUtils::ModelAccuracyChecker checker(validationLabels);
+        using TContainer = boost::variant<std::vector<float>, std::vector<int>, std::vector<uint8_t>>;
+
+        if(ValidateDirectory(dataDir))
+        {
+            for (auto & imageEntry : boost::make_iterator_range(directory_iterator(pathToDataDir), {}))
+            {
+                cout << "Processing image: " << imageEntry << "\n";
+
+                std::ifstream inputTensorFile(imageEntry.path().string());
+                vector<TContainer> inputDataContainers;
+                inputDataContainers.push_back(ParseDataArray<armnn::DataType::Float32>(inputTensorFile));
+                vector<TContainer> outputDataContainers = {vector<float>(1001)};
+
+                status = runtime->EnqueueWorkload(networkId,
+                                                  armnnUtils::MakeInputTensors(inputBindings, inputDataContainers),
+                                                  armnnUtils::MakeOutputTensors(outputBindings, outputDataContainers));
+
+                if (status == armnn::Status::Failure)
+                {
+                    BOOST_LOG_TRIVIAL(fatal) << "armnn::IRuntime: Failed to enqueue workload for image: " << imageEntry;
+                }
+
+                const std::string imageName = imageEntry.path().filename().string();
+                checker.AddImageResult<TContainer>(imageName, outputDataContainers);
+            }
+        }
+        else
+        {
+            return 1;
+        }
+
+        for(unsigned int i = 1; i <= 5; ++i)
+        {
+            std::cout << "Top " << i <<  " Accuracy: " << checker.GetAccuracy(i) << "%" << "\n";
+        }
+
+        BOOST_LOG_TRIVIAL(info) << "Accuracy Tool ran successfully!";
+        return 0;
+    }
+    catch (armnn::Exception const & e)
+    {
+        // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
+        // exception of type std::length_error.
+        // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
+        std::cerr << "Armnn Error: " << e.what() << std::endl;
+        return 1;
+    }
+    catch (const std::exception & e)
+    {
+        // Coverity fix: various boost exceptions can be thrown by methods called by this test.
+        std::cerr << "WARNING: ModelAccuracyTool-Armnn: An error has occurred when running the "
+                     "Accuracy Tool: " << e.what() << std::endl;
+        return 1;
+    }
+}
+
+map<std::string, int> LoadValidationLabels(const string & validationLabelPath)
+{
+    std::string imageName;
+    int classification;
+    map<std::string, int> validationLabel;
+    ifstream infile(validationLabelPath);
+    while (infile >> imageName >> classification)
+    {
+        std::string trimmedName;
+        size_t lastindex = imageName.find_last_of(".");
+        if(lastindex != std::string::npos)
+        {
+            trimmedName = imageName.substr(0, lastindex);
+        }
+        validationLabel.insert(pair<string, int>(trimmedName, classification));
+    }
+    return validationLabel;
+}