From f6084b02977865d0b0b84cd4035a84c86387dd9c Mon Sep 17 00:00:00 2001 From: Happy-Engineer Date: Wed, 10 Jul 2024 14:53:53 +0800 Subject: [PATCH] Update jit_pose.py to fix out_bbox is NoneType issue Update jit_pose.py to fix out_bbox is NoneType issue --- mimicmotion/dwpose/jit_pose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mimicmotion/dwpose/jit_pose.py b/mimicmotion/dwpose/jit_pose.py index 7a7b6ac..feab1ff 100644 --- a/mimicmotion/dwpose/jit_pose.py +++ b/mimicmotion/dwpose/jit_pose.py @@ -22,7 +22,7 @@ def preprocess( # get shape of image img_shape = img.shape[:2] out_img, out_center, out_scale = [], [], [] - if len(out_bbox) == 0: + if out_bbox is None or len(out_bbox) == 0: out_bbox = [[0, 0, img_shape[1], img_shape[0]]] for i in range(len(out_bbox)): x0 = out_bbox[i][0] @@ -360,4 +360,4 @@ def inference_pose(model, out_bbox, oriImg, model_input_size=(288, 384)): keypoints, scores = postprocess(outputs, model_input_size, center, scale) - return keypoints, scores \ No newline at end of file + return keypoints, scores