OBrink / DECIMER.ai

This repository contains the code for https://decimer.ai
MIT License
38 stars 9 forks source link

ErrorException #56

Closed akaktower closed 1 year ago

akaktower commented 1 year ago

I got this error bellow, while upload an image to local web service. I am sure that DECIMER.ai web service can convert this image correctly to smile. Also, I followed the manual during the installation. Could you help me please. ErrorException count(): Parameter must be an array or an object that implements Countable

akaktower commented 1 year ago
Snipaste_2023-03-06_10-41-20
OBrink commented 1 year ago

Hello @akaktower,

Thank you for the report! This error is due to the models not being loaded properly, yet. This can be due to a) not enough time having past since starting the app or b) running out of memory and the models being unable to load. To avoid loading time on the user side, multiple instances of each model are pre-loaded. This is memory-consuming, but it makes the app faster. When it starts the first time, all models need to be downloaded. Hence, one instance of DECIMER Segmentation, DECIMER Image Transformer and STOUT is loaded immediately after starting the app, and all other instances are only loaded after 2 minutes to give so that the model files are already downloaded then.

1) Try to wait 5 minutes after starting the app. 2) If that does not work, try reducing the amount of preloaded instances to 1 for DECIMER Segmentation, DECIMER Image Transformer and STOUT (have a look at the section How to modify the number of preloaded model instances? here). In the default version, the app needs approximately 20 GB of RAM. This can be reduced quite a lot.

I'd be happy to hear if this helped!

Kind regards, Otto

akaktower commented 1 year ago

Hi Otto, Thanks for your reply. The server runs well since all models have been downloaded. It would be better if you add some new features in docker-compose to show a process while loading training models. Thanks again for your effort for this project. This wed sever is really nice and user-friendly. Wish you good luck!

Kind regards, Eldar

OBrink commented 1 year ago

Thanks for the feedback! I have opened an issue for your suggestion (#57), so it will appear in my to-do-list, but it may take a while until I find time to do this.