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
3043f55e
Unverified
Commit
3043f55e
authored
Jun 30, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Jun 30, 2025
Browse files
Merge pull request #2831 from hzwzwzw/master
fix: duplicated removing high iou layout when scores are equal
parents
1db02e94
1f921b9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mineru/backend/pipeline/pipeline_magic_model.py
mineru/backend/pipeline/pipeline_magic_model.py
+4
-4
No files found.
mineru/backend/pipeline/pipeline_magic_model.py
View file @
3043f55e
...
@@ -47,10 +47,10 @@ class MagicModel:
...
@@ -47,10 +47,10 @@ class MagicModel:
def
__fix_by_remove_high_iou_and_low_confidence
(
self
):
def
__fix_by_remove_high_iou_and_low_confidence
(
self
):
need_remove_list
=
[]
need_remove_list
=
[]
layout_dets
=
self
.
__page_model_info
[
'layout_dets'
]
layout_dets
=
self
.
__page_model_info
[
'layout_dets'
]
for
layout_det1
in
layout_dets
:
for
i
in
range
(
len
(
layout_dets
))
:
for
layout_det2
in
layout_dets
:
for
j
in
range
(
i
+
1
,
len
(
layout_dets
))
:
if
layout_det1
=
=
layout_det
2
:
layout_det1
=
layout_det
s
[
i
]
continue
layout_det2
=
layout_dets
[
j
]
if
layout_det1
[
'category_id'
]
in
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]
and
layout_det2
[
'category_id'
]
in
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]:
if
layout_det1
[
'category_id'
]
in
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]
and
layout_det2
[
'category_id'
]
in
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]:
if
(
if
(
calculate_iou
(
layout_det1
[
'bbox'
],
layout_det2
[
'bbox'
])
calculate_iou
(
layout_det1
[
'bbox'
],
layout_det2
[
'bbox'
])
...
...
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