Commit afe1b02c authored by myhloli's avatar myhloli
Browse files

feat(magic_pdf): add logging for batch image processing

- Add batch processing logs to track the progress of image analysis
- Display the current batch number, total batches, and the number of processed pages
parent 15467730
...@@ -214,7 +214,10 @@ def batch_doc_analyze( ...@@ -214,7 +214,10 @@ def batch_doc_analyze(
batch_images = [images_with_extra_info[i:i+batch_size] for i in range(0, len(images_with_extra_info), batch_size)] batch_images = [images_with_extra_info[i:i+batch_size] for i in range(0, len(images_with_extra_info), batch_size)]
results = [] results = []
for batch_image in batch_images: processed_images_count = 0
for index, batch_image in enumerate(batch_images):
processed_images_count += len(batch_image)
logger.info(f'Batch {index + 1}/{len(batch_images)}: {processed_images_count} pages/{len(images_with_extra_info)} pages')
result = may_batch_image_analyze(batch_image, True, show_log, layout_model, formula_enable, table_enable) result = may_batch_image_analyze(batch_image, True, show_log, layout_model, formula_enable, table_enable)
results.extend(result) results.extend(result)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment