mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-09 04:09:54 +02:00
🐛 Clarify message if an image was enhanced
This commit is contained in:
parent
f0ac0bb090
commit
1fe8f92afc
1 changed files with 4 additions and 4 deletions
|
@ -439,9 +439,9 @@ class Eynollah:
|
||||||
image_res = self.predict_enhancement(img_new)
|
image_res = self.predict_enhancement(img_new)
|
||||||
is_image_enhanced = True
|
is_image_enhanced = True
|
||||||
else:
|
else:
|
||||||
is_image_enhanced = False
|
|
||||||
num_column_is_classified = True
|
num_column_is_classified = True
|
||||||
image_res = np.copy(img)
|
image_res = np.copy(img)
|
||||||
|
is_image_enhanced = False
|
||||||
|
|
||||||
session_col_classifier.close()
|
session_col_classifier.close()
|
||||||
|
|
||||||
|
@ -1986,9 +1986,9 @@ class Eynollah:
|
||||||
return num_col, num_col_classifier, img_only_regions, page_coord, image_page, mask_images, mask_lines, text_regions_p_1, cont_page, table_prediction
|
return num_col, num_col_classifier, img_only_regions, page_coord, image_page, mask_images, mask_lines, text_regions_p_1, cont_page, table_prediction
|
||||||
|
|
||||||
def run_enhancement(self):
|
def run_enhancement(self):
|
||||||
self.logger.info("resize and enhance image")
|
self.logger.info("Resizing and enhancing image...")
|
||||||
is_image_enhanced, img_org, img_res, num_col_classifier, num_column_is_classified, img_bin = self.resize_and_enhance_image_with_column_classifier()
|
is_image_enhanced, img_org, img_res, num_col_classifier, num_column_is_classified, img_bin = self.resize_and_enhance_image_with_column_classifier()
|
||||||
self.logger.info("Image is %senhanced", '' if is_image_enhanced else 'not ')
|
self.logger.info("Image was %senhanced.", '' if is_image_enhanced else 'not ')
|
||||||
K.clear_session()
|
K.clear_session()
|
||||||
scale = 1
|
scale = 1
|
||||||
if is_image_enhanced:
|
if is_image_enhanced:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue