Python OCR Enhancement for Scanned Documents

Job ID: 40499195

Budget: $30 – $250 USD

I have a working Python system that downloads public procurement plans (PAC) from a government portal and turns them into analytical Excel reports. I need a full review and improvement of the whole pipeline, not a rewrite — study the existing code, reuse what's good, fix and harden everything from collection to the final report.
Scope (single phase):

Extraction & OCR (top priority): scanned/photographed documents currently read with low confidence. Add image preprocessing (300+ DPI, deskew, adaptive binarization, denoise, auto rotation, numeric-column cropping), one-page-per-request reading, robust JSON parsing, and optional Tesseract/PaddleOCR cross-check of numbers.
Data processing & classification: normalize fields, split New-Contracting vs Renewal, detect Framework Agreement and procedure type, and classify each item by market area and strategic fit (CORE / EXTENSION / DIVERSIFICATION / SERVICE / NON-ADDRESSABLE) — parameterizable by business profile.
Validation & confidence: arithmetic checks (qty × price ≈ value), anomaly detection, per-item confidence scoring, smarter reprocessing.
Analytical report (the goal): auto-generate a formatted multi-tab .xlsx (Opportunities by Area, New vs Renewal, Item Ranking, Dashboard, per-institution detail) with charts, conditional formatting, Kz currency format and formula totals. A reference report will be provided as the exact target.

Must preserve existing features (resumable state, deduplication, cost economy) and never forge values. Stack: Python 3, PyMuPDF, Pillow, openpyxl, Anthropic API. Code comments in Portuguese. Validated against a sample document batch (before/after metrics + the generated report). Full technical brief + target report provided to the selected freelancer.