Problem Statements Analysis

From what to build to how to build it — our platform helps you understand, plan, and solve SIH 2026 problem statements with complete insights into requirements, solution approaches, technology stacks, architecture, AI/ML, and implementation roadmaps.

Scroll down
01 / SIH 2026

PS: SIH26034

Software System to check compliance of Packaged Commodities under Legal Metrology(Packaged Commodities) Rules, 2011 by scanning products, images and labels.

Description: Background: Packaged commodities are widely sold through retail stores, supermarkets and e-commerce platforms across India. Under the Legal Metrology Act, 2009 and the Legal Metrology(Packaged Commodities) Rules, 2011, every packaged commodity is required to bear mandatory declarations such as name and address of manufacturer/packer/importer, net quantity, Maximum Retail Price (MRP), month and year of manufacture/packing/import,consumer care details and other prescribed declarations in a specified format and manner.These declarations are important for ensuring transparency, fair trade practices and consumer protection. However, due to the large volume and variety of packaged products available in the market, manual inspection and compliance checking by enforcement agencies becomes time-consuming and resource intensive. Non-compliance such as missing declarations, incorrect font sizes, improper MRP declarations and other such practices are frequently observed.There is scope to develop a compliance checking system capable of scanning product labels,package images and product listings to identify violations under the Legal Metrology(Packaged Commodities) Rules, 2011. Accordingly, a software system capable of automatically detecting, extracting and validating mandatory declarations and identifying noncompliances in packaged commodities through image and label analysis can be developed. Description: Develop a software application capable of scanning packaged commodity labels, product images and product information to automatically assess compliance with the Legal Metrology(Packaged Commodities) Rules, 2011. The system should be capable of: • Scanning and analyzing images of packaged commodities. • Detecting mandatory declarations prescribed under Legal Metrology rules. • Checking correctness, completeness and placement of declarations. • Identifying missing or non-compliant declarations. • Checking readability and font size requirements. • Generating compliance reports and violation summaries. • Maintaining a repository of scanned products and compliance history. • Providing dashboards for enforcement officials. Expected Solution: The proposed solution should include: • User-friendly web and/or mobile-based software application. • Automated extraction and validation of mandatory declarations. • Rule-based compliance checking for Legal Metrology (Packaged Commodities) Rules, 2011. • Generation of digital compliance reports in PDF and editable formats. • Dashboard for monitoring inspections, violations and product compliance details. • Search and retrieval facility for previously scanned products and reports. • Technical documentation describing software architecture and deployment framework. Key Functional Requirements: • Image upload and product scanning functionality. • Extraction of declarations from labels and packaging and detection of mandatory declarations • Font size and readability analysis. • Detection of missing, misleading or non-standard declarations. • Generation of compliance/non-compliance reports. • Attachment of photographs and supporting evidence. • Repository of scanned products and inspection history. • Role-based user access and secure authentication. • Dashboard for monitoring compliance status and enforcement activities. • Export of reports to PDF and editable formats.
Organization: Ministry of Consumer Affairs, Food & Public Distribution
Department: Department of Consumer Affairs (DoCA)
Category: Software
Theme: Miscellaneoustd>
Youtube Link: Not provided
Dataset Link: https://consumeraffairs.gov.in/pages/legal-metrology-act and the Legal Metrology (Packaged commodities) Rules, 2011
Contact info: Not provided

1. Executive Snapshot

Summary

Every pre-packaged commodity sold across physical retail, supermarkets, and e-commerce platforms in India is legally mandated under the Legal Metrology Act, 2009 and the Legal Metrology (Packaged Commodities) Rules, 2011 (LMPC Rules) to carry explicit declarations [PS]. These declarations include manufacturer/importer identity, generic commodity name, net quantity in standard SI units, month/year of manufacture or packing, Maximum Retail Price (MRP inclusive of all taxes), unit sale price, and consumer care details [PS, RESEARCHED]. However, due to the vast volume and variety of goods, manual inspection by legal metrology officers is resource-intensive, resulting in widespread non-compliance such as missing declarations, improper font sizes, illegible text, and misleading claims [PS].

This project delivers "MetroCheck AI", an offline-first, computer-vision and rule-engine powered mobile and web application that automates the detection, extraction, physical font-measurement, and statutory compliance checking of packaged commodity labels [INFERENCE]. Designed for field enforcement officers, e-commerce compliance teams, and consumers, the system extracts text via fine-tuned optical character recognition (OCR), calculates Principal Display Panel (PDP) surface areas and physical font heights using spatial calibration, runs a deterministic Legal Metrology rule engine, and automatically generates legal notice PDF reports synced with a centralized inspection repository [INFERENCE].

Metadata Table

Attribute Value Source Tag
Problem Statement ID SIH26034 [PS]
Title Software System to check compliance of Packaged Commodities under Legal Metrology(Packaged Commodities) Rules, 2011 by scanning products, images and labels. [PS]
Organization Ministry of Consumer Affairs, Food & Public Distribution [PS]
Department Department of Consumer Affairs (DoCA) [PS]
Category Software [PS]
Theme Miscellaneous [PS]
Deadline 30 September 2026 [PS]
Ideas Counter 1/500 [PS]
Dataset Link https://consumeraffairs.gov.in/pages/legal-metrology-act and Legal Metrology (Packaged Commodities) Rules, 2011 [PS]

Fundamental System Objective

To provide an automated, vision-driven, and rule-based compliance auditing platform that scans packaged commodity labels and product listings, measures spatial font dimensions against statutory PDP thresholds under the Legal Metrology (Packaged Commodities) Rules, 2011, and generates legally compliant inspection reports and violation notices [PS, INFERENCE].

2. Problem Deconstruction

