Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
fc234831
Unverified
Commit
fc234831
authored
Apr 23, 2024
by
myhloli
Committed by
GitHub
Apr 23, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #62 from myhloli/master
update confidence score 0.95->0.05
parents
ec2cbddc
11462061
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
magic_model.py
magic_pdf/model/magic_model.py
+1
-1
ocr_dict_merge.py
magic_pdf/pre_proc/ocr_dict_merge.py
+2
-2
No files found.
magic_pdf/model/magic_model.py
View file @
fc234831
...
...
@@ -48,7 +48,7 @@ class MagicModel:
need_remove_list
=
[]
layout_dets
=
model_page_info
[
"layout_dets"
]
for
layout_det
in
layout_dets
:
if
layout_det
[
"score"
]
<
0.9
5
:
if
layout_det
[
"score"
]
<
=
0.0
5
:
need_remove_list
.
append
(
layout_det
)
else
:
continue
...
...
magic_pdf/pre_proc/ocr_dict_merge.py
View file @
fc234831
...
...
@@ -120,14 +120,14 @@ def sort_blocks_by_layout(all_bboxes, layout_bboxes):
# 如果是footnote则跳过
if
block
[
7
]
==
BlockType
.
Footnote
:
continue
block_bbox
=
[
block
[
0
],
block
[
1
],
block
[
2
],
block
[
3
]
]
block_bbox
=
block
[:
4
]
if
calculate_overlap_area_in_bbox1_area_ratio
(
block_bbox
,
layout_bbox
)
>
0.8
:
layout_blocks
.
append
(
block
)
# 如果layout_blocks不为空,则放入new_blocks中
if
len
(
layout_blocks
)
>
0
:
new_blocks
.
append
(
layout_blocks
)
# 从
spans删除已经放入layout_sapns中的span
# 从
all_bboxes删除已经放入layout_blocks中的block
for
layout_block
in
layout_blocks
:
all_bboxes
.
remove
(
layout_block
)
...
...
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