Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Merge requests
!101
Re-fix offset in get_predicted_polygons_with_confidence()
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Re-fix offset in get_predicted_polygons_with_confidence()
re-fix-offset-in-get_predicted_polygons_with_confidence
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Solene Tarride
requested to merge
re-fix-offset-in-get_predicted_polygons_with_confidence
into
main
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#45 (closed)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
c41b8603
1 commit,
1 year ago
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
dan/predict/attention.py
+
1
−
1
Options
@@ -115,7 +115,6 @@ def get_predicted_polygons_with_confidence(
polygons
=
[]
start_index
=
0
for
text_piece
,
confidence
in
zip
(
text_list
,
confidence_list
):
start_index
+=
len
(
text_piece
)
+
offset
polygon
,
_
=
get_polygon
(
text_piece
,
max_value
,
@@ -125,6 +124,7 @@ def get_predicted_polygons_with_confidence(
threshold_value
=
threshold_value
,
size
=
(
width
,
height
),
)
start_index
+=
len
(
text_piece
)
+
offset
polygon
[
"
text
"
]
=
text_piece
polygon
[
"
text_confidence
"
]
=
confidence
polygons
.
append
(
polygon
)
Loading