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
!274
Something went wrong on our end
Add Language Model Decoder
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add Language Model Decoder
lm-decoder
into
main
Overview
37
Commits
34
Pipelines
0
Changes
3
Merged
Solene Tarride
requested to merge
lm-decoder
into
main
1 year ago
Overview
30
Commits
34
Pipelines
0
Changes
3
Expand
Closes
#142 (closed)
Taking over from
!222 (closed)
0
0
Merge request reports
Viewing commit
d6d5d342
Prev
Next
Show latest version
3 files
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
d6d5d342
Fix documentation
· d6d5d342
Solene Tarride
authored
1 year ago
dan/ocr/decoder.py
+
2
−
2
Options
@@ -597,8 +597,8 @@ class CTCLanguageDecoder:
)
->
Dict
[
str
,
List
[
Union
[
str
,
float
]]]:
"""
Decode a feature vector using n-gram language modelling.
:param features: Feature vector of size (batch_size, n_tokens, n_frames).
:param batch_
siz
es: Prediction length of size batch_size.
:param
batch_
features: Feature vector of size (batch_size, n_tokens, n_frames).
:param batch_
fram
es: Prediction length of size batch_size.
:return: A dictionary containing the hypotheses and their confidences.
"""
# Reshape from (batch_size, n_tokens, n_frames) to (batch_size, n_frames, n_tokens)
Loading