Error in input/output sizing when running "analyzer_with_table_transformer_notebook"
I'm getting an error associated with the output sizing of a layer being too small:
It's possible that this is due to an error associated with loading saved weights:
However, after reading issue https://github.com/deepdoctection/deepdoctection/issues/290, which talks about how these warnings don't need to be taken too seriously, I am uncertain that this is the root cause.
I encountered this error in the process of trying to reproduce the results in the analyzer_with_table_transformer tutorial.
You can reproduce this error by running this Colaboratory notebook: https://colab.research.google.com/drive/1wrZLIOlvU7sAu0gVc3s4uCTCmKcA64df?usp=sharing
Note, this occurs even without table transformers or table detection, eg:
analyzer = dd.get_dd_analyzer(reset_config_file=True,
config_overwrite=
[
"OCR.USE_DOCTR=True", # we disable Tesseract and use DocTr as OCR engine
"OCR.USE_TESSERACT=False"])
Switching to ["OCR.USE_DOCTR=False", "OCR.USE_TESSERACT=True"] fixes things. So I think that whatever is going wrong is related to how docTR is being used.
Thanks for reporting and providing the Colab with the sample.
I was eventually able to reproduce this issue locally and the root of this is the pre-processor of the DocTr-text recognizer which is instantiated with a bad configuration. This results in unexpected tensor sizes.
I have provided a fix along with #344. It is only available on the main branch for now.
Feel free to check if it is working for you.
I just pip installed directly from main and was able to run this successfully. Thanks for the quick fix!
Closing with Closing with #344 .