diff --git a/src/frontends/pytorch/src/op/nms.cpp b/src/frontends/pytorch/src/op/nms.cpp index 86ecb3df73cf87..edef474da57edc 100644 --- a/src/frontends/pytorch/src/op/nms.cpp +++ b/src/frontends/pytorch/src/op/nms.cpp @@ -34,8 +34,10 @@ OutputVector translate_nms(const NodeContext& context) { context.mark_node(v0::Constant::create(element::i32, Shape{1}, {std::numeric_limits::max()})); auto iou_threshold = context.get_input(2); - auto nms_out = - context.mark_node(std::make_shared(boxes, scores, max_output_per_class, iou_threshold)); + auto score_threshold = + context.mark_node(v0::Constant::create(element::f32, Shape{}, {std::numeric_limits::lowest()})); + auto nms_out = context.mark_node( + std::make_shared(boxes, scores, max_output_per_class, iou_threshold, score_threshold)); auto select = context.mark_node(std::make_shared(nms_out, const_2, const_1)); return {context.mark_node(std::make_shared(select, const_1))}; diff --git a/tests/layer_tests/pytorch_tests/test_nms.py b/tests/layer_tests/pytorch_tests/test_nms.py index dc4613215f00c2..ae09726a23b8f9 100644 --- a/tests/layer_tests/pytorch_tests/test_nms.py +++ b/tests/layer_tests/pytorch_tests/test_nms.py @@ -15,7 +15,8 @@ def _prepare_input(self): # PyTorch requires that boxes are in (x1, y1, x2, y2) format, where 0<=x1