davanstrien HF Staff commited on
Commit
7593b9a
Β·
1 Parent(s): fa7a872

Add Nanonets-OCR2 documentation to README

Browse files

- Add Nanonets OCR2 (nanonets-ocr2.py) to available scripts section
- Highlight 3.75B params, enhanced quality, and Qwen2.5-VL base
- Add HF Jobs example for Nanonets OCR2
- Add local usage example
- Position as next-generation quality option

πŸ€– Generated with Claude Code

Files changed (1) hide show
  1. README.md +25 -0
README.md CHANGED
@@ -51,6 +51,19 @@ State-of-the-art document OCR using [nanonets/Nanonets-OCR-s](https://huggingfac
51
  - πŸ–ΌοΈ **Images** - Captions and descriptions included
52
  - β˜‘οΈ **Forms** - Checkboxes rendered as ☐/β˜‘
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ### SmolDocling (`smoldocling-ocr.py`)
55
 
56
  Ultra-compact document understanding using [ds4sd/SmolDocling-256M-preview](https://huggingface.co/ds4sd/SmolDocling-256M-preview) with only 256M parameters:
@@ -155,6 +168,15 @@ hf jobs uv run \
155
  --max-model-len 16384 \
156
  --batch-size 128
157
 
 
 
 
 
 
 
 
 
 
158
  # NuMarkdown with reasoning traces for complex documents
159
  hf jobs uv run \
160
  --flavor l4x4 \
@@ -202,6 +224,9 @@ uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
202
  uv run rolm-ocr.py documents extracted-text
203
  uv run rolm-ocr.py images texts --shuffle --max-samples 100 # Random sample
204
 
 
 
 
205
  ```
206
 
207
  ## πŸ“ Works With
 
51
  - πŸ–ΌοΈ **Images** - Captions and descriptions included
52
  - β˜‘οΈ **Forms** - Checkboxes rendered as ☐/β˜‘
53
 
54
+ ### Nanonets OCR2 (`nanonets-ocr2.py`)
55
+
56
+ Next-generation Nanonets OCR using [nanonets/Nanonets-OCR2-3B](https://huggingface.co/nanonets/Nanonets-OCR2-3B) with improved accuracy:
57
+
58
+ - 🎯 **Enhanced quality** - 3.75B parameters for superior OCR accuracy
59
+ - πŸ“ **LaTeX equations** - Mathematical formulas preserved in LaTeX format
60
+ - πŸ“Š **Advanced tables** - Improved HTML table extraction
61
+ - πŸ“ **Document structure** - Headers, lists, formatting maintained
62
+ - πŸ–ΌοΈ **Smart image captions** - Intelligent descriptions and captions
63
+ - β˜‘οΈ **Forms** - Checkboxes rendered as ☐/β˜‘
64
+ - 🌍 **Multilingual** - Enhanced language support
65
+ - πŸ”§ **Based on Qwen2.5-VL** - Built on state-of-the-art vision-language model
66
+
67
  ### SmolDocling (`smoldocling-ocr.py`)
68
 
69
  Ultra-compact document understanding using [ds4sd/SmolDocling-256M-preview](https://huggingface.co/ds4sd/SmolDocling-256M-preview) with only 256M parameters:
 
168
  --max-model-len 16384 \
169
  --batch-size 128
170
 
171
+ # Nanonets OCR2 - Next-gen quality with 3B model
172
+ hf jobs uv run \
173
+ --flavor l4x1 \
174
+ --secrets HF_TOKEN \
175
+ https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr2.py \
176
+ your-input-dataset \
177
+ your-output-dataset \
178
+ --batch-size 16
179
+
180
  # NuMarkdown with reasoning traces for complex documents
181
  hf jobs uv run \
182
  --flavor l4x4 \
 
224
  uv run rolm-ocr.py documents extracted-text
225
  uv run rolm-ocr.py images texts --shuffle --max-samples 100 # Random sample
226
 
227
+ # Nanonets OCR2 for highest quality
228
+ uv run nanonets-ocr2.py documents ocr-results
229
+
230
  ```
231
 
232
  ## πŸ“ Works With