Inspiration

RuleScan was inspired by the challenges faced by Legal Metrology Enforcement Officers in manually inspecting product packaging and verifying mandatory declarations. Small fonts, curved packaging, and misleading online product listings make inspections time-consuming and difficult to scale. We wanted to build an AI-powered solution that makes compliance checking faster, more accurate, and transparent while protecting consumer rights and supporting businesses.

What it does

RuleScan is an AI-powered packaging compliance platform that scans product labels, extracts mandatory declarations using computer vision and OCR, and validates them against applicable Legal Metrology and Legal Metrology Packaged Commodities (LMPC) rules. It identifies missing or incorrect declarations, checks applicable font-size requirements, and generates evidence-based PDF reports with image references, GPS tagging, and SHA-256 hashes. It also aims to detect mismatches between physical packaging and e-commerce listings and provide an officer dashboard for efficient enforcement.

How we built it

We designed RuleScan using a full-stack architecture combining AI, computer vision, and rule-based validation. Flutter supports the mobile application, React.js powers the officer dashboard, and Node.js with Python/FastAPI handles backend services and AI processing. YOLOv8 and OpenCV support label detection and image processing, while Tesseract and EasyOCR extract text. A rule engine evaluates declarations against applicable compliance requirements. MongoDB stores records, Firebase supports authentication, and ReportLab enables evidence-report generation with JSON and CSV export options.

Challenges we ran into

Our major challenges included extracting readable text from curved packaging, detecting very small fonts, handling different label layouts, and reducing OCR errors. Translating legal requirements into machine-readable validation rules was another challenge. We also considered how to maintain traceable evidence, handle uncertain results responsibly, and design the platform to work across different retail and e-commerce environments.

Accomplishments that we're proud of

We developed a clear AI-assisted workflow that combines label scanning, text extraction, legal-rule validation, and evidence-report generation in one platform. We are proud of the proposed integration of computer vision with rule-based compliance checks, digital evidence tracking, and an officer dashboard. RuleScan is designed to reduce repetitive manual work, improve inspection consistency, and support more scalable consumer-protection enforcement.

What we learned

We learned how computer vision, OCR, and rule-based AI can work together to solve real-world regulatory problems. We also gained a better understanding of legal-rule mapping, evidence traceability, full-stack system integration, and the importance of testing AI systems on real packaging. Most importantly, we learned that AI should assist enforcement officers, with human review remaining essential for uncertain or consequential compliance decisions.

What's next for RuleScan

Our next steps are to improve OCR accuracy on curved and low-resolution labels, benchmark the system across diverse product categories, and validate font-size measurement under controlled conditions. We plan to strengthen the legal-rule database, expand evidence-reporting capabilities, and develop pilot testing with enforcement officers. Future improvements include authorized eMaap integration, e-commerce listing verification, offline inspection support, and analytics to help identify recurring compliance issues.

Built With

  • accessibility
  • ai/ml
  • cold-chain
  • crop-photo
  • database:
  • dqn
  • engine:
  • fefo
  • hvac
  • input
  • iot-based
  • mobilenet-cnn
  • offline-first
  • physics
  • postgresql+postgis
  • precomputed
  • pydantic
  • redis
  • results
  • storage
  • tensorflow
  • validationpareto
  • vision
  • whisper
Share this project:

Updates

Submission history