use the latest ocr model with balanced fraktur-antiqua training dataset

This commit is contained in:
vahidrezanezhad 2025-08-05 14:22:22 +02:00
parent 0803881f36
commit a0c19c57be
2 changed files with 4 additions and 4 deletions

View file

@ -325,12 +325,12 @@ def enhancement(image, out, overwrite, dir_in, model, num_col_upper, num_col_low
@click.option(
"--threshold_art_class_layout",
"-tharl",
help="threshold of artifical class in the case of layout detection",
help="threshold of artifical class in the case of layout detection. The default value is 0.1",
)
@click.option(
"--threshold_art_class_textline",
"-thart",
help="threshold of artifical class in the case of textline detection",
help="threshold of artifical class in the case of textline detection. The default value is 0.1",
)
@click.option(
"--skip_layout_and_reading_order",

View file

@ -318,7 +318,7 @@ class Eynollah:
if self.ocr and self.tr:
self.model_ocr_dir = dir_models + "/trocr_model_ens_of_3_checkpoints_201124"
elif self.ocr and not self.tr:
self.model_ocr_dir = dir_models + "/model_eynollah_ocr_cnnrnn_20250725"
self.model_ocr_dir = dir_models + "/model_eynollah_ocr_cnnrnn_20250805"
if self.tables:
if self.light_version:
self.model_table_dir = dir_models + "/modelens_table_0t4_201124"
@ -5144,7 +5144,7 @@ class Eynollah_ocr:
self.b_s = int(batch_size)
else:
self.model_ocr_dir = dir_models + "/model_eynollah_ocr_cnnrnn_20250725"#"/model_step_1020000_ocr"#"/model_ens_ocrcnn_new10"#"/model_step_255000_ocr"#"/model_ens_ocrcnn_new9"#"/model_step_900000_ocr"#"/model_eynollah_ocr_cnnrnn_20250716"#"/model_ens_ocrcnn_new6"#"/model_ens_ocrcnn_new2"#
self.model_ocr_dir = dir_models + "/model_eynollah_ocr_cnnrnn_20250805"
model_ocr = load_model(self.model_ocr_dir , compile=False)
self.prediction_model = tf.keras.models.Model(