mirror of
https://github.com/opencv/opencv.git
synced 2026-09-11 04:43:22 -05:00
The TopK layer was incorrectly rejecting K values equal to the input dimension size. According to ONNX specification, K should be allowed to equal the dimension size (to retrieve all elements). Changed validation from 'K < input_shape[axis]' to 'K <= input_shape[axis]' This fixes the error when loading YOLOv10 ONNX models that use TopK with K equal to the dimension size. Fixes #28445