kba / kraken-docker

Docker container for the kraken OCR engine
https://hub.docker.com/r/kbai/kraken/
MIT License
5 stars 6 forks source link

add kraken models to the Dockerfile #2

Open lunactic opened 7 years ago

lunactic commented 7 years ago

Hey,

do you think it would be possible to download and install the currently available kraken models directly in the Dockerfile (with kraken get MODELNAME)?

I think it would not blow the size of the image by much but the models would be already available at runtime.

kba commented 7 years ago

Sure.

I've begun an engine-agnostic registry/client tool a few weeks back that can download/install ocropus/tesseract models as well: https://github.com/kba/ocr-models / https://github.com/kba/ocr-models-client. I use that for docker-ocropy see https://github.com/kba/docker-ocropy/blob/master/Dockerfile#L10

I like that model registry feature of kraken, i just would love to see more engine interop/model sharing.

kba commented 7 years ago

I've updated the container to contain the default and fraktur models.

It now lives at https://hub.docker.com/r/kbai/kraken without trailing -docker but I'll keep the https://hub.docker.com/r/kbai/kraken-docker around and up-to-date. Let me know if you have any problems or want additional models bundled.

kba commented 7 years ago

Size is actually smaller than before because the build tools aren't required for the built container and the kraken's protobuf-based models are really small, esp. in comparison with ocropus' pickled rnn.