Skip to content
Snippets Groups Projects

Training workflow

There are a several steps to follow when training a DAN model.

1. Extract data

The data must be extracted and formatted for training. To extract the data, DAN uses an Arkindex export database in SQLite format. You will need to:

  1. Structure the data into folders (train / val / test) in Arkindex.
  2. Export the project in SQLite format.
  3. Extract the data with the extract command.
  4. Format the data with the format command.

At the end, you should have a tree structure like this:

output/
├── charset.pkl
├── labels.json
├── split.json
├── images
│   ├── train
│   ├── val
│   └── test
└── labels
    ├── train
    ├── val
    └── test

2. Train

The training command does not take any input parameters for now. To train a DAN model, you will therefore need to:

  1. Update the parameters from those listed in the dedicated page. You will always need to update at least these variables:

    • dataset_name, dataset_level, dataset_variant and dataset_path,
    • model_params.transfer_learning.*[checkpoint_path] to finetune an existing model,
    • training_params.output_folder.
  2. Train a DAN model with the train command.

3. Predict

Once the training is complete, you can apply a trained DAN model on an image using the predict command and the inference_parameters.yml file, located in {training_params.output_folder}/results.