From a0b276fd8519e0a6ab6f2435c7d8fe0c20585bcc Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Thu, 7 Aug 2025 15:18:35 +0200 Subject: [PATCH 1/3] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d33d80f..842dc6cd 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ -[![openvino](https://img.shields.io/badge/openvino-2025.1-purple)]() +[![openvino](https://img.shields.io/badge/openvino-2025.2-purple)]() From 554f733f616bd64ac95a8b38fb072ad6a3913ee5 Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Thu, 7 Aug 2025 15:40:17 +0200 Subject: [PATCH 2/3] Fix py 3.13 compatibility in data preparation script --- tests/python/accuracy/prepare_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python/accuracy/prepare_data.py b/tests/python/accuracy/prepare_data.py index ba7e9b4d..275361ca 100644 --- a/tests/python/accuracy/prepare_data.py +++ b/tests/python/accuracy/prepare_data.py @@ -20,8 +20,8 @@ async def download_images(data_dir): image = await client.get( "https://raw.githubusercontent.com/Shenggan/BCCD_Dataset/master/BCCD/JPEGImages/BloodImage_00007.jpg" ) - with data_dir / "BloodImage_00007.jpg" as im: - im.write_bytes(image.content) + with open(data_dir / "BloodImage_00007.jpg", "wb") as im: + im.write(image.content) async def stream_file(client, url, filename): From 0a875b45ac56a431f445dd19eaae4396281c25fb Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Thu, 7 Aug 2025 15:40:50 +0200 Subject: [PATCH 3/3] Make cpp keep_ratio preprocessing graph identical to python --- src/cpp/utils/src/image_utils.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cpp/utils/src/image_utils.cpp b/src/cpp/utils/src/image_utils.cpp index b74588d9..4fa6efe4 100644 --- a/src/cpp/utils/src/image_utils.cpp +++ b/src/cpp/utils/src/image_utils.cpp @@ -71,8 +71,14 @@ Output resizeImageGraph(const ov::Output& input, auto w_ratio = std::make_shared(opset10::Constant::create(element::f32, Shape{1}, {float(w)}), iw); auto h_ratio = std::make_shared(opset10::Constant::create(element::f32, Shape{1}, {float(h)}), ih); auto scale = std::make_shared(w_ratio, h_ratio); - auto nw = std::make_shared(std::make_shared(iw, scale), element::i32); - auto nh = std::make_shared(std::make_shared(ih, scale), element::i32); + auto nw = std::make_shared( + std::make_shared(std::make_shared(iw, scale), + opset10::Round::RoundMode::HALF_TO_EVEN), + element::i32); + auto nh = std::make_shared( + std::make_shared(std::make_shared(ih, scale), + opset10::Round::RoundMode::HALF_TO_EVEN), + element::i32); auto new_size = std::make_shared(OutputVector{nh, nw}, 0); auto scales = opset10::Constant::create(element::f32, Shape{2}, {0.0f, 0.0f});