Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
f4f0628b
Commit
f4f0628b
authored
2 years ago
by
Inga Kirschnick
Browse files
Options
Downloads
Patches
Plain Diff
Ocropus nlbin threshold extension
parent
1faa98b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/services/forms.py
+4
-0
4 additions, 0 deletions
app/services/forms.py
app/services/routes.py
+2
-1
2 additions, 1 deletion
app/services/routes.py
app/templates/services/tesseract_ocr_pipeline.html.j2
+5
-0
5 additions, 0 deletions
app/templates/services/tesseract_ocr_pipeline.html.j2
with
11 additions
and
1 deletion
app/services/forms.py
+
4
−
0
View file @
f4f0628b
...
@@ -3,6 +3,7 @@ from flask_wtf import FlaskForm
...
@@ -3,6 +3,7 @@ from flask_wtf import FlaskForm
from
flask_wtf.file
import
FileField
,
FileRequired
from
flask_wtf.file
import
FileField
,
FileRequired
from
wtforms
import
(
from
wtforms
import
(
BooleanField
,
BooleanField
,
IntegerRangeField
,
MultipleFileField
,
MultipleFileField
,
SelectField
,
SelectField
,
StringField
,
StringField
,
...
@@ -49,6 +50,9 @@ class CreateTesseractOCRPipelineJobForm(CreateJobBaseForm):
...
@@ -49,6 +50,9 @@ class CreateTesseractOCRPipelineJobForm(CreateJobBaseForm):
binarization
=
BooleanField
(
'
Binarization
'
)
binarization
=
BooleanField
(
'
Binarization
'
)
pdf
=
FileField
(
'
File
'
,
validators
=
[
FileRequired
()])
pdf
=
FileField
(
'
File
'
,
validators
=
[
FileRequired
()])
model
=
SelectField
(
'
Model
'
,
validators
=
[
InputRequired
()])
model
=
SelectField
(
'
Model
'
,
validators
=
[
InputRequired
()])
ocropus_nlbin_threshold
=
IntegerRangeField
(
render_kw
=
{
'
tooltips
'
:
'
false
'
,
'
min
'
:
0
,
'
max
'
:
1
,
'
step
'
:
0.1
,
'
start
'
:
[
0.5
]}
)
def
validate_binarization
(
self
,
field
):
def
validate_binarization
(
self
,
field
):
service_info
=
SERVICES
[
'
tesseract-ocr-pipeline
'
][
'
versions
'
][
self
.
version
.
data
]
service_info
=
SERVICES
[
'
tesseract-ocr-pipeline
'
][
'
versions
'
][
self
.
version
.
data
]
...
...
This diff is collapsed.
Click to expand it.
app/services/routes.py
+
2
−
1
View file @
f4f0628b
...
@@ -78,7 +78,8 @@ def tesseract_ocr_pipeline():
...
@@ -78,7 +78,8 @@ def tesseract_ocr_pipeline():
service
=
service_name
,
service
=
service_name
,
service_args
=
{
service_args
=
{
'
binarization
'
:
form
.
binarization
.
data
,
'
binarization
'
:
form
.
binarization
.
data
,
'
model
'
:
hashids
.
decode
(
form
.
model
.
data
)
'
model
'
:
hashids
.
decode
(
form
.
model
.
data
),
'
ocropus_nlbin_threshold
'
:
form
.
ocropus_nlbin_threshold
.
data
},
},
service_version
=
form
.
version
.
data
,
service_version
=
form
.
version
.
data
,
user
=
current_user
user
=
current_user
...
...
This diff is collapsed.
Click to expand it.
app/templates/services/tesseract_ocr_pipeline.html.j2
+
5
−
0
View file @
f4f0628b
...
@@ -83,6 +83,11 @@
...
@@ -83,6 +83,11 @@
</label>
</label>
</div>
</div>
</div>
</div>
<div class="col s12"><p> </p></div>
<div class="col s9">
<p>Intensity</p>
<p class="range-field">{{ form.ocropus_nlbin_threshold() }}</p>
</div>
<div class="col s12"><p> </p></div>
<div class="col s12"><p> </p></div>
<div class="col s12 divider"></div>
<div class="col s12 divider"></div>
<div class="col s12"><p> </p></div>
<div class="col s12"><p> </p></div>
...
...
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