CodePrism Technologies logoCodePrism Technologies
Case Study — FMCG & Retail: Document Intelligence

PrismOCR: Deterministic Computer Vision for Label Extraction

A production-ready OCR engine that extracts structured product label data (GTIN, FSSAI, net weight, MRP, dates, and more) using barcode decoding and deterministic computer-vision rules, with validator-gated accuracy and zero data fabrication. There is no LLM involved: this is pure computer vision, running entirely offline with zero per-document API cost.

PlatformWeb & Batch
DurationOngoing
TypeFMCG & Retail: Document Intelligence
Stack12 technologies
PROJECT OVERVIEW

14

Structured fields extracted per label

0

Fields fabricated or guessed, by design

$0

Per-document OCR API cost

6

Label faces (Front/Back/Left/Right/Top/Bottom) merged per product

THE CHALLENGE

WhatsApp messaging gets complicated at scale.

FMCG and retail teams manage catalogues of thousands of SKUs, each requiring accurate label data (GTIN, FSSAI licence number, net weight, MRP, and manufacturing/expiry dates) for regulatory compliance, e-commerce listings, and data-pool submissions. Manual transcription from label photographs is slow and does not scale, while generative OCR and LLM-based extraction tools carry an unacceptable risk: they can produce fluent, plausible-looking values that were never actually printed on the label. For regulated numeric fields, a fabricated digit is not a minor error: it is a compliance and financial risk.

Challenge 1

Manual transcription of label data (GTIN, FSSAI licence numbers, net weight, MRP, expiry dates) from thousands of product images is slow, error-prone, and does not scale to a catalogue of thousands of SKUs.

Challenge 2

Generative and LLM-based OCR tools can silently invent plausible-looking values, a serious risk for regulated fields like GTIN and FSSAI licence numbers, where a single wrong digit carries compliance and financial consequences.

Challenge 3

Cloud OCR and vision APIs charge per document, which becomes cost-prohibitive at high volume and raises data-privacy concerns for proprietary product catalogues.

Challenge 4

Teams need an audit trail showing exactly where each extracted value came from (the source image, snippet, and confidence), not just a final answer.

Challenge 5

A single product typically has multiple label faces (front, back, ingredients panel, nutritional panel) whose data must be reconciled into one authoritative record.

Measurable Impact
14Structured fields extracted per label
0Fields fabricated or guessed, by design
$0Per-document OCR API cost
6Label faces (Front/Back/Left/Right/Top/Bottom) merged per product
3Offline OCR engines chained with automatic fallback
100%GTIN outputs gated by checksum validation
WHAT WE LEARNED
01

Deterministic computer vision, not an LLM, powers every extraction, giving clients consistency, predictability, and full data privacy.

02

Barcode-first identification plus checksum and format validators mean the system never fabricates a value: unclear or unverifiable data is dropped, not guessed.

03

Multi-engine OCR fallback and multi-face image consolidation make the pipeline resilient to varied label layouts, image quality, and fully offline environments.

04

Batch processing, persistent job history, and optional authentication make the platform ready for real production workloads, not just single-image demos.

05

The architecture is extensible by design: optional AI-assisted enhancements can be added later as a genuine hybrid capability, without ever making the core OCR workflow dependent on GPT or any generative AI model.

Technologies Background
Our Technologies

Built with technologies we trust.

Python 3
FastAPI
Uvicorn
OpenCV (opencv-python-headless)
PaddleOCR
EasyOCR
Tesseract OCR (pytesseract)
zxing-cpp barcode decoding
Redis (job queue)
SQLite (job history)
Docker Compose
NumPy

Project Goals

Build a deterministic, computer-vision-based extraction pipeline that never fabricates data: every value is either barcode-decoded or a verbatim, validator-passed OCR read.
Achieve zero-tolerance accuracy on regulated numeric fields (GTIN, FSSAI, net weight, MRP) through checksum validation, format gates, and confidence thresholds.
Eliminate per-document OCR API costs and external AI dependency by running the entire extraction pipeline offline on commodity hardware.
Handle real-world multi-face packaging by reconciling front, back, left, right, top, and bottom label images into a single authoritative product record.
Move from single-image testing to a deployable, multi-user batch workflow with persistent job history and optional deployment authentication.
Design the platform to be extensible: ready to incorporate optional AI-assisted enhancements in the future without ever making the core OCR workflow dependent on them.

The Outcome

PrismOCR proves that a zero-hallucination extraction requirement is best met not by a larger model but by the deliberate absence of one. By combining barcode-first identification, checksum validation, anchored keyword extraction, and multi-engine OCR with automatic fallback, the platform delivers a guarantee generative pipelines cannot: every value returned is either decoded directly from real pixels or it is not returned at all. The architecture (queue-backed batch processing, persistent job history, optional authentication) is built for production deployment, not a lab demo, while remaining extensible: optional AI-assisted enhancements can be layered on top of the deterministic core when a use case calls for it, without ever compromising the core guarantee of source-grounded, auditable extraction.

Conclusion & Impact

"Codeprism's OCR platform proves that enterprise-grade document intelligence doesn't require a large language model or a per-document API call. By anchoring every extraction in decoded barcodes, a chained multi-engine OCR pipeline, and anchor-and-validator-gated field rules, the system delivers extraction that is consistent, auditable, and private enough to run entirely within a client's own infrastructure, at zero per-document cost and zero external AI dependency. There is no LLM involved. This is pure computer vision. The platform is production-ready today, with batch processing, job history, and deployment authentication already in place, and it was designed with extensibility in mind: optional AI-assisted enhancements can be added later as a genuine hybrid capability, layered on top of the deterministic core rather than replacing it. For organizations digitizing product labels, verifying regulatory compliance, or automating catalog data entry, this approach delivers accuracy they can verify, costs they can predict, and a system they fully control."

Have a project in mind?

Let's discuss how we can help you build your next big thing.
Reach out and our team will be in touch.

Protected by reCAPTCHA. Google Privacy & Terms apply.

Building systems that hold up in production.

Bring up the problem others won't attempt.