Updated openpose sample to run using onnx#25593
Closed
gursimarsingh wants to merge 4 commits intoopencv:5.xfrom
Closed
Updated openpose sample to run using onnx#25593gursimarsingh wants to merge 4 commits intoopencv:5.xfrom
gursimarsingh wants to merge 4 commits intoopencv:5.xfrom
Conversation
18 tasks
asmorkalov
reviewed
Jun 5, 2024
samples/dnn/human_pose.cpp
Outdated
Comment on lines
+111
to
+115
| Mat blob = blobFromImage(img, scale, Size(W_in, H_in), Scalar(0, 0, 0), false, false); | ||
|
|
||
| std::vector<int> order = {0, 2, 3, 1}; | ||
| Mat outBlob; // inp: NCHW, out: NHWC | ||
| transposeND(blob, order, outBlob); |
Contributor
There was a problem hiding this comment.
There is blobFromImageWithParams: https://docs.opencv.org/5.x/d6/d0f/group__dnn.html#gadc12e5f4a801fd3c1d802f4c8c5d311c. It handles NCHW -> NHWC conversion too.
Contributor
|
The core team decided not to drop Caffe support in 5.0, but mark it deprecated. I proposed to presume the original code unchanged. Closed for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Readiness Checklist
#25006 #25314
openpose dnn sample has been renamed to human_pose and now supports onnx model. Steps for converting the model from caffe to onnx have been added in the description
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.