INVOICE
INTELLIGENCE.
An 8-stage financial document intelligence and Accounts Payable workstation combining OpenCV affine deskewing, Tesseract 5.4 bounding-box OCR, reverse-token table extraction, mathematical line-item reconciliation, and audited Excel/JSON exports.
BRIDGING UNSTRUCTURED INVOICES AND AUDITED LEDGERS.
Manual invoice entry suffers from transcription errors and duplicate disbursements. Invoice Intelligence enforces mathematical verification and human-in-the-loop confidence inspection.
OpenCV Image Pipeline
Performs MinAreaRect affine deskewing, bilateral edge-preserving denoising, 1.5x bicubic upscaling, and Otsu binarization.
Tesseract 5.4 BBox Overlay
Extracts spatially anchored tokens under PSM 4 and highlights fields Green (>=80%), Amber (50–79%), or Red (<50%).
Reverse-Token Table Parser
Scans invoice line items right-to-left to robustly separate quantities, unit rates, taxes, and amounts even in wrapped descriptions.
Math Reconciliation Gate
Validates sum(line_items) + tax against extracted invoice grand totals, routing discrepancies directly into My Work Queue.
Currency-Segregated AP Desk
Separates INR, USD, EUR, and GBP analytics totals accurately without mixing FX denominations.
Formula-Safe Excel Export
Neutralizes spreadsheet CSV/Excel formula injection payloads while emitting audit logs and normalized vendor summaries.
HOW IT WORKS.
Documents flow from raw upload through CV enhancement, regex/reverse-token parsing, math checks, and AP ledger approval.
Capture
PDF/Image upload & SHA duplicate check.
CV + OCR
Deskew, Otsu & Tesseract PSM 4.
Extract
Regex anchors & reverse-token lines.
Reconcile
Line-sum vs subtotal/tax math check.
Audit Export
Approve & sanitize .xlsx ledger.
APPLICATION SCREENSHOTS.
Live screens captured from the running application. Click any image to view full size, or follow setup instructions in the GitHub repository.
OCR CONFIDENCE & RECONCILIATION RULES.
Key modules, rules, safety checks, and automated test results documented in the repository.
| Stage / Rule | Threshold / Logic | Action |
|---|---|---|
| Confidence Tiering | Green >= 80% | Amber 50–79% | Red < 50% | Visual reviewer bbox color highlight |
| Preprocessing | MinAreaRect deskew + Otsu + 1.5x bicubic | Maximizes scanned receipt legibility |
| Exception Queue | MISSING_INFO / VALIDATION_FAILED / DUPLICATE | Prioritized inbox in My Work Queue |
| Export Security | Prefix-escapes =, +, -, @ cell starters | Prevents Excel formula execution |
CORE TECHNOLOGIES.
Frameworks, databases, visualization tools, and testing libraries used in Invoice Intelligence.
FUTURE ENHANCEMENTS.
Upcoming improvements planned for Invoice Intelligence.
EXPLORE SOURCE & DOCS.
View the complete codebase, sample datasets, quick-launch scripts, and automated test suites on GitHub.