Skip to content

Commit 58c7110

Browse files
committed
Add specific implementation for get_from_any_map for bool
Sometimes the value for bool is "True" This evaluation from string is only added in openvino 2025.1.0
1 parent 68cadc1 commit 58c7110

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/cpp/include/utils/config.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ Type get_from_any_maps(const std::string& key,
2424
return low_priority;
2525
}
2626

27+
template <>
28+
inline bool get_from_any_maps(const std::string& key,
29+
const ov::AnyMap& top_priority,
30+
const ov::AnyMap& mid_priority,
31+
bool low_priority) {
32+
auto topk_iter = top_priority.find(key);
33+
if (topk_iter != top_priority.end()) {
34+
const std::string& val = topk_iter->second.as<std::string>();
35+
return val == "True" || val == "YES";
36+
}
37+
topk_iter = mid_priority.find(key);
38+
if (topk_iter != mid_priority.end()) {
39+
const std::string& val = topk_iter->second.as<std::string>();
40+
return val == "True" || val == "YES";
41+
}
42+
return low_priority;
43+
}
44+
2745
inline bool model_has_embedded_processing(std::shared_ptr<ov::Model> model) {
2846
if (model->has_rt_info("model_info")) {
2947
auto model_info = model->get_rt_info<ov::AnyMap>("model_info");

src/cpp/install_dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ apt update
1313
apt-get install libopencv-dev
1414

1515
# Install OpenVINO
16-
sudo apt install openvino-2025.1.0
16+
sudo apt install openvino-2025.0.0

0 commit comments

Comments
 (0)