Skip to content

NanoNets/Nanonets-OCR2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nanonets OCR2 Cookbooks

A comprehensive collection of examples and configurations for getting the best results from the Nanonets-OCR2 model. This repository provides practical implementations for various OCR use cases including financial documents, complex tables, and multilingual content.

πŸ“š Documentation

Cookbooks & Examples

  • Image to Markdown Converter: Comprehensive notebook showcasing the best practices for using Nanonets-OCR2-3B model across various document types including:
    • Bank statements and financial documents
    • Complex tables and structured data
    • Photos captured from mobile devices
    • Multilingual images and documents

πŸ› οΈ Installation

Prerequisites

  • Python 3.11
  • CUDA-compatible GPU (recommended for optimal performance)
  • uv package manager

Setup Instructions

  1. Install uv package manager:

    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Create virtual environment and install dependencies:

    # Create virtual environment with Python 3.11
    uv venv --python=3.11
    
    # Activate the virtual environment
    source .venv/bin/activate
    
    # Install dependencies
    uv pip install -r requirements.txt
  3. Start Jupyter Lab:

    jupyter lab

πŸ“¦ Dependencies

This project uses the following key dependencies:

  • PyTorch: Deep learning framework with CUDA support
  • Transformers: Hugging Face transformers library for model inference
  • Jupyter: Interactive notebook environment
  • PDF2Image: PDF document processing
  • Accelerate: Model acceleration and optimization

🎯 Quick Start

  1. Clone this repository
  2. Follow the installation steps above
  3. Open the Jupyter notebook in Nanonets-OCR2-Cookbook/image2md.ipynb
  4. Run the cells to see examples of OCR processing

🀝 Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

About

Evaluations for Nanonets-OCR-1.5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published