Skip to content

Commit be1433e

Browse files
committed
Fix bodged rebase
1 parent dad459f commit be1433e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/cpp/include/tasks/results.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,23 @@ struct ClassificationResult {
175175
ss << *this;
176176
return ss.str();
177177
}
178+
179+
struct Classification {
180+
size_t id;
181+
std::string label;
182+
float score;
183+
184+
Classification(size_t id, const std::string& label, float score) : id(id), label(label), score(score) {}
185+
186+
friend std::ostream& operator<<(std::ostream& os, const Classification& prediction) {
187+
return os << prediction.id << " (" << prediction.label << "): " << std::fixed << std::setprecision(3)
188+
<< prediction.score;
189+
}
190+
};
191+
192+
std::vector<Classification> topLabels;
193+
ov::Tensor saliency_map, feature_vector,
194+
raw_scores; // Contains "raw_scores", "saliency_map" and "feature_vector" model outputs if such exist
178195
};
179196

180197
struct AnomalyResult {

tests/cpp/test_accuracy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <thread>
88

99
#include "matchers.h"
10-
#include "tasks/classification.h"
1110
#include "tasks/anomaly.h"
11+
#include "tasks/classification.h"
1212
#include "tasks/detection.h"
1313
#include "tasks/instance_segmentation.h"
1414
#include "tasks/semantic_segmentation.h"

0 commit comments

Comments
 (0)