Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<!-- markdownlint-disable MD042 -->

[![openvino](https://img.shields.io/badge/openvino-2025.1-purple)]()
[![openvino](https://img.shields.io/badge/openvino-2025.2-purple)]()

<!-- markdownlint-enable MD042 -->

Expand Down
10 changes: 8 additions & 2 deletions src/cpp/utils/src/image_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ Output<Node> resizeImageGraph(const ov::Output<ov::Node>& input,
auto w_ratio = std::make_shared<opset10::Divide>(opset10::Constant::create(element::f32, Shape{1}, {float(w)}), iw);
auto h_ratio = std::make_shared<opset10::Divide>(opset10::Constant::create(element::f32, Shape{1}, {float(h)}), ih);
auto scale = std::make_shared<opset10::Minimum>(w_ratio, h_ratio);
auto nw = std::make_shared<opset10::Convert>(std::make_shared<opset10::Multiply>(iw, scale), element::i32);
auto nh = std::make_shared<opset10::Convert>(std::make_shared<opset10::Multiply>(ih, scale), element::i32);
auto nw = std::make_shared<opset10::Convert>(
std::make_shared<opset10::Round>(std::make_shared<opset10::Multiply>(iw, scale),
opset10::Round::RoundMode::HALF_TO_EVEN),
element::i32);
auto nh = std::make_shared<opset10::Convert>(
std::make_shared<opset10::Round>(std::make_shared<opset10::Multiply>(ih, scale),
opset10::Round::RoundMode::HALF_TO_EVEN),
element::i32);
auto new_size = std::make_shared<opset10::Concat>(OutputVector{nh, nw}, 0);

auto scales = opset10::Constant::create(element::f32, Shape{2}, {0.0f, 0.0f});
Expand Down
4 changes: 2 additions & 2 deletions tests/python/accuracy/prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading