Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
e139e5bd
Unverified
Commit
e139e5bd
authored
Jan 15, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Jan 15, 2025
Browse files
Merge pull request #1542 from myhloli/dev
refactor(pre_proc): adjust IOU threshold for character overlap detection
parents
60054feb
f37b14bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
magic_pdf/pre_proc/ocr_span_list_modify.py
magic_pdf/pre_proc/ocr_span_list_modify.py
+1
-1
No files found.
magic_pdf/pre_proc/ocr_span_list_modify.py
View file @
e139e5bd
...
...
@@ -36,7 +36,7 @@ def remove_overlaps_low_confidence_spans(spans):
def
check_chars_is_overlap_in_span
(
chars
):
for
i
in
range
(
len
(
chars
)):
for
j
in
range
(
i
+
1
,
len
(
chars
)):
if
calculate_iou
(
chars
[
i
][
'bbox'
],
chars
[
j
][
'bbox'
])
>
0.
9
:
if
calculate_iou
(
chars
[
i
][
'bbox'
],
chars
[
j
][
'bbox'
])
>
0.
35
:
return
True
return
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment