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
Commits
259df647
Commit
259df647
authored
1 year ago
by
Manon Blanco
Browse files
Options
Downloads
Patches
Plain Diff
Add early return
parent
6d9a1591
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request
!311
. Comments created here will be created in the context of that merge request.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dan/ocr/predict/inference.py
+3
-0
3 additions, 0 deletions
dan/ocr/predict/inference.py
with
3 additions
and
0 deletions
dan/ocr/predict/inference.py
+
3
−
0
Edit
View file @
259df647
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment