diff options
author | Nikhil Raj <nikhil.raj@arm.com> | 2021-04-02 22:04:39 +0100 |
---|---|---|
committer | Nikhil Raj <nikhil.raj@arm.com> | 2021-04-16 14:27:27 +0100 |
commit | 6dd178f2395b34cfb360eabb0130c19ed258f5fa (patch) | |
tree | 6814e4729bbd1e652d8b9c18c9db28f3bc2f8a8a /tests/CaffePreprocessor.cpp | |
parent | ed7fce413410d15c501ea52f9e6bfbbf71b3daf1 (diff) | |
download | armnn-6dd178f2395b34cfb360eabb0130c19ed258f5fa.tar.gz |
IVGCVSW-5720 Remove the Caffe Parser from ArmNN
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
Change-Id: Ib00be204f549efa9aa5971ecf65c2dec4a10b10f
Diffstat (limited to 'tests/CaffePreprocessor.cpp')
-rw-r--r-- | tests/CaffePreprocessor.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/CaffePreprocessor.cpp b/tests/CaffePreprocessor.cpp deleted file mode 100644 index 54ce833b72..0000000000 --- a/tests/CaffePreprocessor.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// -#include "InferenceTestImage.hpp" -#include "CaffePreprocessor.hpp" - -#include <armnn/utility/NumericCast.hpp> - -#include <iostream> -#include <fcntl.h> -#include <array> - -const std::vector<ImageSet> g_DefaultImageSet = -{ - {"shark.jpg", 2} -}; - -CaffePreprocessor::CaffePreprocessor(const std::string& binaryFileDirectory, unsigned int width, unsigned int height, - const std::vector<ImageSet>& imageSet) -: m_BinaryDirectory(binaryFileDirectory) -, m_Height(height) -, m_Width(width) -, m_ImageSet(imageSet.empty() ? g_DefaultImageSet : imageSet) -{ -} - -std::unique_ptr<CaffePreprocessor::TTestCaseData> CaffePreprocessor::GetTestCaseData(unsigned int testCaseId) -{ - testCaseId = testCaseId % armnn::numeric_cast<unsigned int>(m_ImageSet.size()); - const ImageSet& imageSet = m_ImageSet[testCaseId]; - const std::string fullPath = m_BinaryDirectory + imageSet.first; - - InferenceTestImage image(fullPath.c_str()); - image.Resize(m_Width, m_Height, CHECK_LOCATION()); - - // The model expects image data in BGR format. - std::vector<float> inputImageData = GetImageDataInArmNnLayoutAsFloatsSubtractingMean(ImageChannelLayout::Bgr, - image, m_MeanBgr); - - // List of labels: https://gist.github.com/yrevar/942d3a0ac09ec9e5eb3a - const unsigned int label = imageSet.second; - return std::make_unique<TTestCaseData>(label, std::move(inputImageData)); -} |