You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: paddlex/inference/common/batch_sampler/image_batch_sampler.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -110,9 +110,14 @@ def sample(self, inputs):
110
110
iflen(batch) ==self.batch_size:
111
111
yieldbatch
112
112
batch=ImgBatch()
113
-
else:
113
+
elifPath(input).is_dir():
114
114
file_list=self._get_files_list(input)
115
115
yieldfromself.sample(file_list)
116
+
else:
117
+
logging.error(
118
+
f"Not supported input file type! Only PDF and image files ended with suffix `{', '.join(self.IMG_SUFFIX+self.PDF_SUFFIX)}` are supported! But recevied `{input}`."
119
+
)
120
+
yieldbatch
116
121
else:
117
122
logging.warning(
118
123
f"Not supported input data type! Only `numpy.ndarray` and `str` are supported! So has been ignored: {input}."
0 commit comments