The explicit problem requirements from SIH26034 are extracted into atomic requirements below, preserving the exact intent and wording from the source JSON [PS].

  • REQ-1: Image Upload & Product Scanning

    • Source Text: "Scanning and analyzing images of packaged commodities... Image upload and product scanning functionality." [PS]
    • Interpretation: System must capture or upload multi-angle photos of physical product packaging, printed labels, and e-commerce product listing screenshots [INFERENCE].
    • Implementation Implication: Mobile app must support live camera capture with grid overlays and scale markers; web app must support drag-and-drop image uploads [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-2: Detection & Extraction of Mandatory Declarations

    • Source Text: "Detecting mandatory declarations prescribed under Legal Metrology rules... Extraction of declarations from labels and packaging and detection of mandatory declarations" [PS]
    • Interpretation: Automatically locate and transcribe all 8 mandatory statutory declarations under Rule 6 of LMPC Rules, 2011 [RESEARCHED].
    • Implementation Implication: Multi-lingual OCR pipeline paired with LayoutLMv3 / RegEx Key-Value Extractor to parse Name/Address, Generic Name, Net Quantity, Mfg/Pkg Date, MRP, Unit Sale Price, Country of Origin, and Consumer Care [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-3: Font Size & Readability Analysis

    • Source Text: "Checking readability and font size requirements... Font size and readability analysis." [PS]
    • Interpretation: Calculate the physical millimeter height and width of numerals/letters on the Principal Display Panel (PDP) and evaluate contrast against background [INFERENCE].
    • Implementation Implication: Spatial scale calibration (using camera intrinsics or reference ArUco / coin targets), PDP surface area polygon calculation, font height measurement against Table-I of Rule 7 (e.g., 1mm, 2mm, 4mm, 6mm height minimums) [RESEARCHED, INFERENCE].
    • Confidence Tag: [PS]
  • REQ-4: Detection of Missing, Misleading, or Non-Standard Declarations

    • Source Text: "Checking correctness, completeness and placement of declarations... Identifying missing or non-compliant declarations... Detection of missing, misleading or non-standard declarations." [PS]
    • Interpretation: Identify missing mandatory fields, non-SI units (e.g., measuring in lbs instead of kg), exaggerated/misleading expressions (Rule 12), and improper placement outside the PDP [RESEARCHED, INFERENCE].
    • Implementation Implication: Deterministic Rule Validation Engine applying regex patterns for SI units, MRP format check (presence of ₹/Rs., inclusive of all taxes), and field completeness scoring [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-5: Report Generation & Violation Summaries

    • Source Text: "Generating compliance reports and violation summaries... Generation of digital compliance reports in PDF and editable formats." [PS]
    • Interpretation: Produce instant downloadable compliance and violation reports complete with annotated product photos, statutory rule violation citations, and editable fields for legal notice serving [INFERENCE].
    • Implementation Implication: Templated PDF generator (PDFKit / ReportLab) and editable JSON/DOCX export options [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-6: Photographic Evidence Attachment

    • Source Text: "Attachment of photographs and supporting evidence." [PS]
    • Interpretation: Attach raw captured images, bounding-box annotated label images, and timestamped geolocations to the inspection report for judicial admissibility [INFERENCE].
    • Implementation Implication: Secure object storage (S3 / MinIO) with EXIF metadata preservation, SHA-256 image hashing, and GPS stamp overlay [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-7: Scanned Product Repository & History

    • Source Text: "Maintaining a repository of scanned products and compliance history... Search and retrieval facility for previously scanned products and reports." [PS]
    • Interpretation: Searchable database storing historical inspections, brand non-compliance records, repeat offender tracking, and audit logs [INFERENCE].
    • Implementation Implication: PostgreSQL database with full-text search (pg_trgm) indexed by GTIN/barcode, brand name, batch number, inspector ID, and date range [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-8: Role-Based User Access & Security

    • Source Text: "Role-based user access and secure authentication." [PS]
    • Interpretation: Differentiated access levels for Legal Metrology Inspectors, State/Central Administrators, E-commerce Marketplaces, and Public Citizens [INFERENCE].
    • Implementation Implication: JWT / OAuth2 authentication with Role-Based Access Control (RBAC) enforced via API gateways [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-9: Monitoring Dashboards

    • Source Text: "Providing dashboards for enforcement officials... Dashboard for monitoring compliance status and enforcement activities." [PS]
    • Interpretation: Executive analytical dashboard visualizing regional compliance rates, top violating product categories, active enforcement drives, and inspector activity [INFERENCE].
    • Implementation Implication: Interactive dashboard frontend (React + Chart.js / Recharts) fed by aggregated backend analytics APIs [INFERENCE].
    • Confidence Tag: [PS]
  • REQ-10: Technical Documentation

    • Source Text: "Technical documentation describing software architecture and deployment framework." [PS]
    • Interpretation: Comprehensive technical docs covering system design, OCR models, rule engines, API specs, and deployment guides [INFERENCE].
    • Implementation Implication: OpenAPI/Swagger docs, System Architecture Dossier, and Dockerized deployment scripts [INFERENCE].
    • Confidence Tag: [PS]

3. Stakeholders & User Needs

Stakeholder Goal Current Pain System Need
Legal Metrology Inspector (Field Officer) Quickly inspect physical retail stock, detect label violations accurately, and issue notices without manual paperwork. Manual measurement with calipers/ruler is slow; verifying font size rules across hundreds of products in a store is infeasible [KNOWN]. Mobile app with offline camera scanning, auto-bounding box detection, millimeter font height estimation, and instant PDF notice generation [INFERENCE].
State / Central Legal Metrology Administrator (DoCA) Monitor statewide enforcement trends, track repeat offending brands, and deploy inspection forces strategically. Data siloing across districts; lack of real-time visibility into systemic non-compliance across e-commerce & offline markets [RESEARCHED]. Central web dashboard with heatmaps, brand compliance analytics, repeat-violator alerts, and direct integration capabilities with eMaap portal [RESEARCHED, INFERENCE].
E-Commerce Compliance Team / Seller Pre-audit thousands of digital product listings and uploaded images before publishing to avoid regulatory fines/delisting [RESEARCHED]. High volume of seller uploads; manual auditing leads to missed non-compliant listings and government seizure notices [RESEARCHED]. Automated bulk image API scanner that flags non-compliant listing photos and missing mandatory declarations prior to live publishing [INFERENCE].
Public Citizen / Consumer Verify whether a purchased product or e-commerce listing complies with pricing, quantity, and origin declarations. Misleading MRP, missing country of origin, or hidden net quantity without an easy way to verify or report violations [KNOWN]. Public mobile web scanner mode to check packaging compliance and lodge verified complaints directly to the National Consumer Helpline / DoCA [INFERENCE].

4. Requirements Traceability

Feature / Module Addressed Requirement Justification & Legal Basis
Mobile Label Scanner & Scale Calibration Engine REQ-1, REQ-3, REQ-6 Enables camera capture with physical scale reference (e.g., standard coin or ArUco card overlay) to convert pixels into millimeters for font height validation [INFERENCE].
PaddleOCR + LayoutLM Multi-Lingual Extraction Pipeline REQ-2, REQ-4 Detects text regions on curved packaging, transcribes script (English + Hindi), and extracts statutory key-value fields [RESEARCHED, INFERENCE].
PDP Calculation & Table-I Font Rule Engine REQ-3, REQ-4 Implements Section 7 / Table-I of LMPC Rules, 2011 to cross-check measured font height against PDP surface area thresholds [RESEARCHED].
Deterministic Mandatory Declaration Validator REQ-2, REQ-4 Validates presence of all 8 mandatory fields under Rule 6, verifies SI unit compliance (Rule 12), and verifies MRP format with tax statements [RESEARCHED].
PDF Legal Notice & Editable Report Generator REQ-5, REQ-6 Generates legally structured violation notices containing stamped evidence photos, GPS coordinates, and exact legal section citations [INFERENCE].
Centralized Inspection Repository & Search Engine REQ-7, REQ-8 PostgreSQL-backed GTIN and brand database providing historic search, audit trails, and repeat offender identification [INFERENCE].
Enforcement Analytics Dashboard REQ-8, REQ-9 Provides district-wise violation maps, brand compliance leaderboards, and officer productivity metrics for DoCA administrators [INFERENCE].
Offline Sync Queue (Workbox / IndexedDB) REQ-1, REQ-7 Allows field inspectors in low-connectivity rural markets to scan packaging offline and auto-sync when online [INFERENCE].

5. Constraints & Environment Realities

  • Packaging Geometry & Surface Texture: Physical packages come in bottles, flexible pouches, crinkled bags, cans, and cartons [KNOWN]. Glossy surfaces cause specular reflections, and curved cylindrical bottles distort printed text and letter height [INFERENCE].
  • Camera Sensor & Scale Reference Variability: Mobile phone cameras differ in lens focal length, resolution, and distance from the product [KNOWN]. Without a physical reference target (e.g., standard Indian ₹5 coin diameter = 23mm or ArUco marker), converting image pixels to absolute physical millimeters for font height validation is mathematically ill-posed [INFERENCE].
  • Field Connectivity: Legal metrology inspectors conduct raids in wholesale markets, rural mandis, and basement warehouses where cellular connectivity (3G/4G/5G) is erratic or absent [KNOWN]. All computer vision and rule-checking logic must run locally on device or queue seamlessly [INFERENCE].
  • Lighting & Shadow Variations: Ambient lighting in small kirana stores or dark godowns fluctuates heavily [KNOWN]. High camera noise and uneven shadows degrade standard OCR precision unless adaptive pre-processing is applied [INFERENCE].
  • Language Diversity: Product labels in India frequently mix English numerals with Hindi or regional language terms (e.g., "म.रे.मू.", "शुद्ध मात्रा") [KNOWN]. The extraction pipeline must support bi-lingual text parsing [INFERENCE].
  • Device Hardware Limitations: Field officers are equipped with mid-range Android smartphones (2GB-4GB RAM, octa-core ARM processors) [INFERENCE]. Heavy deep learning models (>100MB) cannot execute real-time inference on-device without quantisation (TensorLite / ONNX Runtime) [INFERENCE].

6. Research Questions

  1. How can font height in millimeters be accurately measured from a 2D smartphone image without manual calipers?
    • Investigation Goal: Evaluate spatial scale calibration methods—comparing perspective transformation with standard reference markers (e.g., ArUco tag or ₹5 coin) versus smartphone AR Depth APIs (ARCore) [INFERENCE].
  2. What are the exact statutory minimum font size thresholds mandated under Rule 7 and Table-I of the LMPC Rules, 2011?
    • Investigation Goal: Extract official gazette threshold tables mapping Principal Display Panel (PDP) area in cm² to minimum font height in mm for weight, volume, and unit declarations [RESEARCHED].
  3. How does the system handle e-commerce digital product listing images versus physical packaging?
    • Investigation Goal: Differentiate digital text overlay scanning from real-world physical packaging OCR, verifying e-commerce specific amendments (e.g., mandatory country-of-origin filters under 2026 amendments) [RESEARCHED].
  4. How can offline inspection records be securely authenticated and synced to prevent evidence tampering?
    • Investigation Goal: Design cryptographic SHA-256 local hashing and SQLite WAL journaling to guarantee evidence chain of custody before server sync [INFERENCE].

7. Data Requirements & Sources

Data Type Purpose Ideal Real-World Source Hackathon Substitute Access Method Availability Privacy Sensitivity Confidence Tag
Statutory LMPC Rules & Font Tables Rule Engine validation logic Official Gazette Notifications, Department of Consumer Affairs portal [RESEARCHED] Digitized JSON schema of Rule 6, Rule 7 (Table I & II), and amendments [INFERENCE] Public Web / PDF Parsing Publicly Available None [KNOWN]
Packaged Commodity Label Images OCR model training & testing Field inspections, Open Food Facts India dataset, e-commerce listings (Amazon, Flipkart, Blinkit) [RESEARCHED] Scanned dataset of 500+ Indian FMCG product packages across categories (Food, Cosmetics, Electronics) [ASSUMPTION] Web Scraping / Synthetic Photo Capture High (Manual Collection) Low (Public Packaging) [RESEARCHED]
Brand & Manufacturer Master Data Cross-checking legal manufacturer registration & GTIN eMaap Portal (DoCA) / GS1 India Datakart API [RESEARCHED] Simulated Master JSON table mapping brand names to registered LMPC licenses [ASSUMPTION] Local JSON DB / REST Mock Restricted in Real-world [NEEDS VALIDATION] Public Business Info [INFERENCE]
Inspector Field Audit Logs Compliance tracking & violation history State Legal Metrology Department Enforcement Databases [RESEARCHED] Synthetically generated inspection logs with GPS coordinates & violation records [ASSUMPTION] PostgreSQL Database Proprietary Govt Data Medium (Officer details) [INFERENCE]

Data Categorization Breakdown

  • A. Data Explicitly Mentioned: Scanned product images, label text, mandatory declarations (MRP, Net Quantity, Mfg Date, Manufacturer details), inspection history, violation reports [PS].
  • B. Data Required by Inference: Camera calibration metrics (focal length, pixel-to-mm ratio), PDP bounding box coordinates, font height measurements, GPS geolocation stamps [INFERENCE].
  • C. Data That Must Be Collected: Real-world photos of compliant and non-compliant Indian retail packages under varied lighting [ASSUMPTION].
  • D. Data That Can Be Synthetically Generated: Synthetic e-commerce product listing images with intentional missing declarations for false-positive/false-negative benchmarking [ASSUMPTION].
  • E. Data That Still Needs Validation: Direct API integration schemas and production authentication protocols for DoCA's eMaap portal [NEEDS VALIDATION].

8. Existing Solutions & Gap Analysis

Existing System Description Strengths Weaknesses Relevance Remaining Gap Source Confidence Tag
eMaap Portal (DoCA / NIC) Central national portal for Legal Metrology registrations, manufacturer licensing, and stamping status [RESEARCHED]. Official government repository for LMPC certificates and license records [RESEARCHED]. Lacks automated computer vision tools; field inspections and label compliance checking remain completely manual [RESEARCHED]. High (Primary target workflow integration) Does not analyze label images or verify physical font sizes automatically [INFERENCE]. eMaap Portal [RESEARCHED] [RESEARCHED]
Generic Vision OCR APIs (Google Cloud Vision / AWS Rekognition) General-purpose cloud OCR and object detection services [KNOWN]. Highly accurate text transcription across standard document formats [KNOWN]. Zero domain awareness of LMPC Rules 2011; cannot calculate PDP area, cannot convert image pixels to physical mm font size, high cloud latency [INFERENCE]. Medium (Underlying OCR primitive) No legal metrology rule engine, no offline capability, no statutory report generation [INFERENCE]. Official Cloud Docs [KNOWN] [KNOWN]
Open Food Facts Scanner Mobile App Open-source mobile application scanning product barcodes to display nutritional information [RESEARCHED]. Large crowdsourced product database and mobile barcode lookup [RESEARCHED]. Focused purely on nutrition/ingredients; does not validate Indian Legal Metrology statutory declarations or font rules [INFERENCE]. Low (Barcode UX reference) Does not assess legal packaging compliance or statutory font sizes [INFERENCE]. Open Food Facts [RESEARCHED] [RESEARCHED]
National Consumer Helpline (NCH) App Mobile app for citizens to register general consumer grievance complaints [RESEARCHED]. Established citizen grievance reporting pipeline [RESEARCHED]. Requires manual user typing and image attachment without automated AI label verification or legal notice formatting [INFERENCE]. Medium (Citizen reporting target) No real-time automated verification of non-compliance evidence [INFERENCE]. NCH Portal [RESEARCHED] [RESEARCHED]

9. Candidate Solution Approaches

Approach 1: Pure Cloud LLM + Vision API Approach

  • Mechanism: Mobile app uploads raw packaging photo to cloud backend. GPT-4o / Gemini 1.5 Pro Vision processes the image via zero-shot prompt to extract text and judge compliance [INFERENCE].
  • Required Data: High-resolution uploaded images [INFERENCE].
  • Architecture: Direct API gateway to cloud LLM endpoint [INFERENCE].
  • Complexity: Low implementation complexity; high operational cost per scan [INFERENCE].
  • Explainability: Low (LLMs hallucinate font height numbers and rule interpretations without spatial metrics) [INFERENCE].
  • Scalability: Constrained by API rate limits and high per-image inference costs [INFERENCE].
  • Hackathon Feasibility: High (Fast to prototype) [INFERENCE].
  • Production Feasibility: Low (Fails offline requirement, non-deterministic legal output, high cost) [INFERENCE].
  • Risks: Hallucination of statutory compliance; complete failure without internet [INFERENCE].

Approach 2: Edge OpenCV + Heuristic Tesseract OCR Pipeline

  • Mechanism: On-device lightweight app using OpenCV for edge detection and Tesseract OCR for text extraction, followed by simple RegEx rules [INFERENCE].
  • Required Data: Local image frames [INFERENCE].
  • Architecture: Fully offline mobile client running C++ Tesseract bindings [INFERENCE].
  • Complexity: Medium code complexity; brittle text extraction on curved/wrinkled packaging [INFERENCE].
  • Explainability: High (Fully deterministic) [INFERENCE].
  • Scalability: High (Zero cloud computing cost) [INFERENCE].
  • Hackathon Feasibility: High [INFERENCE].
  • Production Feasibility: Medium (Low OCR accuracy on real-world noisy product labels) [INFERENCE].
  • Risks: High false-negative rate in text extraction due to complex multi-color packaging fonts [INFERENCE].

Approach 3: Hybrid Edge-Cloud Computer Vision + Fine-Tuned PaddleOCR + Spatial Scale Calibration + Deterministic Rule Engine (RECOMMENDED)

  • Mechanism:
    1. Mobile app captures label with an interactive spatial scale calibration overlay (reference target or AR depth scale) [INFERENCE].
    2. Local ONNX YOLOv8 model detects the Principal Display Panel (PDP) region and isolates label boundaries [INFERENCE].
    3. Pre-processed image is passed to PaddleOCR (optimized for scene text) + LayoutLMv3 key-value extractor [INFERENCE].
    4. Extracted spatial bounding boxes calculate the physical character height in millimeters (font_height_mm = bbox_pixel_height * mm_per_pixel) [INFERENCE].
    5. Deterministic Python Rule Engine executes LMPC Rules 2011 logic (verifying font size vs PDP area, 8 mandatory fields, unit constraints, MRP format) [INFERENCE].
    6. Results stored locally in SQLite and synced to central PostgreSQL database when online [INFERENCE].
  • Required Data: Dataset of annotated Indian packaged commodities, reference target calibration parameters, LMPC rule tables [INFERENCE].
  • Architecture: Hybrid Edge-Cloud (Edge preprocessing & capture + Local ONNX/TFLite model for offline checks + Cloud/Server sync & deep analytics) [INFERENCE].
  • Complexity: High (Requires CV calibration, fine-tuned OCR, and structured rule engine integration) [INFERENCE].
  • Explainability: Complete (Mathematical spatial calculations and explicit code rules mapped to Gazette clauses) [INFERENCE].
  • Scalability: Excellent (Heavy CV tasks optimized; low bandwidth data sync) [INFERENCE].
  • Hackathon Feasibility: High (Feasible with quantized ONNX models and FastAPI backend) [INFERENCE].
  • Production Feasibility: Excellent (Meets offline field requirements, high accuracy, legally defensible metrics) [INFERENCE].
  • Risks: User miscalibration of reference scale marker (mitigated via auto-contour validation) [INFERENCE].

10. Recommended Approach & Why

Selected Solution

Approach 3: Hybrid Edge-Cloud CV + Spatial Scale Calibration + Deterministic Legal Metrology Engine [INFERENCE].

Justification

  1. Mathematical Defensiveness for Legal Enforcement: Pure vision LLMs (Approach 1) cannot measure physical millimeter font heights accurately from 2D images and are prone to hallucinations, rendering their output inadmissible in court [INFERENCE]. Approach 3 uses explicit spatial calibration geometry (mm_per_pixel calculated via reference target contours) and deterministic Python code for Rule 7 Table-I verification [INFERENCE].
  2. Field Reliability (Offline First): Legal metrology raids frequently happen in basement godowns or rural markets without mobile internet [KNOWN]. Approach 3 executes PDP detection, OCR, and compliance validation entirely on-device via quantized ONNX models, queuing sync data locally [INFERENCE].
  3. Rejection of Alternatives:
    • Approach 1 rejected: High cloud API cost, lack of deterministic spatial measurement, complete failure in offline environments, risk of LLM hallucinations [INFERENCE].
    • Approach 2 rejected: Tesseract OCR performs poorly on complex multi-colored packaging backgrounds and curved product containers, leading to unacceptable false-negative rates during field raids [INFERENCE].

11. Technical Architecture

Layered Architecture Diagram

+-----------------------------------------------------------------------------------+
|                                 CLIENT LAYER                                      |
|  +-------------------------------------+  +------------------------------------+  |
|  |  Field Mobile App (Flutter / React) |  |  Web Admin Dashboard (React + Vite) |  |
|  |  - Live Camera & ArUco Scale Guide  |  |  - Regional Heatmap Analytics      |  |
|  |  - On-Device ONNX Runtime (YOLOv8)  |  |  - Brand Repeat Offender Search    |  |
|  |  - Offline SQLite & Workbox Queue   |  |  - PDF Notice Editor & Export      |  |
|  +-------------------------------------+  +------------------------------------+  |
+------------------------------------------+----------------------------------------+
                                           | HTTPS / REST / gRPC
+------------------------------------------v----------------------------------------+
|                                API GATEWAY LAYER                                  |
|  - NGINX / Traefik Reverse Proxy & TLS 1.3 Termination                            |
|  - JWT Authentication & Role-Based Access Control (RBAC)                          |
|  - Rate Limiting & Request Validation                                             |
+------------------------------------------+----------------------------------------+
                                           |
+------------------------------------------v----------------------------------------+
|                              APPLICATION SERVICES LAYER                           |
|  +----------------------------------+  +---------------------------------------+  |
|  | Image Pre-Processing Service     |  | OCR & Key-Value Extraction Service    |  |
|  | - OpenCV Contour Detection       |  | - PaddleOCR / EasyOCR Pipeline        |  |
|  | - Cylindrical Unwarping          |  | - LayoutLMv3 Key-Value Extractor      |  |
|  | - Contrast Enrichment (CLAHE)    |  | - Bi-lingual Text Normalization       |  |
|  +----------------------------------+  +---------------------------------------+  |
|  +----------------------------------+  +---------------------------------------+  |
|  | Spatial Scale Calibration Module |  | Deterministic LMPC Rule Engine        |  |
|  | - ArUco / Coin Contour Metric    |  | - PDP Area Threshold Checker (Rule 7) |  |
|  | - Pixel-to-Millimeter Conversion |  | - Mandatory Field Validator (Rule 6)  |  |
|  | - Font Height Bounding Box Eval  |  | - SI Unit & MRP Syntax Checker        |  |
|  +----------------------------------+  +---------------------------------------+  |
|  +-----------------------------------------------------------------------------+  |
|  | Report & Notice Generation Service (ReportLab / PDFKit)                      |  |
|  +-----------------------------------------------------------------------------+  |
+------------------------------------------+----------------------------------------+
                                           |
+------------------------------------------v----------------------------------------+
|                                 DATA & STORAGE LAYER                              |
|  +----------------------------------+  +---------------------------------------+  |
|  | PostgreSQL DB                    |  | MinIO / S3 Object Store               |  |
|  | - Inspection Records & History   |  | - Raw Image Evidence                  |  |
|  | - Brand Master Data              |  | - Bounding-Box Annotated Images       |  |
|  | - GTIN / Barcode Index           |  | - Generated PDF Violation Notices     |  |
|  +----------------------------------+  +---------------------------------------+  |
|  +-----------------------------------------------------------------------------+  |
|  | Redis Cache & Task Queue (Celery / BullMQ)                                  |  |
|  +-----------------------------------------------------------------------------+  |
+-----------------------------------------------------------------------------------+

Detailed Data Flow Narrative

  1. Image Capture & Calibration: The inspector positions the camera over the packaged commodity. An interactive grid overlay prompts the user to include a standard reference target (e.g., ArUco marker or ₹5 coin) on the packaging plane [INFERENCE].
  2. Local PDP & Scale Detection: On-device YOLOv8-nano detects the ArUco marker/coin contour and calculates mm_per_pixel = reference_real_mm / reference_pixel_diameter [INFERENCE]. Simultaneously, the model crops the Principal Display Panel (PDP) bounding box and calculates its total surface area $A_{PDP}$ in cm² [INFERENCE].
  3. Pre-Processing & OCR: OpenCV applies Contrast Limited Adaptive Histogram Equalization (CLAHE) and unwarps curved bottle surfaces [INFERENCE]. The image is passed to PaddleOCR to extract text segments along with exact pixel bounding boxes $(x, y, w, h)$ [INFERENCE].
  4. Key-Value Information Extraction: Text segments are processed by LayoutLMv3 and RegEx models to classify strings into statutory field categories: Manufacturer_Name, Net_Quantity, MRP, Mfg_Date, Consumer_Care_Email, etc. [INFERENCE].
  5. Spatial Font Measurement: For each extracted text field, character bounding box height $h_{pixel}$ is multiplied by mm_per_pixel to determine physical font height in millimeters ($h_{mm} = h_{pixel} \times \text{mm_per_pixel}$) [INFERENCE].
  6. Deterministic Rule Engine Evaluation:
    • Rule 6 Check: Verify that all 8 mandatory declarations are present and non-empty [RESEARCHED].
    • Rule 7 Table-I Check: Cross-check calculated $A_{PDP}$ against $h_{mm}$. For example, if $A_{PDP} = 120\text{ cm}^2$, Table-I mandates $h_{mm} \ge 2.0\text{ mm}$. If measured $h_{mm} = 1.2\text{ mm}$, flag a VIOLATION [RESEARCHED, INFERENCE].
    • Rule 12 Check: Validate that net quantity uses SI units (e.g., g, kg, ml, L) and MRP contains "incl. of all taxes" [RESEARCHED].
  7. Report Generation & Repository Storage: The system generates a digital compliance score (0-100%), compiles an annotated PDF inspection notice with cryptographic SHA-256 evidence hashes, and saves the record to local SQLite [INFERENCE]. Upon network reconnection, local records sync to the central PostgreSQL inspection repository and update the DoCA enforcement dashboard [INFERENCE].

12. Technology Stack

Layer Selected Technology Why Selected Alternative Considered Why Alternative Rejected
Mobile App Flutter (Dart) Single codebase for Android/iOS, native camera access, high performance for canvas rendering of bounding boxes [INFERENCE]. React Native Slower canvas rendering for real-time bounding box overlays [INFERENCE].
Web Dashboard React + Vite + TailwindCSS Rapid UI rendering, rich ecosystem for data visualization charts (Recharts) and interactive maps [INFERENCE]. Angular Higher boilerplate, slower dev velocity for hackathon timeline [INFERENCE].
Backend API Framework FastAPI (Python 3.12) Asynchronous, native support for Python AI/CV libraries (OpenCV, PyTorch, PaddleOCR), auto-generated Swagger docs [INFERENCE]. Node.js (Express) Poor native bindings for heavy computer vision & spatial geometry math [INFERENCE].
OCR Primitive PaddleOCR (PP-OCRv4) Superior accuracy on scene text, multi-language support (English/Hindi), light footprint, fast inference [RESEARCHED, INFERENCE]. Tesseract OCR Lower accuracy on multi-color complex FMCG label backgrounds [INFERENCE].
AI Inference Runtime ONNX Runtime Engine Cross-platform, hardware-accelerated CPU/GPU execution for quantized YOLOv8 & LayoutLM models [INFERENCE]. Native PyTorch High memory overhead, unsuitable for lightweight edge deployment [INFERENCE].
Database PostgreSQL 16 + PostGIS Enterprise relational database with spatial mapping for geographic enforcement heatmaps and full-text search [INFERENCE]. MongoDB Lack of native spatial-relational constraints for structured audit trails [INFERENCE].
Local Offline Database SQLite (WAL mode) Zero-config, lightweight, transactionally safe local storage for mobile sync queues [INFERENCE]. Hive / AsyncStore Lacks robust SQL relational queries for offline rule-checking [INFERENCE].
Object Storage MinIO (S3-Compatible) Open-source self-hosted object storage for high-resolution packaging photo evidence and generated PDFs [INFERENCE]. AWS S3 Cloud cost overhead and network latency during hackathon builds [INFERENCE].
PDF Generation ReportLab (Python) Programmatic PDF creation with precise millimeter vector positioning for official statutory legal notices [INFERENCE]. HTML2PDF Inconsistent page pagination and font rendering across environments [INFERENCE].

13. AI/ML Justification

Component 1: Principal Display Panel (PDP) & Reference Target Detector

  • Purpose: Locate the Principal Display Panel boundaries and detect the spatial calibration marker (ArUco / coin) [INFERENCE].
  • Model Type: YOLOv8-nano object detection model fine-tuned on packaging regions [INFERENCE].
  • Input: Raw 1080p camera image frame [INFERENCE].
  • Output: Bounding box coordinates $[x_{min}, y_{min}, x_{max}, y_{max}]$ and confidence score [INFERENCE].
  • Data Required: 500 annotated packaging images with polygon masks for PDP and reference tags [ASSUMPTION].
  • Why AI: Packaging designs vary drastically in color, shape, and artwork; fixed heuristic contour detection fails under variable background noise [INFERENCE].
  • Evaluation: Mean Average Precision ([email protected]) $> 0.92$ [INFERENCE].
  • Failure Mode: Model misidentifies secondary side panel as PDP.
  • Human Oversight: App provides interactive manual corner drag handles for inspector to adjust bounding box before running rule checks [INFERENCE].

Component 2: Multi-Lingual Scene Text OCR

  • Purpose: Detect text character bounding boxes and transcribe alphanumeric text [INFERENCE].
  • Model Type: PaddleOCR (PP-OCRv4 text detection + recognition) [RESEARCHED].
  • Input: Cropped PDP label image [INFERENCE].
  • Output: Text strings accompanied by pixel bounding box coordinates $[[x_1,y_1], [x_2,y_2], [x_3,y_3], [x_4,y_4]]$ [INFERENCE].
  • Data Required: Pre-trained PP-OCR fine-tuned on Indian FMCG font typography [INFERENCE].
  • Why AI: Font typography on modern packaging uses non-standard styling, embossing, and varied background contrast that traditional template matching cannot parse [INFERENCE].
  • Evaluation: Character Error Rate (CER) $< 3%$, Word Error Rate (WER) $< 7%$ [INFERENCE].
  • Failure Mode: Low-resolution image produces garbled characters (e.g., misreading "100g" as "100g1").
  • Human Oversight: Editable text preview panel allows inspector to correct misread characters prior to generating final legal notices [INFERENCE].

Component 3: Statutory Key-Value Entity Extractor

  • Purpose: Parse raw extracted text blocks into structured LMPC fields (MRP, Mfg Date, Net Quantity, etc.) [INFERENCE].
  • Model Type: Hybrid LayoutLMv3 + Regex Rules Extractor [INFERENCE].
  • Input: OCR text strings with 2D spatial layout coordinates [INFERENCE].
  • Output: Key-Value JSON object ({"net_quantity": "500 g", "mrp": "150.00"}) [INFERENCE].
  • Data Required: Annotated JSON dataset of text labels and entity tags [INFERENCE].
  • Why AI: LMPC fields appear in arbitrary visual locations across different brands; layout-aware transformers handle spatial relationships better than fixed regex [INFERENCE].
  • Evaluation: Entity F1-Score $> 0.90$ [INFERENCE].
  • Failure Mode: Misclassifies packer address as manufacturer address.
  • Human Oversight: Inspector approves entity mapping before report compilation [INFERENCE].

CRITICAL GOVERNANCE DIRECTIVE: Where AI MUST NOT Be Used

  • Legal Compliance & Penalty Determination: AI models MUST NOT make final compliance pass/fail decisions or calculate legal statutory font height minimums [INFERENCE]. All compliance checks, font height comparisons against Table-I, SI unit validation, and violation score calculations MUST be handled by 100% deterministic, transparent Python rule code [INFERENCE]. This ensures zero AI hallucination in legal enforcement and makes the system fully auditable in court [INFERENCE].

14. Data Architecture & Offline/Low-Network Design

Database Schema (PostgreSQL / SQLite)

-- Scanned Products Master Table
CREATE TABLE products (
    product_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    gtin_barcode VARCHAR(14) INDEX,
    brand_name VARCHAR(255) NOT NULL,
    commodity_name VARCHAR(255) NOT NULL,
    manufacturer_name VARCHAR(255),
    manufacturer_address TEXT,
    country_of_origin VARCHAR(100),
    created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);

-- Inspection Records Table
CREATE TABLE inspections (
    inspection_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    product_id UUID REFERENCES products(product_id),
    inspector_id UUID NOT NULL,
    latitude DECIMAL(9,6),
    longitude DECIMAL(9,6),
    pdp_area_sq_cm DECIMAL(8,2) NOT NULL,
    calibration_factor_mm_per_px DECIMAL(8,4) NOT NULL,
    overall_compliance_status VARCHAR(20) CHECK (overall_compliance_status IN ('COMPLIANT', 'NON_COMPLIANT', 'NEEDS_REVIEW')),
    violation_summary JSONB,
    evidence_image_hash VARCHAR(64) NOT NULL, -- SHA-256
    raw_image_url TEXT NOT NULL,
    annotated_image_url TEXT NOT NULL,
    pdf_report_url TEXT,
    synced_to_emaap BOOLEAN DEFAULT FALSE,
    inspected_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);

-- Extracted Declarations & Rule Validations
CREATE TABLE declaration_checks (
    check_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    inspection_id UUID REFERENCES inspections(inspection_id),
    declaration_type VARCHAR(50) NOT NULL, -- e.g. NET_QUANTITY, MRP, MFG_DATE
    extracted_text TEXT,
    measured_font_height_mm DECIMAL(5,2),
    required_font_height_mm DECIMAL(5,2),
    is_present BOOLEAN NOT NULL,
    is_font_compliant BOOLEAN NOT NULL,
    is_syntax_compliant BOOLEAN NOT NULL,
    failure_reason TEXT
);

Local Storage, Caching & Synchronization Design

  • Local Offline Storage: The Flutter mobile client maintains a local SQLite database utilizing Write-Ahead Logging (WAL) for rapid concurrent writes [INFERENCE]. Raw packaging images are stored in app sandboxed storage with strict OS permissions [INFERENCE].
  • Synchronization Pipeline:
    1. Scans performed offline receive a local UUID and are marked synced = false [INFERENCE].
    2. A background sync service (utilizing Workbox / Android WorkManager) monitors network state changes [INFERENCE].
    3. When an active connection (Wi-Fi/4G) is detected, the app compresses pending inspection payloads and uploads them via an idempotent POST endpoint (/api/v1/inspections/sync) [INFERENCE].
    4. The server validates the SHA-256 evidence hash, saves the record, and returns a confirmation ACK to clear the local queue [INFERENCE].
  • Conflict Resolution: "Server-Wins with Audit Append" strategy. If a product GTIN record exists on the server, the field inspection app appends a new inspection event without overwriting historical product metadata [INFERENCE].
  • Bandwidth Optimization: High-resolution packaging photos (12MB raw) are pre-compressed on-device using WebP image encoding (quality setting 85%, max resolution 1920x1080) to reduce upload payload sizes by ~85% (~300KB per image) [INFERENCE].

15. Security, Privacy & Governance

  • Personal & Location Data Protection: Inspector ID and precise GPS location coordinates are captured solely for legal evidence chain of custody during raids [INFERENCE]. Location data is encrypted at rest using AES-256 and accessible only to authorized department administrators [INFERENCE].
  • Authentication & Role-Based Access Control (RBAC):
    • Inspector Role: Capture scans, view local history, generate draft violation notices [INFERENCE].
    • Department Admin Role: View statewide dashboards, approve official legal notices, manage inspector accounts, export evidence dossiers [INFERENCE].
    • E-Commerce Auditor Role: Run bulk digital listing scans via API; cannot access field inspection logs [INFERENCE].
    • Public Citizen Role: Scan packaging to check compliance; lodge complaints anonymously [INFERENCE].
  • Cryptographic Evidence Chain of Custody: Every captured image immediately generates a SHA-256 hash stored alongside EXIF GPS metadata [INFERENCE]. Any subsequent tampering with image pixels invalidates the hash signature, ensuring judicial admissibility in legal proceedings under Section 65B of the Indian Evidence Act [INFERENCE].
  • Retention & Audit Logging: All inspection records, violation notices, and raw evidence photos are retained for a minimum of 5 years to support legal prosecution timelines [INFERENCE]. System interactions are logged in an append-only PostgreSQL audit table [INFERENCE].
  • Regulatory Prototype Disclaimer: The software application produced during the hackathon is a technology prototype designed to assist compliance auditing [INFERENCE]. Final statutory notices served to manufacturers must be formally signed and issued by authorized Legal Metrology Officers under the Legal Metrology Act, 2009 [RESEARCHED, INFERENCE].

16. MVP Scope (Hackathon Build)

===================================================================================
                               HACKATHON MVP SCOPE
===================================================================================

[MUST BUILD] - Core Value Proposition
-----------------------------------------------------------------------------------
1. Mobile-Responsive Scanning Interface: Mobile-first Web/Flutter scanner with camera
   capture and interactive ArUco / ₹5 coin scale calibration guide [INFERENCE].
2. Spatial Font Height Engine: Pixel-to-millimeter converter that measures character
   bounding box heights against PDP surface area [INFERENCE].
3. LMPC Rule Validation Engine: Python rule checker verifying the 8 mandatory Rule 6
   declarations, Rule 7 Table-I font sizes, and SI unit syntax [INFERENCE].
4. Instant PDF Notice Generator: Automated legal notice compilation with embedded
   annotated photos, rule citations, and compliance scores [INFERENCE].
5. Scanned Product Repository: Searchable web interface listing past scans, filterable
   by GTIN, brand, compliance status, and date [INFERENCE].
6. Basic Enforcement Dashboard: Real-time visual metrics showing total scans, pass/fail
   ratios, and top violation categories [INFERENCE].

[SHOULD BUILD] - High Impact Enhancements
-----------------------------------------------------------------------------------
1. Offline Sync Mechanism: Local SQLite storage queuing scans when offline, auto-
   syncing upon network restoration [INFERENCE].
2. Bi-lingual OCR Parsing: OCR detection for Hindi key terms (e.g., "उपभोगता देखभाल")
   alongside English [INFERENCE].
3. E-Commerce Image Mode: Screenshot analyzer verifying country-of-origin and seller
   declarations for online product listings [RESEARCHED, INFERENCE].

[NICE TO HAVE] - Polishing
-----------------------------------------------------------------------------------
1. Heatmap Analytics: PostGIS map overlay showing district-wise non-compliance [INFERENCE].
2. Barcode Auto-Lookup: GTIN lookup auto-populating brand master data [INFERENCE].

[DO NOT BUILD DURING HACKATHON] - Explicitly Out of Scope
-----------------------------------------------------------------------------------
1. Live Production eMaap Government Portal API Write Integration (Use mock server) [INFERENCE].
2. Multi-state direct legal summons dispatch integration [INFERENCE].
3. Edge deployment on custom embedded hardware handhelds [INFERENCE].
===================================================================================

17. Live Demo Simulation Plan

To convincingly demonstrate the platform to SIH judges without relying on live government production databases or physical laboratory calipers, the team will execute the following structured simulation plan:

  1. Physical Product Test Bench Setup:
    • Prepare 3 real physical packaged products:
      • Product A (Fully Compliant): Standard packaged food item (e.g., Biscuits) meeting all PDP font size and Rule 6 requirements [INFERENCE].
      • Product B (Non-Compliant - Font Size): Small cosmetic or soap carton where mandatory text font size is under 1.0mm despite a large PDP area [INFERENCE].
      • Product C (Non-Compliant - Missing Fields & Syntax): Imported snack package lacking Country of Origin, missing Consumer Care email, and using non-SI weight units (lbs) [INFERENCE].
  2. Interactive Scale Calibration Demo:
    • Place a standard ₹5 coin (verified diameter = 23.0 mm) adjacent to Product B's label [INFERENCE].
    • Open the mobile app scanner; align the camera over the label [INFERENCE].
    • Show the system auto-detecting the circular coin contour, locking the scale ratio (0.082 mm/pixel), and highlighting the PDP region [INFERENCE].
  3. Real-Time Automated Audit Execution:
    • Execute the scan on Product B. Show the screen live-detecting text blocks, calculating PDP area ($150\text{ cm}^2$), and highlighting the net quantity font size ($1.1\text{ mm}$ measured vs $2.0\text{ mm}$ legally required) [INFERENCE].
    • Watch the rule engine trigger a red VIOLATION DETECTED banner citing Rule 7, Table-I Non-Compliance [INFERENCE].
  4. Instant PDF Notice & Repository Sync:
    • Tap "Generate Violation Notice". Show the live-compiled PDF notice containing annotated bounding box images, SHA-256 hash, GPS coordinates, and pre-filled statutory notice clauses [INFERENCE].
    • Toggle Airplane Mode on the mobile app -> Scan Product C offline -> Re-enable Wi-Fi -> Show the background sync queue automatically pushing the record to the PostgreSQL web dashboard [INFERENCE].
  5. E-Commerce Listing Scan Simulation:
    • Switch to the Web Dashboard. Upload a pre-captured screenshot of a non-compliant e-commerce product listing [INFERENCE].
    • Demonstrate instant flagging of missing "Country of Origin" required under the 2026 E-Commerce LMPC Amendment [RESEARCHED, INFERENCE].

18. Implementation Roadmap

Phase 1: Legal Metrology Rule Digitization & CV Calibration (Days 1 - 3)
├── Digitized JSON schema of LMPC Rules 2011 (Rule 6, Rule 7 Table-I/II, Rule 12).
├── Developed OpenCV ArUco & coin spatial scale calibration module (mm/px converter).
└── Built synthetic dataset of 100 annotated product label images.

Phase 2: Core Processing Pipeline & OCR Integration (Days 4 - 8)
├── Integrated PaddleOCR scene-text detection & LayoutLM key-value parser.
├── Built Python Deterministic Rule Engine for PDP area & font height checks.
└── Created FastAPI endpoints for scan processing, text extraction, & validation.

Phase 3: Mobile Scanner & Web Admin Dashboard Development (Days 9 - 14)
├── Built Flutter camera mobile scanner with live calibration & PDP grid overlay.
├── Implemented local SQLite offline queue & sync manager.
├── Built React + Vite Web Dashboard for inspection history, search, & analytics.
└── Integrated ReportLab PDF violation notice generator.

Phase 4: End-to-End Testing & Demo Bench Preparation (Days 15 - 18)
├── Conducted spatial accuracy benchmark testing across physical packaging samples.
├── Executed false-positive / false-negative rule engine stress testing.
├── Optimized ONNX model weights for lightweight mobile/edge execution.
└── Finalized live demo bench, physical test packages, and technical dossier.

Target Completion Date: September 2026 (Fully aligned with SIH deadline of 30 September 2026) [PS].

19. Testing & Validation Plan

  • Functional Testing:
    • Verify that all 8 mandatory fields under Rule 6 are correctly flagged when present or missing [INFERENCE].
    • Test PDF generation to ensure vector text, evidence photos, and SHA-256 hashes render cleanly without formatting breaks [INFERENCE].
  • Spatial Calibration & Font Accuracy Testing:
    • Test Benchmark: Measure 50 physical package labels with physical digital Vernier calipers (gold standard measurement) [INFERENCE].
    • Metric: Compare software-calculated font height against caliper measurements. Acceptable error tolerance: $\le \pm 0.15\text{ mm}$ [INFERENCE].
  • AI Model Metrics:
    • PDP Boundary Detection: Target [email protected] $\ge 0.90$ on YOLOv8 [INFERENCE].
    • OCR Transcription: Target Character Error Rate (CER) $< 3%$ on English/Hindi packaging text [INFERENCE].
  • False-Positive / False-Negative Rule Engine Benchmarking:
    • Run 200 test label images through the rule engine (100 fully compliant, 100 with known violations) [INFERENCE].
    • Target False-Positive Rate $< 2%$ (preventing false harassment of compliant manufacturers) [INFERENCE].
    • Target False-Negative Rate $< 1%$ for missing mandatory fields [INFERENCE].
  • Offline & Connectivity Resilience:
    • Execute 20 consecutive scans in Airplane Mode; verify zero data loss in SQLite [INFERENCE]. Restore connection and verify 100% sync integrity to PostgreSQL [INFERENCE].
  • Security & Evidence Integrity:
    • Modify 1 pixel in a stored evidence image; verify that the server SHA-256 verification check flags "EVIDENCE TAMPERED" [INFERENCE].

20. Risk Register

Risk Likelihood Impact Severity Mitigation Strategy
Perspective Distortion on Curved Containers (e.g., cylindrical bottles distorting font dimensions) High High High Implement OpenCV cylindrical unwarping surface algorithms prior to measuring font bounding box heights [INFERENCE].
User Miscalibration of Reference Target (e.g., holding coin at an angle or using wrong target size) Medium High High Implement auto-contour circle fit validation; require camera pose angle to be within $\pm 10^\circ$ perpendicular to label plane before enabling scan shutter [INFERENCE].
Specular Reflection & Glossy Label Glare hiding text characters High Medium Medium Apply Contrast Limited Adaptive Histogram Equalization (CLAHE) pre-processing and prompt user to activate camera flash diffusion [INFERENCE].
Erratic Offline Sync / Network Droppage in remote godowns Medium High High SQLite Write-Ahead Logging (WAL) with transactional payload chunking and idempotent server sync endpoints [INFERENCE].
False Allegation of AI Hallucination in Court Low High High Maintain 100% separation between AI text extraction and rule evaluation. All compliance logic is deterministic Python code with raw bounding box math [INFERENCE].

21. Cost & Scalability

Hackathon Prototype Build Cost (INR)

  • Compute / Hosting: ₹0 (Local development environment + Docker + MinIO) [INFERENCE].
  • OCR & AI Models: ₹0 (Open-source PaddleOCR, YOLOv8, LayoutLMv3, ONNX Runtime) [INFERENCE].
  • Database: ₹0 (Community Edition PostgreSQL + Local SQLite) [INFERENCE].
  • Mobile / Web Frontend: ₹0 (Flutter + React + Vite open-source frameworks) [INFERENCE].
  • Total Prototype Cost: ₹0 (100% Open Source Stack) [INFERENCE].

Production Cloud Deployment Cost (State-Wide Scale: ~10,000 Inspectors, 1 Million Monthly Scans)

  • Cloud Infrastructure (AWS / Azure / NIC Cloud):
    • 2x Application Server Instances (8 vCPU, 32GB RAM): ~$250/month [INFERENCE].
    • Managed PostgreSQL Database (High Availability, 500GB SSD): ~$300/month [INFERENCE].
    • S3 / MinIO Object Storage (5TB compressed images + PDFs): ~$120/month [INFERENCE].
    • CDN & Bandwidth Egress: ~$100/month [INFERENCE].
  • Total Estimated Operational Cost: $770 / month (₹64,000 / month) [INFERENCE].
  • Scalability Bottleneck Analysis: OCR inference is the most compute-intensive operation. By quantizing PaddleOCR models to INT8 ONNX and delegating PDP cropping to edge mobile devices, cloud CPU utilization drops by over 70%, allowing a lightweight server cluster to handle millions of monthly scans [INFERENCE].

22. Differentiation

Dimension Generic Submissions MetroCheck AI (Proposed Solution)
Font Height Measurement Vague claims of "measuring font size using AI" without physical scale context [INFERENCE]. Spatial Calibration Engine: Uses ArUco / coin reference targets to convert image pixels to absolute physical millimeters (mm/px), explicitly verifying Rule 7 Table-I [INFERENCE].
Compliance Decision Logic Feeding text to ChatGPT / LLM to ask "Is this package compliant?" (Unreliable, non-deterministic) [INFERENCE]. 100% Deterministic Rule Engine: Explicit Python logic evaluating Section 6 & 7 thresholds, producing auditable, court-admissible results [INFERENCE].
Field Usability Cloud-dependent web app failing in low-network godowns [INFERENCE]. Offline-First Mobile Architecture: Edge ONNX execution and SQLite queue with automatic background sync [INFERENCE].
Judicial Admissibility Unverified raw image uploads [INFERENCE]. Cryptographic Evidence Chain: Embedded SHA-256 image hashing, GPS geolocation stamps, and automated PDF statutory notice compilation [INFERENCE].

23. Future Scope

  1. Integration with DoCA eMaap Portal: Direct REST API handshake with the National Legal Metrology Portal (eMaap) to auto-verify manufacturer license registration numbers and compound offence history [RESEARCHED, INFERENCE].
  2. GS1 India Datakart Cross-Verification: Auto-fetching master product details via GTIN barcode scanning to cross-verify physical label declarations against registered GS1 brand attributes [RESEARCHED, INFERENCE].
  3. Automated E-Commerce Crawler: Multi-threaded web crawler that automatically audits digital product listings on e-commerce marketplaces (Amazon, Flipkart, Blinkit) and flags non-compliant listings to DoCA enforcement officers [RESEARCHED, INFERENCE].
  4. Cylindrical 3D Mesh Reconstruction: Advanced multi-view photogrammetry to automatically reconstruct 360-degree cylindrical label surfaces on curved bottles, eliminating font distortion errors [INFERENCE].

24. Assumptions & Open Items Log

Consolidated Assumptions & Open Items

  • [ASSUMPTION] Standard Indian ₹5 coin (diameter = 23.0 mm) or printed ArUco tag serves as an acceptable universal calibration target for field inspectors.
  • [ASSUMPTION] Mid-range Android devices equipped with 4GB RAM and 1080p cameras are available to field enforcement officers.
  • [NEEDS VALIDATION] Production API authentication specs, SSL certificate requirements, and database schema for direct integration with DoCA's live eMaap portal [NEEDS VALIDATION].
  • [NEEDS VALIDATION] Exact legal status and judicial precedent regarding smartphone photo evidence admissibility for issuing compound penalty notices without manual physical caliper backup [NEEDS VALIDATION].

Final Recommendation

Proceed immediately with Approach 3 (Hybrid Edge-Cloud CV + Spatial Calibration + Deterministic Legal Metrology Engine) [INFERENCE]. This architecture satisfies all functional requirements, solves the physical font measurement challenge through rigorous spatial geometry, guarantees zero AI hallucination in legal decisions, and operates reliably in offline field environments [INFERENCE].

Recommended Stack

  • Mobile Scanner: Flutter + ONNX Runtime + SQLite [INFERENCE].
  • Web Dashboard: React + Vite + TailwindCSS + Recharts [INFERENCE].
  • Backend Framework: FastAPI (Python 3.12) + OpenCV + PaddleOCR + ReportLab [INFERENCE].
  • Database & Storage: PostgreSQL 16 (PostGIS) + MinIO Object Store + Redis [INFERENCE].

Key Strategic Metrics

  • Biggest Dependency: Availability of a reference calibration target (coin/ArUco tag) in the camera frame to convert pixels to physical millimeters accurately [INFERENCE].
  • Biggest Risk: Camera misplacement causing steep perspective angles and font scale distortions on curved packaging [INFERENCE].
  • Biggest Technical Challenge: Performing precise sub-millimeter character bounding box measurement on multi-colored, low-contrast, or crinkled packaging labels [INFERENCE].

First 5 Actions

  1. Digitize LMPC Rules 2011: Create a fully typed JSON schema representing Rule 6 mandatory declarations and Rule 7 Table-I font size thresholds [INFERENCE].
  2. Build OpenCV Spatial Calibration Prototype: Implement pixel-to-millimeter spatial scale conversion code using ArUco marker and circular coin contour detection [INFERENCE].
  3. Set Up PaddleOCR Extraction Pipeline: Configure PaddleOCR with LayoutLMv3 to extract statutory key-value pairs from sample packaging photos [INFERENCE].
  4. Develop Deterministic Rule Validator: Write unit-tested Python functions that accept extracted font metrics and PDP surface areas to generate compliance scores [INFERENCE].
  5. Assemble Physical Test Bench: Gather 10 diverse physical packaging samples (compliant & non-compliant) and measure baseline font heights using digital Vernier calipers [INFERENCE].

Validation Before Coding

  • Verify that the pixel-to-millimeter calibration script achieves $< \pm 0.15\text{ mm}$ error compared to manual Vernier caliper measurements across 15 test photos taken under varying ambient lighting [INFERENCE].

Buildability Score /100

92 / 100 [INFERENCE]. (High buildability: Core CV, OCR, and rule validation technologies are well-supported by open-source libraries. The primary challenge lies in camera calibration tuning, which is fully achievable within the hackathon build window) [INFERENCE].

Confidence

HIGH [INFERENCE].

Research Sources

  1. The Legal Metrology (Packaged Commodities) Rules, 2011 (As Amended)

    • URL: wbconsumers.gov.in LMPC Rules 2011 PDF
    • Source Type: Official Government Statutory Rules Publication
    • Supported Claim: Mandatory declarations under Rule 6, PDP area definitions, and Table-I font height requirements under Section 7 [RESEARCHED].
    • Reliability: Authoritative (10/10).
  2. Legal Metrology Overview - Department of Consumer Affairs (DoCA)

    • URL: consumeraffairs.gov.in Legal Metrology Overview
    • Source Type: Official Ministry Website
    • Supported Claim: Operational scope of the Legal Metrology Act, 2009, mandatory label declarations, and consumer protection objectives [RESEARCHED].
    • Reliability: Authoritative (10/10).
  3. eMaap National Legal Metrology Portal

    • URL: emaap.gov.in Legal Metrology Portal
    • Source Type: Official Centralized Government Portal
    • Supported Claim: Development of a unified national database for manufacturer registrations, licensing, and enforcement workflows [RESEARCHED].
    • Reliability: Authoritative (10/10).
  4. Legal Metrology (Packaged Commodities) Amendment Rules for E-Commerce

    • URL: PIB Delhi Press Release on LMPC Amendments
    • Source Type: Press Information Bureau (Government of India)
    • Supported Claim: Mandating e-commerce platforms to display statutory declarations and searchable country-of-origin filters [RESEARCHED].
    • Reliability: Authoritative (10/10).
02 / What our

DEVELOPERS SAY

" 30M+ Google Gemini tokens went into researching, analyzing, and understanding all 233 SIH problem statements to make them easier to explore and solve. "
Satyam Kumar
Satyam Kumar
CEO , Full Stack Developer
" The platform makes SIH problem statements much easier to understand. Having everything from the problem details to the procedure in one place. "
Rishabh Ranjan
Rishabh Ranjan
COO , Content Writer
" Oh, you got ads? Well, we need to make money too! But, you can use our platform to help you win SIH and take home the prize money. "
Himanshu Kumar
Himanshu Kumar
CMO , Product Reviewer
03 / Are You

READY TO
BUILD?

Get in touch if you need help bringing your ideas to life, or simply have an interesting idea you'd like to talk through. I'm always open to a conversation and exploring new possibilities together.