Something went wrong on our end
index.md 1.48 KiB
Train
Use the teklia-dan train
command to train a new DAN model.
Two subcommands are available depending on your dataset:
line
- Train a DAN model at line-level and evaluate it.
document
- Train a DAN model at document-level and evaluate it.
Examples
Document
To train DAN on documents:
- Set your training configuration in
dan/ocr/document/train.py
. Refer to the dedicated section for a description of parameters. - Run
teklia-dan train document
. - Look into evaluation results in the
output
folder:-
checkpoints
contains model weights for the last trained epoch and for the epoch giving the best valid CER. -
results
contains the tensorboard log file, the parameters file, and the evaluation results for the best epoch.
-
Line
To train DAN on lines:
- Set your training configuration in
dan/ocr/line/train.py
. Refer to the dedicated section for a description of parameters. - Run
teklia-dan train line
. - Look into evaluation results in the
output
folder:-
checkpoints
contains model weights for the last trained epoch and for the epoch giving the best valid CER. -
results
contains the tensorboard log file, the parameters file, and the evaluation results for the best epoch.
-
Note that it is possible to run teklia-dan train document
to train DAN on text lines. However, the configuration must be updated when training on synthetic documents.