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
1f921b9d
Commit
1f921b9d
authored
Jun 30, 2025
by
hzwzwzw
Browse files
fix: duplicated removing high iou layout when scores are equal
parent
6209e45f
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 @
1f921b9d
...
...
@@ -47,10 +47,10 @@ class MagicModel:
def
__fix_by_remove_high_iou_and_low_confidence
(
self
):
need_remove_list
=
[]
layout_dets
=
self
.
__page_model_info
[
'layout_dets'
]
for
layout_det1
in
layout_dets
:
for
layout_det2
in
layout_dets
:
if
layout_det1
=
=
layout_det
2
:
continue
for
i
in
range
(
len
(
layout_dets
))
:
for
j
in
range
(
i
+
1
,
len
(
layout_dets
))
:
layout_det1
=
layout_det
s
[
i
]
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
(
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