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
435fbdd5
Commit
435fbdd5
authored
1 year ago
by
Manon Blanco
Committed by
Mélodie Boillet
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove width_divisor and height_divisor parameters from training configuration
parent
a93bc055
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!166
Remove width_divisor and height_divisor parameters from training configuration
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dan/manager/ocr.py
+2
-3
2 additions, 3 deletions
dan/manager/ocr.py
dan/ocr/document/train.py
+0
-2
0 additions, 2 deletions
dan/ocr/document/train.py
docs/usage/train/parameters.md
+0
-2
0 additions, 2 deletions
docs/usage/train/parameters.md
tests/conftest.py
+0
-2
0 additions, 2 deletions
tests/conftest.py
with
2 additions
and
9 deletions
dan/manager/ocr.py
+
2
−
3
View file @
435fbdd5
...
...
@@ -77,9 +77,8 @@ class OCRDataset(GenericDataset):
super
(
OCRDataset
,
self
).
__init__
(
params
,
set_name
,
custom_name
,
paths_and_sets
)
self
.
charset
=
None
self
.
tokens
=
None
self
.
reduce_dims_factor
=
np
.
array
(
[
params
[
"
config
"
][
"
height_divisor
"
],
params
[
"
config
"
][
"
width_divisor
"
],
1
]
)
# Factor to reduce the height and width of the feature vector before feeding the decoder.
self
.
reduce_dims_factor
=
np
.
array
([
32
,
8
,
1
])
self
.
collate_function
=
OCRCollateFunction
def
__getitem__
(
self
,
idx
):
...
...
This diff is collapsed.
Click to expand it.
dan/ocr/document/train.py
+
0
−
2
View file @
435fbdd5
...
...
@@ -105,8 +105,6 @@ def get_config():
"
config
"
:
{
"
load_in_memory
"
:
True
,
# Load all images in CPU memory
"
worker_per_gpu
"
:
4
,
# Num of parallel processes per gpu for data loading
"
width_divisor
"
:
8
,
# Image width will be divided by 8
"
height_divisor
"
:
32
,
# Image height will be divided by 32
"
padding_value
"
:
0
,
# Image padding value
"
padding_token
"
:
None
,
# Label padding value
"
preprocessings
"
:
[
...
...
This diff is collapsed.
Click to expand it.
docs/usage/train/parameters.md
+
0
−
2
View file @
435fbdd5
...
...
@@ -14,8 +14,6 @@ All hyperparameters are specified and editable in the training scripts (meaning
|
`dataset_params.config.datasets`
| Dataset dictionary with the dataset name as key and dataset path as value. |
`dict`
| |
|
`dataset_params.config.load_in_memory`
| Load all images in CPU memory. |
`str`
|
`True`
|
|
`dataset_params.config.worker_per_gpu`
| Number of parallel processes per gpu for data loading. |
`int`
|
`4`
|
|
`dataset_params.config.height_divisor`
| Factor to reduce the width of the feature vector before feeding the decoder. |
`int`
|
`8`
|
|
`dataset_params.config.width_divisor`
| Factor to reduce the height of the feature vector before feeding the decoder. |
`int`
|
`32`
|
|
`dataset_params.config.padding_value`
| Image padding value. |
`int`
|
`0`
|
|
`dataset_params.config.padding_token`
| Transcription padding value. |
`int`
|
`None`
|
|
`dataset_params.config.preprocessings`
| List of pre-processing functions to apply to input images. |
`list`
| (see
[
dedicated section
](
#data-preprocessing
)
) |
...
...
This diff is collapsed.
Click to expand it.
tests/conftest.py
+
0
−
2
View file @
435fbdd5
...
...
@@ -68,8 +68,6 @@ def training_config():
},
"
config
"
:
{
"
load_in_memory
"
:
True
,
# Load all images in CPU memory
"
width_divisor
"
:
8
,
# Image width will be divided by 8
"
height_divisor
"
:
32
,
# Image height will be divided by 32
"
padding_value
"
:
0
,
# Image padding value
"
padding_token
"
:
None
,
# Label padding value
"
preprocessings
"
:
[
...
...
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