Skip to content

Commit

Permalink
Fix inference on list of ndarrays (#2506)
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-T-G authored Dec 21, 2023
1 parent 7079ec2 commit 97c1dc5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mmdeploy/codebase/mmpose/deploy/pose_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,13 @@ def create_input(self,
img_path = [imgs]
else:
raise AssertionError('imgs must be strings or numpy arrays')
if isinstance(imgs, (list, tuple)) and isinstance(imgs[0], str):
img_path = imgs
img_data = [mmcv.imread(img) for img in imgs]
imgs = img_data
if isinstance(imgs, (list, tuple)):
if isinstance(imgs[0], str):
img_path = imgs
img_data = [mmcv.imread(img) for img in imgs]
imgs = img_data
else:
img_path = [''] * len(imgs)
person_results = []
bboxes = []
for img in imgs:
Expand Down

0 comments on commit 97c1dc5

Please sign in to comment.