knaw-huc / loghi

MIT License
104 stars 16 forks source link

HTR-training produces non-running model #34

Closed icarl-ad closed 2 months ago

icarl-ad commented 2 months ago

Hi there,

I started a HTR-training but the resulting model does not run.

The output files also look completely different from the standard model for dutch document: image

On the left you can see the files of the standard model and on the right you can see the output of my training.

Do you have an idea what happened and how I can fix it?

Thank you in advance!

rvankoert commented 2 months ago

use best_val as a model. The training output directory contains some metadata and plots about the training run. The actual model is stored in best_val.

icarl-ad commented 2 months ago

Thanks, that helped. Although now there was a new error message raised: ValueError: Charlist length (454) does not match model output length (455). If the charlist is correct, try setting use_mask to True.``

I checked the config.json in the best val directory and use_mask is already true.

rvankoert commented 2 months ago

checked with icarl-ad Issue is that older models have an extra character in the charlist. When continuing training using an older foundation model this issue can happen. Workaround is to copy charlist.txt from the old foundation model to the new model. We will solve this in a more permanent manner in one of the upcoming releases.