Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Data Generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
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
Data Generator
Commits
641d6c3f
Commit
641d6c3f
authored
3 years ago
by
Martin
Browse files
Options
Downloads
Patches
Plain Diff
remove deprecated filtering by source.slug
parent
681f7ff5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!17
remove deprecated filtering by source.slug
Pipeline
#74307
passed
3 years ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kaldi_data_generator/main.py
+0
-18
0 additions, 18 deletions
kaldi_data_generator/main.py
with
0 additions
and
18 deletions
kaldi_data_generator/main.py
+
0
−
18
View file @
641d6c3f
...
...
@@ -24,9 +24,6 @@ from kaldi_data_generator.image_utils import (
)
from
kaldi_data_generator.utils
import
TranscriptionData
,
logger
,
write_file
# api_client = ArkindexClient(**options_from_env())
# api_client = None
SEED
=
42
random
.
seed
(
SEED
)
MANUAL
=
"
manual
"
...
...
@@ -64,7 +61,6 @@ class HTRDataGenerator:
out_dir_base
=
"
/tmp/kaldi_data
"
,
grayscale
=
True
,
extraction
=
Extraction
.
boundingRect
,
accepted_slugs
=
None
,
accepted_classes
=
None
,
filter_printed
=
False
,
skip_vertical_lines
=
False
,
...
...
@@ -83,8 +79,6 @@ class HTRDataGenerator:
self
.
dataset_name
=
dataset_name
self
.
grayscale
=
grayscale
self
.
extraction_mode
=
extraction
self
.
accepted_slugs
=
accepted_slugs
self
.
should_filter_by_slug
=
bool
(
self
.
accepted_slugs
)
self
.
accepted_classes
=
accepted_classes
self
.
should_filter_by_class
=
bool
(
self
.
accepted_classes
)
self
.
accepted_worker_version_ids
=
accepted_worker_version_ids
...
...
@@ -174,11 +168,6 @@ class HTRDataGenerator:
for
res
in
self
.
api_client
.
paginate
(
"
ListTranscriptions
"
,
id
=
page_id
,
recursive
=
True
):
if
(
self
.
should_filter_by_slug
and
res
[
"
source
"
][
"
slug
"
]
not
in
self
.
accepted_slugs
):
continue
if
(
self
.
should_filter_by_worker
and
res
[
"
worker_version_id
"
]
not
in
self
.
accepted_worker_version_ids
...
...
@@ -677,12 +666,6 @@ def create_parser():
help
=
"
skips vertical lines when downloading
"
,
)
parser
.
add_argument
(
"
--accepted_slugs
"
,
nargs
=
"
*
"
,
help
=
"
List of accepted slugs for downloading transcriptions
"
,
)
parser
.
add_argument
(
"
--accepted_classes
"
,
nargs
=
"
*
"
,
...
...
@@ -744,7 +727,6 @@ def main():
out_dir_base
=
args
.
out_dir
,
grayscale
=
args
.
grayscale
,
extraction
=
args
.
extraction_mode
,
accepted_slugs
=
args
.
accepted_slugs
,
accepted_classes
=
args
.
accepted_classes
,
filter_printed
=
args
.
filter_printed
,
skip_vertical_lines
=
args
.
skip_vertical_lines
,
...
...
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