diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-06-21 19:01:25 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:53:57 +0000 |
commit | 7c3b92403958e8970e901fd15b2fc904e7996eee (patch) | |
tree | 09250c8269ad2f78f2a8587f454d83728e97e9dc /utils/GraphUtils.h | |
parent | f3139dde4b93b4ea54e4f3bcd27e639c22a7b6ca (diff) | |
download | ComputeLibrary-7c3b92403958e8970e901fd15b2fc904e7996eee.tar.gz |
COMPMID-1308: Add and validate JPEG accessors
Change-Id: I93d7345a795b26153600287346d672209dbb2622
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/137479
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'utils/GraphUtils.h')
-rw-r--r-- | utils/GraphUtils.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/utils/GraphUtils.h b/utils/GraphUtils.h index 597708369d..349d8558fc 100644 --- a/utils/GraphUtils.h +++ b/utils/GraphUtils.h @@ -157,7 +157,7 @@ public: /** Constructor * * @param[in] ppm_path Path to PPM file - * @param[in] bgr (Optional) Fill the first plane with blue channel (default = false) + * @param[in] bgr (Optional) Fill the first plane with blue channel (default = false - RGB format) * @param[in] preprocessor (Optional) PPM pre-processing object */ PPMAccessor(std::string ppm_path, bool bgr = true, std::unique_ptr<IPreprocessor> preprocessor = nullptr); @@ -173,6 +173,36 @@ private: std::unique_ptr<IPreprocessor> _preprocessor; }; +/** Input Accessor used for network validation */ +class ValidationInputAccessor final : public graph::ITensorAccessor +{ +public: + /** Constructor + * + * @param[in] image_list File containing all the images to validate + * @param[in] images_path Path to images. + * @param[in] bgr (Optional) Fill the first plane with blue channel (default = false - RGB format) + * @param[in] start (Optional) Start range + * @param[in] end (Optional) End range + * + * @note + */ + ValidationInputAccessor(const std::string &image_list, + std::string images_path, + bool bgr = true, + unsigned int start = 0, + unsigned int end = 0); + + // Inherited methods overriden: + bool access_tensor(ITensor &tensor) override; + +private: + std::string _path; + std::vector<std::string> _images; + bool _bgr; + size_t _offset; +}; + /** Result accessor class */ class TopNPredictionsAccessor final : public graph::ITensorAccessor { |