Re:RAGFlow is an open-source RAG engine based on OCR and doc...
by shekhar101 on Monday April 01, 2024 @07:44PM
(#39900759)
What's the name of the layout recorgniser model? I did not have a good experience extracting layout from tables, especially those without column boundaries (space instead of lines to demarcate boundaries)
Re:RAGFlow is an open-source RAG engine based on OCR and doc...
by mpeg on Monday April 01, 2024 @08:23PM
(#39901031)
it's https://huggingface.co/InfiniFlow/deepdoc and the code for usage is in https://github.com/infiniflow/ragflow/blob/main/deepdoc/READ... – it took me a bit of trial and error to get it working
It seems to be a YOLOv8 fine-tune, I only did a couple tests but results were decent. Another model that is supposed to be fine tuned for borderless is https://huggingface.co/keremberke/yolov8m-table-extraction but I haven't had great results myself with it, but maybe worth a try for you.
Re:RAGFlow is an open-source RAG engine based on OCR and doc...
by shekhar101 on Monday April 01, 2024 @09:44PM
(#39901507)
Thank you very much!
Re:RAGFlow is an open-source RAG engine based on OCR and doc...
by thegeomaster on Tuesday April 02, 2024 @06:57PM
(#39911760)
Here's a quick test to run: if you have Windows and MS Office, File->Open your PDF and report the results. You might be surprised at the layout extraction quality.
Re:RAGFlow is an open-source RAG engine based on OCR and doc...
by vissidarte_choi on Tuesday April 02, 2024 @01:07AM
(#39902572)
This is because PDF has so many different versions. A third-party tools like pdfplumber won't fit it all. For example, using pdfplumber to parse some PDFs will cause the system to raise exceptions. Sometimes fitz works in situations where pdfplumber won't handle well. It looks a bit complicated, but RAGFlow is using multiple parsing tools to handle different types of PDFs.
It correctly identifies tables that even paid models like the AWS Textract Document Analysis API fails to – for instance tables with one column which often confuse AWS even if they have a clear header and are labelled "Table" in the text.
I would however love to know broadly what kind of document it was trained on, as my results could be pure luck, hard to say without a proper benchmark
Very nice layout recognition, although I can't quite comment on the RAG performance itself – I think some of the architecture decisions are odd, it mixes a bunch of different PDF parsers for example which will all result in different quality and it's not clear to me which one it defaults to as it seems to be different in different places in the code (the simple parser defaults to pypdf2 which is not a great option)