Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DNN : fix bug in extracting prior-box variances in detection output layer#20525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@jebastin-nadar
Copy link
Contributor

GetPriorBBoxes() assumes the input blob has shape (1, 2, num_priors * 4, 1) with the second channel being prior-box variances. But when_varianceEncodedInTarget is true, the input has shape (1, 1, num_prioirs * 4, 1), as checked by the following assertion

CV_Assert(inputs[2][1] ==1 + (int)(!_varianceEncodedInTarget));

Another reference in thereshape for the input of Detection output layer in faster-rcnn-vgg16.

Pull Request Readiness Checklist

See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

alalek and YashasSamaga reacted with thumbs up emoji
@alalek
Copy link
Member

@SamFC10 Thank you for contribution!
Is it possible to add accuracy test for this case?

@jebastin-nadar
Copy link
ContributorAuthor

Is it possible to add accuracy test for this case?

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 -unknown file: error: SEH exception with code 0xc0000005 thrown in the test body. Tracing back, it was the illegal memory access in prior-box variances which caused these crashes. I don't know how to reproduce these sporadic crashes in a test. Will need some help.

@asmorkalovasmorkalov removed the request for review fromJulieBarAugust 11, 2021 06:50
@alalek
Copy link
Member

Tracing back, it was the illegal memory access in prior-box variances which caused these crashes.

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.

@jebastin-nadar
Copy link
ContributorAuthor

add these checks there

There is one already

CV_Assert(inputs[2][1] ==1 + (int)(!_varianceEncodedInTarget));

It was added in#11255 but the function GetPriorBBoxes() wasn't modified along with the added assertion.

@vpisarevvpisarev self-requested a reviewAugust 13, 2021 08:29
@vpisarevvpisarev self-assigned thisAug 13, 2021
@vpisarev
Copy link
Contributor

👍

@opencv-pushbotopencv-pushbot merged commit9d3826c intoopencv:3.4Aug 13, 2021
@alalekalalek mentioned this pull requestAug 14, 2021
@jebastin-nadarjebastin-nadar deleted the fix-prior-variances branchAugust 19, 2021 04:51
@alalekalalek mentioned this pull requestOct 15, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vpisarevvpisarevvpisarev approved these changes

@rogdayrogdayAwaiting requested review from rogday

Assignees

@vpisarevvpisarev

Projects

None yet

Milestone

3.4.16

Development

Successfully merging this pull request may close these issues.

5 participants

@jebastin-nadar@alalek@vpisarev@opencv-pushbot@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp