mittagessen / kraken

OCR engine for all the languages
http://kraken.re
Apache License 2.0
724 stars 130 forks source link

kraken 5.2.4 on eScriptorium recognition artefacts #605

Closed johnlockejrr closed 4 months ago

johnlockejrr commented 4 months ago

I'm not sure if is eScriptorium or kraken related, I just want to poin out, same model, same image on different installs:

  1. eScriptorium with kraken 4.3.13 (python 3.8)

esc-kraken-4

  1. eScriptorium with kraken 5.2.4 (python 3.10)

esc-kraken-5

Both segmentation and recognition models were trained on kraken 5.2.4

dstoekl commented 4 months ago

looks like shapely

dstoekl commented 4 months ago

the polygon is too big and the recognizer wasn't trained on lines where the letters are only a quarter of the line height.

johnlockejrr commented 4 months ago

Here is on kraken 4.x, same model.

image
johnlockejrr commented 4 months ago

The models I used in this test: mcdonald.zip

mittagessen commented 4 months ago

It isn't a model issue but the polygonization is wrong. I'll have a look. The rotation code changed between 4.x and 5.x so it's either that or other shapely shenanigans.

mittagessen commented 4 months ago

Could you also send me the image file and any ALTO/PageXML you've got? It's difficult to debug without being able to run a test case.

johnlockejrr commented 4 months ago

export_doc23_memar_marqah_mcdonald_alto_202405131147.zip Sure, here it is the image with ALTO (from 4.x)

mittagessen commented 4 months ago

Thanks. It's mostly so I can make sure the baselines are identical.

johnlockejrr commented 4 months ago

Any update on this matter?

mittagessen commented 4 months ago

Apparently, the error persists on some other image data.

mittagessen commented 4 months ago

Nope, not true after all. Just crappy output of the polygonizer.