From 74a0699f6bd441315e20223da81851ef1be53121 Mon Sep 17 00:00:00 2001 From: vahidrezanezhad Date: Thu, 19 Sep 2024 11:20:13 +0200 Subject: [PATCH] extracting images only now works for a single image input --- src/eynollah/eynollah.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/eynollah/eynollah.py b/src/eynollah/eynollah.py index caa1978..511e994 100644 --- a/src/eynollah/eynollah.py +++ b/src/eynollah/eynollah.py @@ -3013,10 +3013,11 @@ class Eynollah: if self.plotter: self.plotter.write_images_into_directory(polygons_of_images, image_page) - #plt.imshow(text_regions_p_1) - #plt.show() - self.writer.write_pagexml(pcgts) + if self.dir_in: + self.writer.write_pagexml(pcgts) + else: + return pcgts else: img_res, is_image_enhanced, num_col_classifier, num_column_is_classified = self.run_enhancement(self.light_version)