Skip to content

Commit 97c1dc5

Browse files
authored
Fix inference on list of ndarrays (#2506)
1 parent 7079ec2 commit 97c1dc5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

mmdeploy/codebase/mmpose/deploy/pose_detection.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,13 @@ def create_input(self,
209209
img_path = [imgs]
210210
else:
211211
raise AssertionError('imgs must be strings or numpy arrays')
212-
if isinstance(imgs, (list, tuple)) and isinstance(imgs[0], str):
213-
img_path = imgs
214-
img_data = [mmcv.imread(img) for img in imgs]
215-
imgs = img_data
212+
if isinstance(imgs, (list, tuple)):
213+
if isinstance(imgs[0], str):
214+
img_path = imgs
215+
img_data = [mmcv.imread(img) for img in imgs]
216+
imgs = img_data
217+
else:
218+
img_path = [''] * len(imgs)
216219
person_results = []
217220
bboxes = []
218221
for img in imgs:

0 commit comments

Comments
 (0)