1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
15 #include "Processor.hpp"
17 #include "VOCAnnotationParser.hpp"
21 class ObjectDetectionProcessor : public Processor {
23 struct ObjectDetectionInferenceMetrics : public InferenceMetrics {
25 AveragePrecisionCalculator apc;
27 explicit ObjectDetectionInferenceMetrics(double threshold) : apc(threshold) { }
31 std::string annotationsPath;
33 std::map<std::string, int> classes;
36 bool scaleProposalToInputSize;
38 virtual std::map<std::string, std::list<DetectedObject>> processResult(std::vector<std::string> files) = 0;
41 ObjectDetectionProcessor(const std::string& flags_m, const std::string& flags_d, const std::string& flags_i, const std::string& subdir, int flags_b,
43 InferenceEngine::InferencePlugin plugin, CsvDumper& dumper,
44 const std::string& flags_a, const std::string& classes_list_file, PreprocessingOptions preprocessingOptions, bool scaleSizeToInputSize);
46 shared_ptr<InferenceMetrics> Process(bool stream_output);
47 virtual void Report(const InferenceMetrics& im);
48 virtual ~ObjectDetectionProcessor() {}