From fdd3e385cd51fd6e645357a00cd285e43f4b2de4 Mon Sep 17 00:00:00 2001 From: Shannon Shen <22512825+lolipopshock@users.noreply.github.com> Date: Fri, 9 Dec 2022 10:54:02 -0500 Subject: [PATCH] Fix the incorrect variable names in line detection --- src/layoutparser/tools/shape_operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layoutparser/tools/shape_operations.py b/src/layoutparser/tools/shape_operations.py index 1f60ab6..47dc077 100644 --- a/src/layoutparser/tools/shape_operations.py +++ b/src/layoutparser/tools/shape_operations.py @@ -126,7 +126,7 @@ def is_line_wise_close(token_a, token_b, x_tolerance, y_tolerance): detected_lines = generalized_connected_component_analysis_1d( layout, scoring_func=partial( - is_line_wise_close, y_tolerance=x_tolerance, x_tolerance=y_tolerance + is_line_wise_close, y_tolerance=y_tolerance, x_tolerance=x_tolerance ), aggregation_func=lambda seq: reduce(layout[0].__class__.union, seq), )