Skip to content

Fixes #25056 : Optimising postProcess(const std::vector<Mat>& output_blobs)#25091

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
Dhanwanth1803:scoreThresh
Feb 27, 2024
Merged

Fixes #25056 : Optimising postProcess(const std::vector<Mat>& output_blobs)#25091
asmorkalov merged 2 commits intoopencv:4.xfrom
Dhanwanth1803:scoreThresh

Conversation

@Dhanwanth1803
Copy link
Copy Markdown
Contributor

@Dhanwanth1803 Dhanwanth1803 commented Feb 25, 2024

Like mentioned in the issue #25056 , I think checking the condition with scoreThreshold and then assigning the bounding boxes can optimize the function pretty well. By doing this, we prevent allocating boxes to faces with scores below the threshold. It also reduces the amount of data that needs to be processed during the subsequent NMS step. Builds and passed locally.

  • 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 another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the 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

@Dhanwanth1803 Dhanwanth1803 changed the title Fixes #25056 : Optimising postProcess(const std::vector<Mat>& output_blobs) Fixes #25056 : Optimising postProcess(const std::vector<Mat>& output_blobs) Feb 25, 2024
@asmorkalov asmorkalov added this to the 4.10.0 milestone Feb 27, 2024
@asmorkalov asmorkalov merged commit c04750a into opencv:4.x Feb 27, 2024
@asmorkalov asmorkalov mentioned this pull request Feb 28, 2024
klatism pushed a commit to klatism/opencv that referenced this pull request May 17, 2024
Fixes opencv#25056 : Optimising postProcess(const std::vector<Mat>& output_blobs) opencv#25091

Like mentioned in the issue opencv#25056 , I think checking the condition with `scoreThreshold` and then assigning the bounding boxes can optimize the function pretty well. By doing this, we prevent allocating boxes to faces with scores below the threshold. It also reduces the amount of data that needs to be processed during the subsequent NMS step. Builds and passed locally.

- [X] I agree to contribute to the project under Apache 2 License.
- [X] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [X] The PR is proposed to the proper branch
- [X] There is a reference to the 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

Co-authored-by: Dhanwanth1803 <dhanwanthvarala@gmail,com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants