Skip to content

DNN: Openpose: Fixed samples - #13486

Merged
opencv-pushbot merged 1 commit into
opencv:3.4from
allnes:dnn_rework
Dec 25, 2018
Merged

opencv-pushbot merged 1 commit into
opencv:3.4from
allnes:dnn_rework

Conversation

@allnes

@allnes allnes commented Dec 20, 2018 •

Copy link
Copy Markdown
Member

resolves #13141

Comment thread samples/dnn/openpose.py
parser.add_argument('--thr', default=0.1, type=float, help='Threshold value for pose parts heat map')
parser.add_argument('--width', default=368, type=int, help='Resize input to specific width.')
parser.add_argument('--height', default=368, type=int, help='Resize input to specific height.')
parser.add_argument('--scale', default=0.003922, type=float, help='Scale for blob.')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove redundant To use Inference Engine backend, specify location of plugins: at the beginning of this script.

Comment thread samples/dnn/openpose.cpp Outdated
midx = 1;
npairs = 14;
nparts = 16;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to add a flag dataset similar to python script and add an extra option 'HAND' to it's choices instead determining model by number of output channels.

Comment thread samples/dnn/openpose.py Outdated
shape_1 = out.shape[1]
if shape_1 == 57: shape_1 = 19
if shape_1 == 44: shape_1 = 16
assert(len(BODY_PARTS) == shape_1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shape_1 is used only here. We check assert(len(BODY_PARTS) == out.shape[1]) only to prevent out-of-bound slicing. Can we keep just assert(len(BODY_PARTS) <= out.shape[1])?

May I ask you also adapt python sample for HAND model?

@allnes

allnes commented Dec 25, 2018

Copy link
Copy Markdown
Member Author

@dkurt done

@dkurt dkurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me. Thank you!

@alalek alalek mentioned this pull request Dec 27, 2018
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
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