DNN : fix bug in extracting prior-box variances in detection output layer#20525
Conversation
|
@SamFC10 Thank you for contribution! |
There were some faster rcnn tests which crashed sporadically in my int8 PR (#20228) on Windows CI builders and local windows machine with the message - |
This usually happens when memory is accessed without checking arrays layouts (through CV_Check* or CV_Assert macros). It makes sense to add these checks there. |
There is one already It was added in #11255 but the function GetPriorBBoxes() wasn't modified along with the added assertion. |
|
👍 |
GetPriorBBoxes() assumes the input blob has shape (1, 2, num_priors * 4, 1) with the second channel being prior-box variances. But when
_varianceEncodedInTargetis true, the input has shape (1, 1, num_prioirs * 4, 1), as checked by the following assertionopencv/modules/dnn/src/layers/detection_output_layer.cpp
Line 239 in 424eaba
Another reference in the reshape for the input of Detection output layer in faster-rcnn-vgg16.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.