diff --git a/docling/models/layout_model.py b/docling/models/layout_model.py index 1879da40..c9db93ec 100644 --- a/docling/models/layout_model.py +++ b/docling/models/layout_model.py @@ -205,12 +205,30 @@ class LayoutModel(BasePageModel): conv_res, page, clusters, mode_prefix="raw" ) + ################################################################################# + # Debug: Print the un-processed clusters + # + for i, cl in enumerate(clusters): + print( + f"{i}: Cluster: {cl.id} | {cl.label} | {cl.bbox} | {cl.confidence}" + ) + ################################################################################# + # Apply postprocessing processed_clusters, processed_cells = LayoutPostprocessor( page, clusters, self.options ).postprocess() # Note: LayoutPostprocessor updates page.cells and page.parsed_page internally + ################################################################################# + # Debug: Print the processed clusters + # + for i, cl in enumerate(processed_clusters): + print( + f"{i}: Processed Cluster: {cl.id} | {cl.label} | {cl.bbox} | {cl.confidence}" + ) + ################################################################################# + with warnings.catch_warnings(): warnings.filterwarnings( "ignore",