Research
Open Source

Nanonets OCR 2

From Pixels to Structure

Souvik Mandal
By Souvik Mandal
Oct 10, 2025 7 min read
OVERVIEW

Today, we are proud to announce the release of Nanonets-OCR2, a state-of-the-art suite of models designed for advanced image-to-markdown conversion and Visual Question Answering (VQA).

Nanonets-OCR2 not only converts documents into structured markdown but also leverages intelligent content recognition, semantic tagging, and context-aware visual question answering, enabling deeper understanding and more accurate interpretation of complex documents.

This model builds upon the capabilities of our previous release, Nanonets-OCR-s, offering significant enhancements in document understanding and content differentiation. The improved model can accurately distinguish between standard content and specialized elements such as watermarks, signatures, headers, footers, checkboxes and page numbers. It has been trained to provide more descriptive interpretations of visual elements within documents, while also delivering improved performance on complex structures including tables, checkboxes, and equations. Additionally, the new models are capable of generating Mermaid code for flowcharts and organizational charts, enabling seamless visualization of structured information.

The model has also been specifically trained for Visual Question Answering (VQA) focused on context-driven information extraction. When the requested information is not present in the document, the model is designed to return Not mentioned. This targeted training approach reduces hallucinations compared to models trained on generic VQA tasks, resulting in more accurate and reliable answers.

Nanonets OCR2 Family Explore and test the model on Docstrange
Model
Access Link
Nanonets-OCR2-Plus
Nanonets-OCR2-3B
Nanonets-OCR2-1.5B-exp
KEY FEATURES AND CAPABILITIES
1. LaTeX Equation Recognition

Automatically converts mathematical equations and formulas into properly formatted LaTeX syntax. Inline mathematical expressions are converted to LaTeX inline equations, while displayed equations are converted to LaTeX display equations. Page number is predicted within the <page_number> tag.

Input
Output
Raw ModelOutput
2. Intelligent Image Description

Describes images within documents using structured tags, making them digestible for LLM processing. If the figure caption is present, then uses that as description else the model will generate the description. The model can describe single or multiple images (logos, charts, graphs, qr codes, etc.) in terms of their content, style, and context. The model predicts the image description within the <img> tag.

Input
Output
Raw ModelOutput
3. Signature Detection & Isolation

Identifies and isolates signatures from other text in documents, crucial for legal and business document processing. The model predicts the signature text within the <signature> tag. If the signature is not readable then the model will return <signature>signature<signature> to mark as signed.

Input
Output
Raw ModelOutput
4. Watermark Extraction

Similar to signature detection, the model can detect and extract watermark text from documents. The model predicts the watermark text within the <watermark> tag. The model is performs well on low quality images aswell as shown below

Input
Output
Raw ModelOutput
5. Smart Checkbox Handling

Converts form checkboxes and radio buttons into standardized Unicode symbols for consistent processing. The model predicts the checkbox status within the <checkbox> tag.

Input
Output
Raw ModelOutput
6. Complex Table Extraction

Extracts complex tables from documents and converts them into markdown and html tables.

Input
Output
Raw ModelOutput
7. Flow chart & organizational chart

The model extracts mermaid code for flowchart and organizational charts.

Input
Output
Raw ModelOutput
8. Multilingual

Model is trained on documents of multiple languages, including English, Chinese, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Arabic, and many more.

Input
Output
Raw ModelOutput
9. Visual Question Answering

The model is designed to provide the answer directly if it is present in the document; otherwise, it responds with "Not mentioned."

Input
EVALUATION AND BENCHMARKS
Image to Markdown Evaluations

We used Gemini-2.5-Pro as the judge model to evaluate the markdown outputs generated by two models. Although existing benchmarks such as  olmOCRbench   and OmniDocBench  
are available, they have notable limitations when it comes to assessing image-to-markdown performance — which we'll explore in detail in a separate post. We plan to open-source the evaluation code and model predictions on our GitHub repository.

Nanonets OCR2 Plus
Model

Nanonets Plus Wins(%)

Nanonets Plus Loses (%)

Both Correct (%)

Gemini 2.5 Flash

57.60
34.35
8.06
GPT-5
74.86
23.53
1.60
Nanonets-OCR2-3B
54.58
29.37
16.04
Nanonets OCR2 3B
Model

Nanonets Wins(%)

Nanonets Loses (%)

Both Correct

Gemini 2.5 Flash

