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
b0aa9972
Commit
b0aa9972
authored
1 year ago
by
Manon Blanco
Browse files
Options
Downloads
Patches
Plain Diff
Apply suggestions
parent
046e202c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!305
Load the model via a path to a folder
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dan/ocr/predict/__init__.py
+1
-1
1 addition, 1 deletion
dan/ocr/predict/__init__.py
dan/ocr/predict/inference.py
+1
-1
1 addition, 1 deletion
dan/ocr/predict/inference.py
docs/usage/predict/index.md
+1
-1
1 addition, 1 deletion
docs/usage/predict/index.md
with
3 additions
and
3 deletions
dan/ocr/predict/__init__.py
+
1
−
1
View file @
b0aa9972
...
...
@@ -31,7 +31,7 @@ def add_predict_parser(subcommands) -> None:
parser
.
add_argument
(
"
--model
"
,
type
=
pathlib
.
Path
,
help
=
"
Path to the directory containing the model, the YAML parameters file and the charset file to
be
use
d
for prediction.
"
,
help
=
"
Path to the directory containing the model, the YAML parameters file and the charset file to use for prediction.
"
,
required
=
True
,
)
parser
.
add_argument
(
...
...
This diff is collapsed.
Click to expand it.
dan/ocr/predict/inference.py
+
1
−
1
View file @
b0aa9972
...
...
@@ -437,7 +437,7 @@ def run(
Predict a single image save the output
:param image: Path to the image to predict.
:param image_dir: Path to the folder where the images to predict are stored.
:param model: Path to the directory containing the model, the YAML parameters file and the charset file to
be
use
d
for prediction.
:param model: Path to the directory containing the model, the YAML parameters file and the charset file to use for prediction.
:param output: Path to the output folder where the results will be saved.
:param confidence_score: Whether to compute confidence score.
:param attention_map: Whether to plot the attention map.
...
...
This diff is collapsed.
Click to expand it.
docs/usage/predict/index.md
+
1
−
1
View file @
b0aa9972
...
...
@@ -9,7 +9,7 @@ Use the `teklia-dan predict` command to apply a trained DAN model on an image.
|
`--image`
| Path to the image to predict. Must not be provided with
`--image-dir`
. |
`pathlib.Path`
| |
|
`--image-dir`
| Path to the folder where the images to predict are stored. Must not be provided with
`--image`
. |
`pathlib.Path`
| |
|
`--image-extension`
| The extension of the images in the folder. Ignored if
`--image-dir`
is not provided. |
`str`
| .jpg |
|
`--model`
| Path to the directory containing the model, the YAML parameters file and the charset file to
be
use
d
for prediction |
`pathlib.Path`
| |
|
`--model`
| Path to the directory containing the model, the YAML parameters file and the charset file to use for prediction
.
|
`pathlib.Path`
| |
|
`--output`
| Path to the output folder. Results will be saved in this directory. |
`pathlib.Path`
| |
|
`--tokens`
| Path to a yaml file containing a mapping between starting tokens and end tokens. Needed for entities. |
`pathlib.Path`
| |
|
`--temperature`
| Temperature scaling scalar parameter. |
`float`
|
`1.0`
|
...
...
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