Views
No views yet
pdf2image / poppler) and runs the V2 pipeline page-by-page, writing one .txt file per page.1# CUDA toolkit (must match torch CUDA major version)
2# Install cuda-nvcc-12-8 + cuda-cudart-dev-12-8 + cuda-libraries-dev-12-8
3
4pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
5pip install hatchling hatch-vcs huggingface_hub pdf2image pillow
6
7huggingface-cli download nvidia/nemotron-ocr-v2 --local-dir nemotron-ocr-v2
8cd nemotron-ocr-v2/nemotron-ocr
9TORCH_CUDA_ARCH_LIST="8.9" pip install --no-build-isolation -v .
10
11apt-get install -y poppler-utils1python run_ocr_pdf.py sample.pdf --page 1
2python run_ocr_pdf.py sample.pdf --page 0 # all pages
3python run_ocr_pdf.py sample.pdf --lang multi --merge-level sentenceocr_out/page_NNN.png and ocr_out/page_NNN.txt.