Skip to content

Commit ed4722b

Browse files
committed
test: add enhance_box_line param test
1 parent ed66182 commit ed4722b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- **2024.11.16**
1919
- Added document distortion correction solution, which can be used as a pre-processing step [RapidUnWrap](https://github.com/Joker1212/RapidUnWrap)
2020
- **2024.11.22**
21-
- Support Char Rec, RapidOCR>=1.4.0 [RapidUnWrap](https://github.com/Joker1212/RapidUnWrap)
21+
- Support Char Rec, RapidOCR>=1.4.0
2222
### Introduction
2323
💖 This repository serves as an inference library for structured recognition of tables within documents, including models for wired and wireless table recognition from Alibaba DulaLight, a wired table model from llaipython (WeChat), and a built-in table classification model from NetEase Qanything.
2424

tests/test_wired_table_rec.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ def test_input_normal(img_path, gt_td_nums, gt2):
6868
@pytest.mark.parametrize(
6969
"img_path, gt_td_nums",
7070
[
71-
("wired_big_box.png", 70),
71+
("wired_big_box.png", 44),
7272
],
7373
)
74-
def test_input_normal(img_path, gt_td_nums):
74+
def test_enhance_box_line(img_path, gt_td_nums):
7575
img_path = test_file_dir / img_path
7676

7777
ocr_result, _ = ocr_engine(img_path)
78-
table_str, *_ = table_recog(str(img_path), ocr_result)
78+
table_str, *_ = table_recog(str(img_path), ocr_result, enhance_box_line=False)
7979
td_nums = get_td_nums(table_str)
8080

81-
assert td_nums >= gt_td_nums
81+
assert td_nums <= gt_td_nums
8282

8383

8484
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)