Skip to content

Commit 3b94390

Browse files
Fixed flag output_resolution not working with gpu rendering
1 parent e838803 commit 3b94390

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/openpose/wrapper/wrapperAuxiliary.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ namespace op
309309
// Note: We realized that somehow doing it on GPU for any number of GPUs does speedup the whole OP
310310
resizeOnCpu = false;
311311
addCvMatToOpOutputInCpu = addCvMatToOpOutput
312-
&& (resizeOnCpu || !renderOutputGpu || wrapperStructPose.poseMode != PoseMode::Enabled);
312+
&& (resizeOnCpu || !renderOutputGpu || wrapperStructPose.poseMode != PoseMode::Enabled
313+
// Resize in GPU causing bug
314+
|| wrapperStructPose.outputSize.x != -1 || wrapperStructPose.outputSize.y != -1);
313315
if (addCvMatToOpOutputInCpu)
314316
{
315317
const auto gpuResize = false;
@@ -329,7 +331,8 @@ namespace op
329331
wrapperStructPose.poseModel, modelFolder, gpuId + gpuNumberStart,
330332
wrapperStructPose.heatMapTypes, wrapperStructPose.heatMapScaleMode,
331333
wrapperStructPose.addPartCandidates, wrapperStructPose.maximizePositives,
332-
wrapperStructPose.protoTxtPath.getStdString(), wrapperStructPose.caffeModelPath.getStdString(),
334+
wrapperStructPose.protoTxtPath.getStdString(),
335+
wrapperStructPose.caffeModelPath.getStdString(),
333336
wrapperStructPose.upsamplingRatio, wrapperStructPose.poseMode == PoseMode::Enabled,
334337
wrapperStructPose.enableGoogleLogging
335338
));

0 commit comments

Comments
 (0)