Skip to content

Commit 77c7660

Browse files
committed
add batch prediction for layout model
1 parent aa2e39b commit 77c7660

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

docling_ibm_models/layoutmodel/layout_predictor.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,6 @@ def predict(self, orig_img: Union[Image.Image, np.ndarray]) -> Iterable[dict]:
131131
page_img = orig_img.convert("RGB")
132132
elif isinstance(orig_img, np.ndarray):
133133
page_img = Image.fromarray(orig_img).convert("RGB")
134-
elif isinstance(orig_img, List):
135-
if isinstance(orig_img[0], Image.Image):
136-
page_img = [img.convert("RGB") for img in orig_img]
137-
elif isinstance(orig_img[0], np.ndarray):
138-
page_img = [Image.fromarray(img).convert("RGB") for img in orig_img]
139-
else:
140-
raise TypeError("Not supported input image format")
141134
else:
142135
raise TypeError("Not supported input image format")
143136

0 commit comments

Comments
 (0)