Live data from Hacker News

Nanonets-OCR-s – OCR model that transforms documents into structured markdown

huggingface.co

41–50 of 85 posts

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#41
post #6

It's not open-source (nor open-weight): https://huggingface.co/nanonets/Nanonets-OCR-s/discussions/2

Hi, author of the model here. It is an open-weight model, you can download it from here: https://huggingface.co/nanonets/Nanonets-OCR-s

IMO weights being downloadable doesn't mean it's open weight.

My understanding:

    - Weight available: You can download the weights.
    - Open weight: You can download the weights, and it is licensed freely (e.g. public domain, CC BY-SA, MIT).
    - Open source: (Debated) You can download the weights, it is licensed freely, and the training dataset is also available and licensed freely.
For context:

> You're right. The Apache-2.0 license was mistakenly listed, and I apologize for the confusion. Since it's a derivative of Qwen-2.5-VL-3B, it will have the same license as the base model (Qwen RESEARCH LICENSE AGREEMENT). Thanks for pointing this out.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#42
post #39

Earlier quoted context omitted.

We have trained the model on tables with hierarchical column headers and with rowspan and colspan >1. So it should work fine. This is the reason we predict the table in HTML instead of markdown.

Thank you. I was rather thinking of magazine like layouts with columns of text and headers and footers on every page holding article title and page number.

It should work there also. We have trained on research papers with two columns of text. Generally, papers have references as a footer and contains page number.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#43
I created a Powershell script to run this locally on any PDF: https://gist.github.com/kordless/652234bf0b32b02e39cef32c71e...

It does work, but it is very slow on my older GPU (Nvidia 1080 8GB). I would say it's taking at least 5 minutes per page right now, but maybe more.

Edit: If anyone is interested in trying a PDF to markdown conversion utility built this that is hosted on Cloud Run (with GPU support), let me know. It should be done in about an hour or so and I will post a link up here when it's done.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#44

Full disclaimer: I work at Nanonets Excited to share Nanonets-OCR-s, a powerful and lightweight (3B) VLM model that converts documents into clean, structured Markdown. This model is trained to understand document structure and content context (like tables, equations, images, plots, watermarks, checkboxes, etc.). Key Features: LaTeX Equation Recognition Converts inline and block-level math into properly formatted LaTe…

Does it have a way to extract the images themselves, or is that still a separate process later?

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#46

I have been looking for something that would ingest a decade of old Word and PowerPoint documents and convert them into a standardized format where the individual elements could be repurposed for other formats. This seems like a critical building block for a system that would accomplish this task. Now I need a catalog, archive, or historian function that archives and pulls the elements easily. Amazing work!

Can't you just start with unoconv or pandoc, then maybe use an LLM to clean up after converting to plain text?

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#47
post #21

It’s a shame all these models target markdown and not something with more structure and a specification. There are different flavors of Markdown and limited support for footnotes, references, figures, etc.

I was more excited to hear about "structured Markdown" than the LLM OCR model, but the extent of it just seems to be tagging certain elements. It's useful in the LLM context but not as much outside of it.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#48
post #38
post #35

Earlier quoted context omitted.

First I heard of it. https://en.wikipedia.org/wiki/Text_Encoding_Initiative

Understandable. I work in academic publishing, and while the XML is everywhere crowd is graying, retiring, or even dying :( it still remains an excellent option for document markup. Additionally, a lot of government data produced in the US and EU make heavy use of XML technologies. I imagine they could be an interested consumer of Nanonets-OCR. TEI could be a good choice as well tested and developed conversions exist…

maybe even epub, which is xhtml

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#49
I have a Shipibo (indigenous Peruvian language) to Spanish dictionary that I've been trying to translate into a Shipibo to English dictionary using a couple different llms but keep struggling with formatting (two columns, strange line breaks, but also both Shipibo and Spanish in the definitions make it difficult to grok). That all plus being pretty poorly scanned. May need to give this a try.

Re: Nanonets-OCR-s – OCR model that transforms documents into structured markdown

#50

I created a Powershell script to run this locally on any PDF: https://gist.github.com/kordless/652234bf0b32b02e39cef32c71e... It does work, but it is very slow on my older GPU (Nvidia 1080 8GB). I would say it's taking at least 5 minutes per page right now, but maybe more. Edit: If anyone is interested in trying a PDF to markdown conversion utility built this that is hosted on Cloud Run (with GPU support), let me kno…

Reporting back on this, here's some sample output from https://www.sidis.net/animate.pdf:

  THE ANIMATE
  AND THE INANIMATE

  WILLIAM JAMES SIDIS

  A black-and-white illustration of a figure holding a book with the Latin phrase "ARTI et VERITATI" below it.

  BOSTON

  RICHARD G. BADGER, PUBLISHER

  THE GORHAM PRESS

  Digitized by Google
I haven't see ANY errors in what it has done, which is quite impressive.

Here, it's doing tables of contents (I used a slightly different copy of the PDF than I linked to):

  
    
      Chapter
      Page
    
    
      PREFACE
      3
    
    
      I. THE REVERSE UNIVERSE
      9
    
    
      II. REVERSIBLE LAWS
      14
    
Other than the fact it is ridiculously slow, this seems to be quite good at doing what it says it does.
Post reply on HN