Skip to content

Commit

Permalink
Temporary commit – textline prediction without patches
Browse files Browse the repository at this point in the history
  • Loading branch information
vahidrezanezhad committed Oct 23, 2024
1 parent 70772d4 commit 328d33e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qurator/eynollah/eynollah.py
Original file line number Diff line number Diff line change
Expand Up @@ -2120,7 +2120,7 @@ def textline_contours(self, img, patches, scaler_h, scaler_w, num_col_classifier
else:
thresholding_for_artificial_class_in_light_version = False
if not self.dir_in:
model_textline, session_textline = self.start_new_session_and_model(self.model_textline_dir if patches else self.model_textline_dir_np)
model_textline, session_textline = self.start_new_session_and_model(self.model_textline_dir)
#img = img.astype(np.uint8)
img_org = np.copy(img)
img_h = img_org.shape[0]
Expand Down Expand Up @@ -3311,7 +3311,8 @@ def run_textline(self, image_page, num_col_classifier=None):
scaler_h_textline = 1#1.3 # 1.2#1.2
scaler_w_textline = 1#1.3 # 0.9#1
#print(image_page.shape)
textline_mask_tot_ea, _ = self.textline_contours(image_page, True, scaler_h_textline, scaler_w_textline, num_col_classifier)
patches = False
textline_mask_tot_ea, _ = self.textline_contours(image_page, patches, scaler_h_textline, scaler_w_textline, num_col_classifier)
if self.textline_light:
textline_mask_tot_ea = textline_mask_tot_ea.astype(np.int16)

Expand Down

0 comments on commit 328d33e

Please sign in to comment.