mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-30 14:39:54 +02:00
reduce redundancy/indentation
This commit is contained in:
parent
01376af905
commit
cfc65128b1
1 changed files with 404 additions and 408 deletions
|
@ -4397,10 +4397,9 @@ class Eynollah:
|
|||
self.logger.warning("will skip input for existing output file '%s'", self.writer.output_filename)
|
||||
continue
|
||||
|
||||
if self.extract_only_images:
|
||||
img_res, is_image_enhanced, num_col_classifier, num_column_is_classified = self.run_enhancement(self.light_version)
|
||||
self.logger.info("Enhancing took %.1fs ", time.time() - t0)
|
||||
|
||||
if self.extract_only_images:
|
||||
text_regions_p_1 ,erosion_hurts, polygons_lines_xml,polygons_of_images,image_page, page_coord, cont_page = self.get_regions_light_v_extract_only_images(img_res, is_image_enhanced, num_col_classifier)
|
||||
ocr_all_textlines = None
|
||||
pcgts = self.writer.build_pagexml_no_full_layout([], page_coord, [], [], [], [], polygons_of_images, [], [], [], [], [], cont_page, [], [], ocr_all_textlines)
|
||||
|
@ -4413,9 +4412,8 @@ class Eynollah:
|
|||
continue
|
||||
else:
|
||||
return pcgts
|
||||
|
||||
if self.skip_layout_and_reading_order:
|
||||
img_res, is_image_enhanced, num_col_classifier, num_column_is_classified = self.run_enhancement(self.light_version)
|
||||
self.logger.info("Enhancing took %.1fs ", time.time() - t0)
|
||||
_ ,_, _, textline_mask_tot_ea, img_bin_light = self.get_regions_light_v(img_res, is_image_enhanced, num_col_classifier,
|
||||
skip_layout_and_reading_order=self.skip_layout_and_reading_order)
|
||||
|
||||
|
@ -4454,9 +4452,7 @@ class Eynollah:
|
|||
continue
|
||||
else:
|
||||
return pcgts
|
||||
if not self.extract_only_images and not self.skip_layout_and_reading_order:
|
||||
img_res, is_image_enhanced, num_col_classifier, num_column_is_classified = self.run_enhancement(self.light_version)
|
||||
self.logger.info("Enhancing took %.1fs ", time.time() - t0)
|
||||
|
||||
#print("text region early -1 in %.1fs", time.time() - t0)
|
||||
t1 = time.time()
|
||||
if self.light_version:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue