From d6a72709a1e3f1f85703983d750e4cbd26d93cd8 Mon Sep 17 00:00:00 2001 From: kba Date: Fri, 23 Aug 2024 18:53:28 +0200 Subject: [PATCH] remove unused image_filename_stem kwarg --- qurator/eynollah/eynollah.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qurator/eynollah/eynollah.py b/qurator/eynollah/eynollah.py index f80798b..bf0cc88 100644 --- a/qurator/eynollah/eynollah.py +++ b/qurator/eynollah/eynollah.py @@ -150,7 +150,6 @@ class Eynollah: logger : Logger, image_filename : Optional[str] = None, image_pil : Optional[Image] = None, - image_filename_stem : Optional[str] = None, dir_out : Optional[str] = None, dir_in : Optional[str] = None, dir_of_cropped_images : Optional[str] = None, @@ -285,6 +284,7 @@ class Eynollah: for prefix in ('', '_grayscale'): ret[f'img{prefix}_uint8'] = ret[f'img{prefix}'].astype(np.uint8) return ret + def reset_file_name_dir(self, image_filename): self._imgs = self._cache_images(image_filename=image_filename) self.image_filename = image_filename @@ -2816,12 +2816,10 @@ class Eynollah: return polygons_of_images, img_revised_tab, text_regions_p_1_n, textline_mask_tot_d, regions_without_separators_d, regions_fully, regions_without_separators, polygons_of_marginals, contours_tables def our_load_model(self, model_file): - try: model = load_model(model_file, compile=False) except: - model = load_model(model_file , compile=False,custom_objects = {"PatchEncoder": PatchEncoder, "Patches": Patches}) - + model = load_model(model_file , compile=False, custom_objects = {"PatchEncoder": PatchEncoder, "Patches": Patches}) return model def run(self):