52.43
39.98
7.58
GPT-5
72.87
25.00
2.13
Data Extraction Evaluation

Key Information Extraction (KIE) is a critical task in IDP that involves accurately extracting specific data fields from documents. We evaluated Nanonets-OCR2-Plus on the IDP-leaderboard , which benchmarks models across multiple datasets including Nanonets-KIE, DocILE, and Handwritten-Forms. Our model achieves state-of-the-art performance, ranking #1 on the leaderboard with an average score of 81.16, outperforming leading models from Google, Anthropic, and OpenAI.

Key Information Extraction (KIE) Leaderboard
Rank
Model
Avg
Nanonets-KIE
DocILE
Handwritten-Forms
1
Nanonets-OCR2-Plus
81.16
90.56
76.93
75.99
2
gemini-2.5-pro-preview-03-25 (reasoning: low)
79.66
91.00
65.79
82.18
3
qwen2.5-vl-32b-instruct
79.63
89.18
69.18
80.54
4
gemini-2.5-pro-preview-06-05 (reasoning: low)
78.92
91.33
63.99
81.44
5
gemini-2.5-flash-preview-04-17
77.99
91.29
63.35
79.34
6
gemini-2.0-flash
77.22
88.31
65.06
78.28
7
gemini-2.5-flash-lite-preview-06-17
77.20
90.91
64.48
76.21
8
qwen2.5-vl-72b-instruct
76.11
90.52
58.37
79.45
9
claude-3.7-sonnet (reasoning:low)
76.09
87.61
66.80
73.86
10
o4-mini-2025-04-16
75.43
86.91
59.52
79.85
11
mistral-medium-3
74.21
86.49
61.82
77.94
12
llama-4-maverick(400B-A17B)
73.30
85.78
61.70
72.43
13
gemma-3-27b-it
72.81
85.14
60.18
73.13
14
gpt-4.1-2025-04-14
72.68
87.85
61.20
68.98
15
gpt-5-2025-08-07
72.19
86.70
59.14
70.72
16
claude-sonnet-4
71.91
85.78
63.53
66.42
17
gpt-4o-2024-08-06
71.83
88.63
56.37
70.48
18
gpt-4o-2024-11-20
70.91
88.03
56.56
68.15
19
InternVL3-38B-Instruct
70.31
84.02
57.47
69.42
20
gpt-4o-mini-2024-07-18
70.03
86.37
60.45
63.26
21
gpt-4.1-nano-2025-04-14
66.25
80.21
51.13
67.41
22
mistral-small-3.1-24b-instruct
63.73
75.47
47.07
68.64
TRAINING DETAILS

To train our new Visual-Language Model (VLM) for high-precision optical character recognition (OCR), we assembled a dataset of over 3 million pages. This dataset encompasses a wide range of document types, including research papers, financial reports, legal contracts, healthcare records, tax forms, receipts, and invoices. It also includes documents featuring embedded images, plots, equations, signatures, watermarks, checkboxes, and complex tables. Furthermore, we incorporated flowcharts, organizational charts, handwritten materials, and multilingual documents to ensure comprehensive coverage of real-world document variations.

We have used both synthetic and manually annotated datasets. We first trained the model on the synthetic dataset and then fine-tuned it on the manually annotated dataset.
We selected the Qwen2.5-VL-3B model as the base model for our Visual-Language Model (VLM). This model was subsequently fine-tuned on the curated dataset to improve its performance on document-specific Optical Character Recognition (OCR) tasks.

Limitations:

• For complex flowcharts and organizational charts the model might produce incorrect results.
• Model can suffer from hallucination.

USECASES

Nanonets-OCR2 streamlines complex document workflows across industries by unlocking structured data from unstructured formats.

Academic & Research

Digitizes papers with LaTeX equations and tables.

Legal & Financial

Digitizes papers with LaTeX equations and tables.

Healthcare & Pharma

Accurately captures text and checkboxes from medical forms.

Corporate & Enterprise

Transforms reports into searchable, image -aware knowledge bases.

In a world moving towards LLM-driven automation, unstructured data is the biggest bottleneck. Nanonets-OCR2 bridges that gap, transforming messy documents into the clean, structured, and context-rich markdown that modern AI applications demand.

TRY IT TODAY

We have integrated Nanonets-OCR2 with Docstrange feel free to try it. Feel free to start a discussion on GitHub or Hugging Face if you have any questions.