logo
Browse Source

Process generator input

Signed-off-by: Kaiyuan Hu <kaiyuan.hu@zilliz.com>
main
Kaiyuan Hu 2 years ago
parent
commit
f5aaced8d5
  1. 3
      isc.py

3
isc.py

@ -69,10 +69,11 @@ class Isc(NNOperator):
]) ])
def __call__(self, data: Union[List[towhee._types.Image], towhee._types.Image]): def __call__(self, data: Union[List[towhee._types.Image], towhee._types.Image]):
if not isinstance(data, list):
if isinstance(data, towhee._types.Image):
imgs = [data] imgs = [data]
else: else:
imgs = data imgs = data
img_list = [] img_list = []
for img in imgs: for img in imgs:
img = self.convert_img(img) img = self.convert_img(img)

Loading…
Cancel
Save