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
!311
Something went wrong on our end
Make normalization optional
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Make normalization optional
optional-normalization
into
main
Overview
3
Commits
2
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Merged
Manon Blanco
requested to merge
optional-normalization
into
main
1 year ago
Overview
3
Commits
2
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Expand
Closes
#216 (closed)
0
0
Merge request reports
Viewing commit
259df647
Show latest version
1 file
+
3
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
259df647
Add early return
· 259df647
Manon Blanco
authored
1 year ago
dan/ocr/predict/inference.py
+
3
−
0
Options
@@ -125,6 +125,9 @@ class DAN:
image
=
read_image
(
path
)
preprocessed_image
=
self
.
preprocessing_transforms
(
image
)
if
self
.
mean
is
None
and
self
.
std
is
None
:
return
preprocessed_image
,
preprocessed_image
size
=
preprocessed_image
.
shape
normalized_image
=
torch
.
zeros
(
size
)
Loading