Unverified 提交 aa828936 authored 作者: Happy-Engineer's avatar Happy-Engineer 提交者: GitHub

Merge pull request #1 from dwgeneral/dwgeneral-patch-1

Update jit_pose.py to fix out_bbox is NoneType issue
...@@ -22,7 +22,7 @@ def preprocess( ...@@ -22,7 +22,7 @@ def preprocess(
# get shape of image # get shape of image
img_shape = img.shape[:2] img_shape = img.shape[:2]
out_img, out_center, out_scale = [], [], [] 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]]] out_bbox = [[0, 0, img_shape[1], img_shape[0]]]
for i in range(len(out_bbox)): for i in range(len(out_bbox)):
x0 = out_bbox[i][0] x0 = out_bbox[i][0]
...@@ -360,4 +360,4 @@ def inference_pose(model, out_bbox, oriImg, model_input_size=(288, 384)): ...@@ -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) keypoints, scores = postprocess(outputs, model_input_size, center, scale)
return keypoints, scores return keypoints, scores
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论